View Single Post
  #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