![]() |
Remove Quantity on Details Page
I've got one product on the whole site that is used as a Deposit, it's a single item purchase, so I don't need customers selecting quantities.
I'd like to hide the Quantity and the Drop Down. I'm pretty sure I need this: $product.productcode eq 'Deposit' But I don't know where to put it. I've tried putting it on the product_details.tpl but I'm doing something wrong. I've been modifying the common_files version, because I'm using the 3-column template and there's not product_details.tpl in the 3-column folder. |
Re: Remove Quantity on Details Page
If it's not there then it will use the one from common_files. Copy the file to the same place in 3-columns and edit it there. :)
|
Re: Remove Quantity on Details Page
the quantity box code is in buy_now.tpl.
what i did was create a div class around the quantity box called "hidden" with the css code "visibility:hidden". this will keep the quanitiy box there( which is necessary to add to cart) but hides it from view. you can also add a margin-bottom: -30px within the "hidden" css if your worried about the empty space so that that "buy" button moves up the fill the gap. |
Re: Remove Quantity on Details Page
a333,
I removed the Buy Now feature from the site. I'm speaking specifically about the drop down on the product details page. See my current example: http://www.mikeinfinger.com/demos/xcart/Party-Deposit.html The whole quantity section has bee removed with the exception of the 1, which I will probably use your "hidden" css to take care of that. My next problem is after adding it to the cart, they can now change the quantity. I've breifly looked into it, but I cannot figure out which tpl to modify to "hide" the option to increase the quantity, using my if/then statement I should be able to only hide it for the Party. Here is a regular product with the quantity showing: http://www.mikeinfinger.com/demos/xcart/Monster-Caramel-Chocolate-Apple-Cashew.html |
Re: Remove Quantity on Details Page
The template can very depending on the skin, thus please try the "Webmaster mode". It should help locating the proper template.
|
Re: Remove Quantity on Details Page
Thanks Alex, my mod seems to be working well on my 3 Column template. Nice to see you posting ;)
|
Re: Remove Quantity on Details Page
Quote:
can you show your code? |
Re: Remove Quantity on Details Page
Bringing back an old thread of mine with the code.
Modify this file: skin/common_files/customer/main/product_details.tpl The following code removes the SKU # and Quantity Options from the Product Details Page: (I had to take out the first 37 lines because it was to long to post) Code:
<table cellspacing="0" class="product-properties" summary="{$lng.lbl_description|escape}"> |
Re: Remove Quantity on Details Page
In this version, you can see where I started right after the Options Label around line 120. I also disable the SKU #, but that code is not shown. Inserted {if} statements to determine whether or not the $product.productcode = 'Party Deposit1'. If it was, it disabled a warning message and hides of the quantity input and makes it a quantity of 1.
Code:
<tr> |
Re: Remove Quantity on Details Page
I also figured out that if you open /common_files/customer/main/cart.tpl and put {*}around line 77 that it turns off the ability for the customer to change the quantity. I assume there's probably some way to if/then/else it based on the $product.productcode, but I haven't tried it yet. If I figure that out, I'll post it.
Code:
<span class="product-price-text"> On a side note, putting {*} around Line 134 in the cart.tpl hides the "Estimate shipping" link in the Cart. Code:
{*{include file="customer/main/shipping_estimator.tpl"}*} |
Re: Remove Quantity on Details Page
1 Attachment(s)
So I did a little more playing around with another site I have.
In the following code, notice I perform an if/then/else on the $product.productid eq 90. 90 is the Product ID for Party Deposit and it hides the multiplier options for just the Party Deposit. (see attachment) I've been trying to figure this out for MONTHS! Oh well...Done now. Code:
<span class="product-price-text"> |
Re: Remove Quantity on Details Page
Remove the quantity Modifier from the Mini Cart was my next goal, so here it is.
Open the /common_files/customer/minicart.tpl file. On line 54 put a {* at the begin of that line and on line 67 put *} after the "=" sign. In order to turn this off on a per product basis, use the following code and change as needed. Starting at line 52: Notice the use of the Does Not Equal "!=". Code:
{else} |
All times are GMT -8. The time now is 02:59 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.