Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

quantity box in product_info.php


npn2531

Recommended Posts

In my older modified OSCommerce shopping cart I had a quantity box you could fill out before you added the item to the cart in product_info.php for every product. I don't see this in a vanilla install. Is this a contribution or something I am missing in the admin configuration? I see a couple of contributions to add a quantity box to the includes/modules/product_listing.php, but I had it on every product page in product_info.php.

 

Thanks

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

Hey George,

 

That's not a standard osC feature, it is a contribution.

 

I have tried a few with no success except this one - Product Quantity Drop Down Box in Product Info V1.2.

 

It is a drop-down box with a maximum according to available stock qty.

 

I tried editing to change from a drop-down to a textbox according to the contrib update - didn't work. sad.gif

 

- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

In my older modified OSCommerce shopping cart I had a quantity box you could fill out before you added the item to the cart in product_info.php for every product. I don't see this in a vanilla install. Is this a contribution or something I am missing in the admin configuration? I see a couple of contributions to add a quantity box to the includes/modules/product_listing.php, but I had it on every product page in product_info.php.

 

Thanks

I installed price_break 1.11.2 years ago on a wholesale site. It was kinda hard due to having to merge code with header tags. But anyway, part of this mod added a quantity box on the product listing page. The entire mod may be more than you need, but it would show how to add the box.

 

Tim

Link to comment
Share on other sites

I found this:

 

http://www.oscommerce.info/kb/osCommerce/General_Information/Tips_and_Tricks/246

 

and rewrote it for the new version of OSCommerce:

 

to add the quantity box you only needed to do this:

 

in application_top

 

change

$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']); 

to:

 $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+$HTTP_POST_VARS['cart_quantity'], $HTTP_POST_VARS['id']);

 

and add this to product_info.php:

 

<input type="text" name="cart_quantity" value="1" maxlength="2" size="2">

 

I have posted it as a 'tips and tricks' here:

 

http://www.oscommerce.com/forums/topic/357500-add-a-quantity-box-to-the-products-page-in-two-easy-steps/

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...