Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Force Ordering in case qty only

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 07-06-2021, 04:29 AM
 
GMarler GMarler is offline
 

Advanced Member
  
Join Date: Aug 2005
Location: Western NC USA
Posts: 96
 

Default 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)
__________________
Greg Marler
x-Cart GoldPlus version 4.7.12
Gold 4.7.6 (under construction)
CentOS
Apache 2
Reply With Quote
  #2  
Old 07-06-2021, 09:47 PM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default 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.
__________________
xcartmods.co.uk
Reply With Quote

The following 2 users thank PhilJ for this useful post:
georgewf (03-19-2022), peggyr (07-24-2021)
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:52 PM.

   

 
X-Cart forums © 2001-2020