Sorry for the slow reply, JimmyX. I hope you already got it going, if not ...
You really just need to open up the tpl_product_info_display.php file and have a look at it. Because the changes you need to make are all commented on in there. Basically open up your tpl_product_info_display.php and open the editcart tpl_product_info_display.php and compare them as instructed in the read me.
Anyway, here is a step by step guide:
Comment out (or delete) the lines between
<!--bof Form start--> and
<!--bof Form end-->
in your file.
Then in place of them, ie between the bof Form tags, add the code from my file. So it will look like :
<!--bof Form start-->
//add Justin Edit_Cart Mod 20080224
if(is_numeric($_GET['products_id'])) {
$cartAction="add_product";
}else{
$cartAction = "edit_product_in_cart";
}
echo zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params(array('action')) . 'action=' . $cartAction), 'post', 'enctype="multipart/form-data"') . "\n";
//end of add Justin Edit_Cart Mod 20080224
?>
<!--bof Form end-->
Then go a little further down the file, and find this line
if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
Comment (or delete) that line and all subsequent lines until , but NOT including the next
} else {
Then just above that , [add these lines
if ($products_qty_box_status == 0 or $products_quantity_order_max== 1 or (! is_numeric($_GET['products_id'])) ) {
//Edit Justin replaced the $the_button with a new def. that supports editing, 20071120
//if the item being displayed was referred here from the cart, we are in edit mode
if (! is_numeric($_GET['products_id'])){
//establish quantity of product in cart
$existing_quantity=$_SESSION['cart']->get_quantity($_GET['products_id']);
//make the edit button
$the_button = '<input type="hidden" name="cart_quantity" value="' . $existing_quantity . '" />' .
zen_draw_hidden_field('products_id', (int)$_GET['products_id']) .
zen_draw_hidden_field('edit_item_id', $_GET['products_id']) .
zen_image_submit(BUTTON_IMAGE_EDIT_CART_CONTENTS, BUTTON_IMAGE_EDIT_CART_CONTENTS_ALT);
//If we were not referred from cart, we are not in edit mode
}else{
// hide the quantity box and default to 1
$the_button = '<input type="hidden" name="cart_quantity" value="1" />' .
zen_draw_hidden_field('products_id', (int)$_GET['products_id']) .
zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
}
And you are all done! I hope it is helpful.
Justin