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

Changing or Hiding the Product Quantity Pull-Down Menu

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-09-2013, 04:18 PM
 
admin@goldburs.com admin@goldburs.com is offline
 

Newbie
  
Join Date: Jan 2008
Posts: 3
 

Default 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.
__________________
GoldBurs Admin
X-Cart DB Version: 4.6.1
Reply With Quote
  #2  
Old 11-10-2013, 09:24 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default 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...?
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #3  
Old 11-11-2013, 04:04 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Changing or Hiding the Product Quantity Pull-Down Menu

Quote:
Originally Posted by qualiteam
What is the product? Can you just name it something like "Beer (pack of 5 cans)" and let the qty be 1, 2, 3...?

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.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote

The following user thanks carpeperdiem for this useful post:
qualiteam (11-11-2013)
  #4  
Old 11-11-2013, 04:27 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default 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
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following user thanks cflsystems for this useful post:
qualiteam (11-11-2013)
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 11:10 AM.

   

 
X-Cart forums © 2001-2020