0

I am trying to restrict customer cart value to $100000.If customer cart value reach $100000, then i want show one message in minicart and hide proceed to checkout,view cart buttons. Is there any way to achieve that. please help me.

Thanks in advance

0

You can use the visible binding of Knockout JS to accomplish that.

You should look for the templates where the "Proceed to Checkout" button is located (and/or any other element that you want to hide), and override it.

Then look for the subtotal variable and do something like this in order to make the div visible only if the subtotal is fewer than 100000:

<div data-bind="visible: subtotal() < 100000">

Hope it helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.