Adding Quantity field to Product List Page

How do I add the quantity field to the product list page template so that customers can select the desired quantity before they add it to the cart.


We’re currently awaiting answers ourselves.


I know this is an oldie, but in 1.3.5sp3 /products_pages/buy_now.tpl:


[COLOR=“RoyalBlue”]comment out line 8[/COLOR]


[COLOR=“RoyalBlue”]and after line 21 ( ) add the following:[/COLOR]

{*** Product Qty ***}


{*** /Product Qty ***}

I've only tested this in single list format, although it should work for all. May have to adjust your styles to make it look pretty.

Great stuff, thank you!

Massive thanks baballuci

This edit should provide a better layout

Hey Babalucci,

Many thanks for that script. I am using CS-Cart v2 and am having a few probs with this tho.

Seems it doesn’t like firefox (sometimes only adds in increments of 1) - tho i can livewith that i guess.

The real prob for me is that the label moves ALLLLLL the way to the right of the input box, and even though i defined the input box width as “4”, when the page is published, the box becomes massive and looks pretty bad.

Have you or anyone else had this experience - and if so, any work arounds?


cheers all


i Just answered one of my own questions:

#6e9db7;” />

change the box size here as usual, then change the class from “input-text” to “input-text-short” and hey presto!

In 2.0.4 if you add this code it makes 2 copies of the Quantity box if you click on the product name. Any work around?

I was told by CSCart team for 2.04

Please try to replace the following part of code:

[QUOTE]{include file=“views/products/components/buy_now.tpl” hide_wishlist_button=true hide_compare_list_button=true simple=true show_sku=true hide_add_to_cart_button=$hide_add_to_cart_button but_role=“action”}[/QUOTE]

With this code

[QUOTE]{include file=“views/products/components/buy_now.tpl” hide_wishlist_button=true hide_compare_list_button=true simple=true show_sku=true hide_add_to_cart_button=$hide_add_to_cart_button but_role=“action” show_qty=true}[/QUOTE]

in the “/skins/[CUSTOMER_ACTIVE_SKIN]/customer/views/products/components/products_multicolumns.tpl” file

Hi, I am trying to add the quantity box next to the products so that my customers can enter a quantity they want to add to cart, but am having difficulty. I only want my products listed in 1 column, and have read what the last person posted about replacing the code in multicolums.tpl … but firstly i don’t see this in my .tpl file, and secondly i’m not sure it applies to me as my products aren’t in multicolumns. Also i have the latest version of cs cart. My website is Many thanks

For single column layout, look at products.tpl.


I couldn’t get this to work in 2.07

So I hacked



{if ($product.qty_content || $show_qty) && $product.is_edp !== “Y”}


{if $product.is_edp !== “Y”}

I added the quantity selection field to grid view by adding this to products.grid.tpl:

{assign var=“qty” value=“qty_$obj_id”}


However, this code is formatted to fit nicely on the product details page. It’s too widely spaced for the grid view.

Anyone know how to adjust the, uh, not really sure what to even ask here… The $smarty.capture.$qty style maybe, to make it less wide?

What version?

That’s a fine question. A recent version.

I just installed about a month ago. My upgrade page says: Upgrade 2.0.14 - 2.0.15, but I’m not sure if that means I can upgrade through 2.0.14 and 2.0.15, (meaning I probably have 2.0.13) or if it means I can upgrade 2.0.14 to 2.0.15 (meaning I have 2.0.14).

Sorry for the ignorance. Where should I look?

I may have modded out the version number. Was it in the page footer?