I want to set a rule in my Shopify store where customers can only checkout if their cart total is equal to or greater than 2000 PKR. I’m using the Rise theme and would prefer a custom code solution instead of using an app.
Can anyone guide me on which file I should edit and how to apply this condition?
Hey @user476,
Thanks for posting your Question on Shopify Community.
By any chance would you like to watch this video. This video exactly works with your requirements.
You can also share the URL of your store to help generate a simple restriction based on the elements (buttons…) visible on your site.
In addition, to apply these blocks you should consider all user purchase flows:
When added to cart from the PDP
If the drawer is active
If the “go through cart” link is active
If the direct checkout is active
So it’s probably better to make the Journey always pass through the cart page and apply validation there (depending on your Shopify version you can create custom code so this validation happens at checkout).
Otherwise, any solution will only cover part of the purchase process.
Also let me know if you know or are familiar with Liquid code.
I want to inform you that Shopify only allows editing the checkout page on Shopify Plus. If you are using Shopify Plus, it is possible with the custom code, but if you are not using it, there is a workaround.
You can allow users to go to checkout only if the cart amount is greater than 2000. If the cart amount is less than 2000, customers can only go to the cart page, and they will get an error that you can only check out if the amount is greater than 2000.