| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Case Quantities (ie. 12, 24, 36, etc) in quantity pulldown | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Case Quantities (ie. 12, 24, 36, etc) in quantity pulldown
I needed the ability to offer some items in "case quantities" (ie. 12, 24, 36, etc). This thread (http://forum.x-cart.com/viewtopic.php?t=23097) describes how to do this site-wide, but I also have items which are sold in single units. Here's what I did: (This has been edited to resolve the Variant Qty problem described in the posts below. GF) (I've edited the code again to patch another javascript issue - argh.)
That's it! Items that don't have a CaseSize set will behave normally, stepping by 1. Notes: If you allow customers to update item quantities in the cart, they will be able to change their quantities to non case quantity multiples. Items using CaseSize will not benefit from X-cart's built-in inventory javascript. This was done in x-cart gold 4.0.13. happy modding, Glen
__________________
NO LONGER USING X-CART - NOT ACTIVE IN THESE FORUMS |
|||||||
#2
|
|||||||
|
|||||||
I've updated the code above to fix a problem with the quantity listing when showing case quanitities. The javascript on product.tpl also controls the quantity select menu and this needed to be edited to match how the Section loop behaved.
-Glen
__________________
NO LONGER USING X-CART - NOT ACTIVE IN THESE FORUMS |
|||||||
#3
|
|||||||||
|
|||||||||
Hello Glen
I installed this mod and it works great except for the "step" option in the dropdown box. I have it set up to step by 10 up to 500 which it does, but after the 500 in the dropdown box it goes to 60, 61, 62, ect.. up to 500 Example of options in drop down box: 480 490 500 60 61 62 Any idea what may be causing this? Thanks |
|||||||||
#4
|
|||||||||
|
|||||||||
I also found out I only have this problem if the product has a variant.
|
|||||||||
#5
|
|||||||
|
|||||||
Tony -
I've edited the original code above to fix the problem you found. Items with Variants and CaseSize should now display a proper Quantity selection pulldown. Thanks for spotting that. -Glen
__________________
NO LONGER USING X-CART - NOT ACTIVE IN THESE FORUMS |
|||||||
#6
|
|||||||||
|
|||||||||
Quote:
Thanks alot Glen I'll give it try. Really apreciate you taking the time to check this out. Tony |
|||||||||
#7
|
|||||||||
|
|||||||||
That did the trick Glen.
Thanks again Tony |
|||||||||
#8
|
|||||||
|
|||||||
I've updated the code again with hopefully the last fix. Today's previous update disabled the "add to cart" button (whoops). The new fix applies to modules/product_options/check_options.tpl and turns off some javascript if the item has case quantities.
-Glen
__________________
NO LONGER USING X-CART - NOT ACTIVE IN THESE FORUMS |
|||||||
#9
|
|||||||||
|
|||||||||
Thanks Glen,
I turned in a ticket on this to see if there is a way of doing this without losing X-cart's built-in inventory javascript. Thanks Tony |
|||||||||
#10
|
|||||||
|
|||||||
Re: Case Quantities (ie. 12, 24, 36, etc) in quantity pulldown
Thanks so much for the code. Works a treat.
__________________
X-Cart - 4.0.17 |
|||||||
|
|||
X-Cart forums © 2001-2020
|