Enabling QTY field on category pages and home page etc

I have a client wanting to add the qty field onto say the featured products on the home page as well as category pages - so the customer can select how many they want before hitting add to cart.



The client will be selling products that customers will always want more than one - and they dont want the customer to have to go to the trouble of viewing the product page in order to select a qty.



Can this field easily be displayed ? If so, how?

I'm in on this question too, and will up it one more.



How do we add (or turn on) the quantity field in a search results list.

There's no option available in the admin to enable this function, it is purely controlled by the template files. Design Mode will help you, I did this just yesterday, takes no more than 5 minutes.

Hi StellarBytes



Would you mind elaborating?

So your Featured Products and Category pages already have the 'Add to Cart' button but don't have the Quantity field, right?



Different product lists use different templates. So the Featured Products template uses a different template than, say, the Category Products list.



Here's what you will need to do to add the Quantity field, if you're literate in HTML/CSS and PHP/Smarty, this should be easy. This is based on the code for the Basic template, your CSS classes may be different in your template.



Enter Design Mode. Locate the template you want to add the Quantity field to. Locate the position you want to add the Quantity field to, which will generally be above the Add to Cart button, so, look for the template which calls the add to cart button template (/buttons/button.tpl). You would want to add the following code before the call for the add to cart button. Make a note of all templates you have altered.


```php


{$quantity_text|default:$lang.qty}:
{if $product.qty_content && $settings.General.inventory_tracking == "Y"}

{assign var="a_name" value="product_amount_`$obj_prefix``$obj_id`"}
{assign var="selected_amount" value=false}
{foreach name="`$a_name`" from=$product.qty_content item="var"}
{$var}
{/foreach}

{else}
{if $settings.Appearance.quantity_changer == "Y"}


{/if}

{if $settings.Appearance.quantity_changer == "Y"}


{/if}
{/if}

```

You will probably need to change the CSS class names and create new CSS classes for these changes, as the 'qty changer' class is already defined for the product page. If you alter these, you will be left with undesired layout changes of the Quantity field on the product page. As I said this is the code used for the product page in the default Basic template, as installed from using the Demo data, I haven't made any changes to it but some parts can be removed as they are irrelevent to your changes (eg. the if statement for 'quick view' - of course it's not, so this if statement isn't needed here).

Unless you know how CS-Cart's templates work, what you're doing, etc, I wouldn't risk doing this as DIY job. In saying that, if you mess it up, you can always go back to the template in Design Mode and click Restore from Repository.

Good luck.

For some reason I cant get the CART BUTTON to show up. Inventory count is more than zero, not sure why it is not show the ADD TO CART button..any HELP?

https://prnt.sc/hlb4uq

For some reason I cant get the CART BUTTON to show up. Inventory count is more than zero, not sure why it is not show the ADD TO CART button..any HELP?

https://prnt.sc/hlb4uq

Hello!

Please could you share the link to this product page?

Hello!

Please could you share the link to this product page?

Here is a category link

https://bti-tool.com/6in.lg-en-2/page-2/

The QTY of this product is more than zero so there should be a "ADD TO CART" button displayed.

Product Link https://bti-tool.com/super-t-driver-1-4-hex-x-7-5-8in.lg-hex-bit-holder-w-quick-release-magnetic-bit-holder-with-bits-not-included.html

Some Products are ok https://bti-tool.com/3-32-short-arm-hex-l-key.html

I think theme you use is too old for your cart version.. Or maybe you got some catalog mode on..

For some reason I cant get the CART BUTTON to show up. Inventory count is more than zero, not sure why it is not show the ADD TO CART button..any HELP?

https://prnt.sc/hlb4uq

It is required to examine issue on your server. I do not see button code in the source code of the mentioned pages

It is required to examine issue on your server. I do not see button code in the source code of the mentioned pages

All fixed ....thanks for the help

All fixed ....thanks for the help

What was the reason?

What was the reason?

Deactivated Catalog Mode...thanks again