Removing the Quantity field from the block

Hi all i have a general donation block in the main page it is a field that the donor can put the amount of money he want to donate



and i feel that the Quantity field at the bottom is confusing so i try to edit the template to remove it and not appear in the block so any help for that



i already duplicate ( sidebox_general.tpl ) but did not know how to edit it



/skins/computer_shop/customer/blocks/wrappers/sidebox_general.tpl

Screen shot 2011-07-12 at 4.23.26 PM.png

[quote name=‘majed’ timestamp=‘1310477299’ post=‘117036’]

Hi all i have a general donation block in the main page it is a field that the donor can put the amount of money he want to donate



and i feel that the Quantity field at the bottom is confusing so i try to edit the template to remove it and not appear in the block so any help for that



i already duplicate ( sidebox_general.tpl ) but did not know how to edit it



/skins/computer_shop/customer/blocks/wrappers/sidebox_general.tpl

[/quote]



I dont think you can remove the qantity field for individual products, as

the template you are using to have a product in a box is the template for

all products.



One option would be to remove the quantity field for all products, as in the

screens below.



But this would depend on what you sell, if people generally just buy one

of an item it would be fine, if people usually but more of a item they still can

but will need to change the quantity in the cart, could be cofusing to some.



As stated yours will look the same, as it uses the same files but in a box.



View of product from category





View from main procuct page





I cart people can still change product quantity for other products







To do this edit the followig files

blocks/product_list_templates/products.tpl

on line 17 change

show_qty=true
```<br />
to<br />
```php
show_qty=false
```<br />
<br />
and in views/products/view.tpl<br />
on line 10 change<br />
```php
{include file=$product.product_id|fn_get_product_details_layout product=$product show_sku=true show_rating=true show_old_price=true show_price=true show_list_discount=true show_clean_price=true details_page=true show_discount_label=true show_product_amount=true show_product_options=true hide_form=$smarty.capture.val_hide_form show_qty=true min_qty=true show_edp=true show_add_to_cart=true show_list_buttons=true but_role="action" capture_buttons=$smarty.capture.val_capture_buttons capture_options_vs_qty=$smarty.capture.val_capture_options_vs_qty separate_buttons=$smarty.capture.val_separate_buttons show_add_to_cart=true show_list_buttons=true but_role="action" block_width=true no_ajax=$smarty.capture.val_no_ajax}
```<br />
to<br />
```php
{include file=$product.product_id|fn_get_product_details_layout product=$product show_sku=true show_rating=true show_old_price=true show_price=true show_list_discount=true show_clean_price=true details_page=true show_discount_label=true show_product_amount=true show_product_options=true hide_form=$smarty.capture.val_hide_form show_qty=false min_qty=true show_edp=true show_add_to_cart=true show_list_buttons=true but_role="action" capture_buttons=$smarty.capture.val_capture_buttons capture_options_vs_qty=$smarty.capture.val_capture_options_vs_qty separate_buttons=$smarty.capture.val_separate_buttons show_add_to_cart=true show_list_buttons=true but_role="action" block_width=true no_ajax=$smarty.capture.val_no_ajax}
```<br />
<br />
As stated this will remove the quatity field from all products.<br />
<br />
But will still allow the product quantity to be changed in the cart.<br />
<br />
Im new to cs-cart so somebody with more knowledge may be able to point<br />
out a different *better* way to do it.<br />
<br />
<br />
Edit......<br />
<br />
after a bit of a play around you could just do the first bit from above<br />
as I doubt may would click through to the actual doatit product main page.<br />
<br />
This would stop the confusion with other 'proper' products not having a quantity <br />
field on theie main pages<br />
<br />
So just do<br />
blocks/product_list_templates/products.tpl<br />
on line 17 change<br />
```php
show_qty=true
```<br />
to<br />
```php
show_qty=false
```<br />
<br />
This will just remove the quatity field as in screenshot 1 above<br />
and in a block you will be left whats below, but without the other options<br />
I have activated on my cart, the returns and points etc<br />
![](upload://dQ1schnTqbBPH8zWX6ndcvppSQk.jpeg)<br />
<br />
On proper products you will still have the quantity field removed when somebody<br />
clicks on a category like below<br />
![](upload://mp3bCgql9c2vaD4pWB897yyFudL.jpeg)<br />
<br />
but if they click trough to the main product page there will still be a quatity box<br />
<br />
See the screen below, this is the view form a main product page, but with a block <br />
like you want added to the top like you want just to show what im rambling on about<br />
![](upload://9kevpIJKlj3Ldp0j2oT09PRubr0.jpeg)

I know its way to old form but still I thought it might be useful for some.





just use



.qty {

display: none;

}



It will hide of the field.