Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

multiple products error


Recommended Posts

Hi All,

I am having a problem when trying to add more than a quantity of 1 product to the cart.


I add a product to the cart and change the "Qty." field to 6 (for example) but the cart will always show as only having 1 of the product.....


I am not sure if this is maybe a cookie issue?


If I continue shopping and then add another of the same product this works and shows in the cart as 2...


Any ideas welcome! =)

Link to comment
Share on other sites

Yep, when you modify quantity or remove items from cart you must press "update" to confirm this action.


It's possible to modify this functionality with a javascript code. Edit shopping_cart.php and add following code


  <script language="javascript">
 function do_update(formi) {


just before "</head>" tag (about line 25)


At next, go to the row (maybe 168...170) where you'll see

                                             'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']));


after text ?size="4"? add there code ?onChange="do_update(this.form);"? so that code will look now just as following:


                                             'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4" onChange="do_update(this.form);"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']));


That's it. When ever you change the value of the quantity it should be updated without clicking "update" button. B)

Link to comment
Share on other sites


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

  • Create New...