Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Add Quantity Box to Products List


Guest

Recommended Posts

:blink: Hello... Hoping someone can help and thinking there is probably a quick solution.

 

On the instructions to "add Quantity Box to Products Page": On the products_info.php page I am unable to find as instructed this code:

 

<td class="main" align="right"><?php echo osc_draw_hidden_field('products_id', $Qproduct_info->valueInt['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>

 

But was only able to find this code which seems nearly to match:

 

<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>

 

However, when I input the required: <input type=text" name="quantity" value="1" maxlength="2" size=2"> before the </td> as instructed. The box shows up nicely next to the add to cart button, however, the result is when an item is added to the cart, and add to cart is pressed, the quantity in the cart ends up being the actual number product id for the product and not the quantity entered to purchase.

 

I was also instructed to find the following code in includes\application_top.php around line 143:

 

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

 

Which I am also unable to find. I did find a variation with $HTTP_POST_VARS code...

 

Thank you in advance for your guidance.

 

Tamara

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...