CREDIT - modification from the work of xantian15
NEW CHANGES:
Added buttons [+] & [-] to control the quantity by clicking them
jacopo 20 october 2006
NOTES FOR FUTURE UPGRADES:
I belive the javascript on the buttons is not very beautiful, could be better.
Also, now we re-load the entire page for each quantity change. It would be nice to have a AJAX version of it instead.
=====================================================================================
In reference to "Remove Product From Cart Button" it mentions "Auto Qty Update Contrib" which i cannot seem to find.
It says when you install both "remove product from cart button" and "auto qty update" you no longer need the update button.
Well here is my effort at implementing my own qty update contrib. Hope you guys like it, it was a very simple thing todo.
OVERVIEW
========
Enter a quantity inside of the quantity box in the shopping cart. Press enter or select outside of the box.
The shopping cart refreshes using javascript showing the new quantity entered and a new overall shopping cart total.
enjoy!
===================================================================================================
Open file:
shopping_cart.php
Find Lines:
===========
Add After:
==========
----------------------------------------------------------------------------------------------------
Find Lines:
===========
$info_box_contents[$cur_row][] = array('align' => 'center',
'params' => 'class="productListing-data" valign="top"',
'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']));
Replace With:
=============
$info_box_contents[$cur_row][] = array('align' => 'center',
'params' => 'class="productListing-data" valign="top"',
'text' => ''.tep_image(DIR_WS_IMAGES .'minusBtn.gif').''.tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4" onChange="UpdateCartQuantity();" id="qty_'.$products[$i]['id'].'"').''.tep_image(DIR_WS_IMAGES .'plusBtn.gif').''. tep_draw_hidden_field('products_id[]', $products[$i]['id']));
----------------------------------------------------------------------------------------------------
Upload attached buttons images in your default IMAGES directory (usually /IMAGES/)
===================================================================================================
Done!