Hi,
I recently updated Toolkit in preparation to install PR7. I was using toolkit to restrict our wholesale customers from checking out without meeting a minimum purchase requirement.
After updating all my modules, the code for minimum orders was working fine. Now, all of a sudden it's not working. I have spent hours on the code, but can't isolate the problem.
The code I was using before and immediately after the updates was:
<mvt:item name="toolkit" param="pgroup|pcount" />
<mvt:if expr="g.pcount GT 0">
<mvt:foreach iterator="customer_pgroup" array="customer_pgroups">
<mvt:if expr="l.settings:customer_pgroup:name EQ 'Wholesale'">
<mvt:item name="toolkit" param="basket|itemcount" />
<mvt:if expr="l.settings:toolkit:basketcount GT 0">
<mvt:if expr="l.settings:toolkit:baskettotal LT 100.00">
<br><br><b>Your order does not meet the $100.00 minimum for wholesale orders.</b><br><br>
(Link back to storefront)
</body></html>
<mvt:exit>
</mvt:if>
<mvt:else>
<br><br>
Your basket is empty<br><br>
(link to continue shopping)
</body></html>
<mvt:exit>
</mvt:if>
</mvt:if>
</mvt:foreach>
</mvt:if>
I've tried using the code on Weiland's site, but it doesn't work either:
<mvt:item name="toolkit" param="subtotal|basketsubtotal" />
<mvt:if expr="g.basketsubtotal LT 50">
<mvt:item name="toolkit" param="pgroup|pcount" />
<mvt:if expr="g.pcount GT 0">
<mvt:foreach iterator="customer_pgroup" array="customer_pgroups">
<mvt:if expr="l.settings:customer_pgroup:name EQ 'Platinum'">
<mvt:item name="toolkit" param="sassign|showmin|1" />
</mvt:if>
</mvt:foreach>
</mvt:if>
<mvt:if expr="g.showmin">
<mvt:item name="toolkit" param="sacreate|error_message|Your price group requires $50.00 minimum order!|," />
<mvt:item name="toolkit" param="sassign|Error_Message_Count|1" />
<mvt:item name="toolkit" param="vassign|Error_Messages|l.all_settings:error _message" />
<mvt:item name="toolkit" param="render|OMIN" />
<mvt:exit>
</mvt:if>
</mvt:if>
I've tried using Bill's code both ways - with a link back to the storefront and with the redirect to the OMIN page.
I have no idea why this is suddenly not working, but am beginning to think it might not be the code, but something else that has gone awry.
Any help would be greatly appreciated.
Annie
I recently updated Toolkit in preparation to install PR7. I was using toolkit to restrict our wholesale customers from checking out without meeting a minimum purchase requirement.
After updating all my modules, the code for minimum orders was working fine. Now, all of a sudden it's not working. I have spent hours on the code, but can't isolate the problem.
The code I was using before and immediately after the updates was:
<mvt:item name="toolkit" param="pgroup|pcount" />
<mvt:if expr="g.pcount GT 0">
<mvt:foreach iterator="customer_pgroup" array="customer_pgroups">
<mvt:if expr="l.settings:customer_pgroup:name EQ 'Wholesale'">
<mvt:item name="toolkit" param="basket|itemcount" />
<mvt:if expr="l.settings:toolkit:basketcount GT 0">
<mvt:if expr="l.settings:toolkit:baskettotal LT 100.00">
<br><br><b>Your order does not meet the $100.00 minimum for wholesale orders.</b><br><br>
(Link back to storefront)
</body></html>
<mvt:exit>
</mvt:if>
<mvt:else>
<br><br>
Your basket is empty<br><br>
(link to continue shopping)
</body></html>
<mvt:exit>
</mvt:if>
</mvt:if>
</mvt:foreach>
</mvt:if>
I've tried using the code on Weiland's site, but it doesn't work either:
<mvt:item name="toolkit" param="subtotal|basketsubtotal" />
<mvt:if expr="g.basketsubtotal LT 50">
<mvt:item name="toolkit" param="pgroup|pcount" />
<mvt:if expr="g.pcount GT 0">
<mvt:foreach iterator="customer_pgroup" array="customer_pgroups">
<mvt:if expr="l.settings:customer_pgroup:name EQ 'Platinum'">
<mvt:item name="toolkit" param="sassign|showmin|1" />
</mvt:if>
</mvt:foreach>
</mvt:if>
<mvt:if expr="g.showmin">
<mvt:item name="toolkit" param="sacreate|error_message|Your price group requires $50.00 minimum order!|," />
<mvt:item name="toolkit" param="sassign|Error_Message_Count|1" />
<mvt:item name="toolkit" param="vassign|Error_Messages|l.all_settings:error _message" />
<mvt:item name="toolkit" param="render|OMIN" />
<mvt:exit>
</mvt:if>
</mvt:if>
I've tried using Bill's code both ways - with a link back to the storefront and with the redirect to the OMIN page.
I have no idea why this is suddenly not working, but am beginning to think it might not be the code, but something else that has gone awry.
Any help would be greatly appreciated.
Annie
Comment