Minimum Order value

Permalink Browser Info Environment
Hi John,

I've been requested to set up a minimum order value on a site and your add-on was suggested as the means to do this. As this is already installed & configured successfully for the four different zones I have, I'd appreciate if you could offer a little assistance with the set up.

Regards,
Steve

Type: Discussion
Status: Archived
PassionForCreative
View Replies:
JohntheFish replied on at Permalink Reply
JohntheFish
Hi Stephen

The latest version can certainly do this. If you enable the order value as a cost basis (in addition to weight or whatever other cost basis you use), then for any zone you can identify orders with a value more than $XXX (and hence anything else is less than $XXX).

You then either:

a) Include [%null%] in the message for those orders, so there is no shipping type (the rest of the message gets discarded)

or

b) Provide a message that says 'Order does not meet minimum value' and then use a bit of javascript in the checkout to detect that and delete the 'next' button. (as detailed on another support forum thread)


eg

zone - weight - order value - shipping cost - message
Local - 1000000kg - $20 - $0 - Minimum order value not met [%null%]
Local - 1kg - $1000000 - $2 - Delivery to local
Local - 5kg - $1000000 - $4 - Delivery to local
etc..... rules as usual, repeat for other zones

If you have a play with the shipping cost rules on a test installation, you should soon get the idea of how to put this together.
PassionForCreative replied on at Permalink Reply 2 Attachments
PassionForCreative
Hi John,

Thanks for the detailed response. I managed to get the Message to display correctly using option B above but it then says Cost: Free. I've uploaded screengrabs of the ZBS dashboard & the page on the site.

I added the Javascript to the address.php & method.php pages but it still shows the Next button. What am I doing wrong?
<script>  
   $('#ccm-core-commerce-checkout-cart').find('.zone-tbd').each(function(ix,elem){
    var msg = $(elem).text();
    $('#ccm-core-commerce-checkout-cart').find('.zone-tbd').
        parents('td').
        nextAll('td').remove().
        end().parents('tr').
        append(elem).find('.zone-tbd').wrap('<td colspan="3" style="text-align:center"></td>');
    $('#ccm-core-commerce-checkout-cart').find('.ccm-core-commerce-cart-price').last().parent('tr').remove();
    // more jQuery here to remove the next button
   $('#submit_next').remove();
    });
    </script>
JohntheFish replied on at Permalink Reply
JohntheFish
Hi Stephen

First off, I missed a point in my earlier response. For it to work you would need to put a span element with class zone-tbd about the text of the delivery message. This gives the subsequent javascript something to key on.

Because you also have the 'pickup' method, then the choice of delivery methods screen is showing. The javascript was designed to work with the screen that would show when there is just the one delivery method.

So, the easy solution for you would be to move to method (a) with the [%null%] in the delivery message, then C5 eCommerce will simply not show the ZBS shipping option on orders less than XXX.

The more complex solution would be to develop some javascript that catches the situation you have with the 2 shipping methods, removes the 'free' note that C5 eCommerce adds, and removes the radio option from that screen. (so 'next' remains available for those collecting). In that situation, I would use a class name like 'delivery-not-availabl' instead of 'zone-tbd' to communicate between ZBS and the javascript you place on the cart page.
JohntheFish replied on at Permalink Reply
JohntheFish
Hi Stephen

Just checking in to see how you are getting on and which of the solutions you ended up using.
PassionForCreative replied on at Permalink Reply
PassionForCreative
Hi John,

I actually cheated. I ended up using the [%null%] method but added a line to the end that said in-store pick-up only. This allows the customer to purchase if they wish, the client is happy that she doesn't have to deliver and she can upsell if anyone does decide thats all they want to purchase & then collect.

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.