X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Force Ordering in case qty only (https://forum.x-cart.com/showthread.php?t=78269)

GMarler 07-06-2021 04:29 AM

Force Ordering in case qty only
 
I understand and have set the minimum order qty per item, but what files would need to be altered to increment order qty by minimum amount so customers will only be able to order in case qty (minimum qty order in x-cart)

PhilJ 07-06-2021 09:47 PM

Re: Force Ordering in case qty only
 
Usually...

/skin/common_files/customer/main/buy_now.tpl
/skin/common_files/customer/main/product_details.tpl
/skin/common_files/customer/main/cart.tpl

It depends if you're using the quantity input field, or quantity select dropdown, but in either case you need to add a 'step' attribute and possibly some additional JS validation code on top.

https://www.w3schools.com/tags/att_input_step.asp
https://www.smarty.net/docs/en/language.function.section.tpl

Also depends whether you want to do it store-wide, or on just a selection of products. If the latter, then you'll probably need a custom product field.


All times are GMT -8. The time now is 12:41 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.