![]() |
Changing or Hiding the Product Quantity Pull-Down Menu
Need some guidance on how to change (X-Cart 4.6.1), the pull-down for the Quantity from 1,2,3,4,5,..... to {5,10,15,20,25,30} or just to hide this field.
Option 1) I know how to limit to 6 values using the settings. Just not clear on how to change the actual values. Option 2) Alternatively, we setup a product variant for price-modifiers and set the Quantity field to display 1 value (when we tried 0 x-cart did not let us). But it looks awkward to have Quantity: 5,10,15,20,25,30 and then Quantity:1 underneath; So is there a way to just hide this field. thanks. |
Re: Changing or Hiding the Product Quantity Pull-Down Menu
What is the product? Can you just name it something like "Beer (pack of 5 cans)" and let the qty be 1, 2, 3...?
|
Re: Changing or Hiding the Product Quantity Pull-Down Menu
Quote:
No. There are many places in commerce where you are only selling one of an item with options... And the BEST thing to do is not confuse the customer. My site has a few products that I only want to sell "one" - with options... so... In file, /skin/<your_skin>/customer/main/product_details.tpl FIND where the quantity is set, and surround it with: {if $product.productid eq '1' or $product.productid eq '2'} <div style="visibility: hidden;"> {/if} *** quantity code *** {if $product.productid eq '1' or $product.productid eq '2'} </div> {/if} visibility:hidden; maintains the page layout and structure. vs. display:none; which makes the content disappear. THE PROBLEM with this solution: some xcart templates INSIST on using table code. SO you will need to bust out the table code to use css visibility/display. If you only have a few products to hide the qty pulldown, this works -- else, custom coding will probably be needed. |
Re: Changing or Hiding the Product Quantity Pull-Down Menu
This is where and way html5 is the way to go but XC is still being released with html4, and QTs modules are html4, full of tables, etc
With html5 you can set the step for the dropdown so there is very little to change in code if it has to be product specific. You can set first option in a dropdown to be "please select" and be mandatory without any coding and without any js code and checking.... There is so much more .... You can try using the html5 coding for the dropdown although it may not work as expected with the whole page being html5 |
All times are GMT -8. The time now is 01:19 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.