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

Qty Removal in product.tpl

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-07-2009, 01:08 AM
 
Freakmode Freakmode is offline
 

X-Adept
  
Join Date: Jun 2003
Location: UK
Posts: 696
 

Default Qty Removal in product.tpl

Hi

Does anyone know how to remove the quantity dropdown from this template?

We use a different product template for a few products (with X-conf) which only adds 1 by default so I need to remove the QTY box as it serves no purpose.

Thanks
__________________
X-Cart 4.7.12 (Live)
Redux Template
CDSEO
Reply With Quote
  #2  
Old 05-07-2009, 06:35 AM
 
Lingerieblowout Lingerieblowout is offline
 

X-Adept
  
Join Date: Sep 2003
Location: Annapolis, MD
Posts: 415
 

Default Re: Qty Removal in product.tpl

have you tried this

<input type="hidden" name="amount" value="1">

Of course you have to remove some code first
__________________
http://www.lingerieblowout.com
Version 4.1.10

http://www.topnichewebsites.com
Version 4.4.5

Michael
Reply With Quote
  #3  
Old 05-07-2009, 06:43 AM
 
Freakmode Freakmode is offline
 

X-Adept
  
Join Date: Jun 2003
Location: UK
Posts: 696
 

Default Re: Qty Removal in product.tpl

Yep got it working now - chunk of code at the top needs ripping out and replacing.

Also managed to remove the "Add to Cart" and "Wishlist" buttons now, so it just shows add to configuration.

Nearly got it looking like we need it.

Thanks again
__________________
X-Cart 4.7.12 (Live)
Redux Template
CDSEO
Reply With Quote
  #4  
Old 05-07-2009, 06:50 AM
 
Lingerieblowout Lingerieblowout is offline
 

X-Adept
  
Join Date: Sep 2003
Location: Annapolis, MD
Posts: 415
 

Default Re: Qty Removal in product.tpl

Good .. I been meaning to write a mod that takes care of displaying or not display based on the adding product page as some folks want it on some products but not others.
__________________
http://www.lingerieblowout.com
Version 4.1.10

http://www.topnichewebsites.com
Version 4.4.5

Michael
Reply With Quote
  #5  
Old 05-07-2009, 07:17 AM
 
Freakmode Freakmode is offline
 

X-Adept
  
Join Date: Jun 2003
Location: UK
Posts: 696
 

Default Re: Qty Removal in product.tpl

I needed it to work with X-configurator.

By default it shows QTY drop down but only adds 1 so there was no need to show it.

Also X-conf added a third button "Add to configuration" below the standard "add to Cart and "Add to Wishlist" buttons which the user is not supposed to click.

Problem is you automatically click on add to cart so they had to go as well. Got it working with the "Multiple product listing" mod from Websitecm.

Works a treat and cheaper than the $200 Qualiteam wanted
__________________
X-Cart 4.7.12 (Live)
Redux Template
CDSEO
Reply With Quote
  #6  
Old 09-29-2009, 06:38 PM
 
digiemp digiemp is offline
 

Senior Member
  
Join Date: Aug 2007
Posts: 192
 

Default Re: Qty Removal in product.tpl

What code, exactly, does one have to remove in order to get this to work?
I can effectively remove the word "Quantity" but the drop down box still remains.
Then I comment out a bit more code and the box jumps to the top of the screen.
I am unsure on what to remove and exactly where to add the code below.

Thanks for your help.

Quote:
Originally Posted by Lingerieblowout
have you tried this

<input type="hidden" name="amount" value="1">

Of course you have to remove some code first
__________________
version 4.4.2
Reply With Quote
  #7  
Old 09-29-2009, 07:03 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Qty Removal in product.tpl

This is the code you need to remove
Code:
<script type="text/javascript"> <!-- var min_avail = {$product.appearance.min_quantity|default:1}; var avail = {$product.appearance.max_quantity|default:1}; var product_avail = {$product.avail|default:"0"}; --> </script> <select id="product_avail" name="amount"{if $active_modules.Product_Options ne '' && ($product_options ne '' || $product_wholesale ne '')} onchange="javascript: check_wholesale(this.value);"{/if}> {section name=quantity loop=$product.appearance.loop_quantity start=$product.appearance.min_quantity} <option value="{%quantity.index%}"{if $smarty.get.quantity eq %quantity.index%} selected="selected"{/if}>{%quantity.index%}</option> {/section} </select>

then put this one instead
Code:
<script type="text/javascript"> <!-- var min_avail = 1; var avail = 1; var product_avail = 1; --> </script> <input type="hidden" name="amount" value="1" />
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following 3 users thank cflsystems for this useful post:
am2003 (01-08-2011), digiemp (09-29-2009), Shehzad (09-14-2010)
  #8  
Old 09-29-2009, 07:44 PM
 
digiemp digiemp is offline
 

Senior Member
  
Join Date: Aug 2007
Posts: 192
 

Default Re: Qty Removal in product.tpl

Worked like a charm, thanks. I suppose I find the same bit of code to remove the Quantity Box from the products list page?
__________________
version 4.4.2
Reply With Quote
  #9  
Old 09-29-2009, 08:08 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Qty Removal in product.tpl

It will be in buy_now.tpl and is siimilar
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #10  
Old 11-30-2010, 02:30 PM
 
artistwantab artistwantab is offline
 

eXpert
  
Join Date: Jul 2009
Posts: 320
 

Default Re: Qty Removal in product.tpl

OK this may seem noobish...but which product.tpl file do I correct.

There is nearly 40 of them....
__________________
X-Cart version 4.7.2
x-special Offers
Reply With Quote
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 02:50 PM.

   

 
X-Cart forums © 2001-2020