In Edit_Cart_v2_For_ZCv150, tpl_product_info_display.php must be edited as follows (highlights in red):
Code:
// bof Edit_Cart 150 Justin - Part 1
// What follows is the old code. You need to replace or comment this section, and add the "Edit Cart" code just below it.
/*
echo zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product'), 'post', 'enctype="multipart/form-data"') . "\n";
*/
//This bit contributed by Damian Taylor, makes the SEO mod CEON URI work with "Edit Cart"
if($_SERVER['QUERY_STRING'][0] == ':') {
$_GET['products_id'] = $_GET['products_id'] . $_SERVER['QUERY_STRING'];
}
//This bit looks at the product id param and if it is not a simple number like "121", but a big string like "52:96f247828566a562a4e8de1552a48c65" diverts form action to "Edit Cart"
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";
// eof Edit_Cart 150 Justin - Part 1
However in Edit_Cart 2.03, my tpl_product_info_display.php looks like this:
Code:
// bof Edit_Cart 2.03 Justin - Part 1
// What follows is the old code. You need to replace or comment this section, and add the "Edit Cart" code just below it.
/*
echo zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product'), 'post', 'enctype="multipart/form-data"') . "\n";
*/
//This bit contributed by Damian Taylor, makes the SEO mod CEON URI work with "Edit Cart"
if($_SERVER['QUERY_STRING'][0] == ':') {
$_GET['products_id'] = $_GET['products_id'] . $_SERVER['QUERY_STRING'];
}
//This bit looks at the product id param and if it is not a simple number like "121", but a big string like "52:96f247828566a562a4e8de1552a48c65" diverts form action to "Edit Cart"
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, $request_type), 'post', 'enctype="multipart/form-data"') . "\n";
// eof Edit_Cart 2.03 Justin Part One
Question:
In Edit_Cart 150, should the line
Code:
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";
be replaced with
Code:
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, $request_type), 'post', 'enctype="multipart/form-data"') . "\n";
Alternatively, should the preceding lines
Code:
if(is_numeric($_GET['products_id'])) {
$cartAction="add_product";
}else{
$cartAction = "edit_product_in_cart";
}
be replaced with (or something like)
Code:
if(is_numeric($_GET['products_id'])) {
$cartAction="add_product, $request_type";
}else{
$cartAction = "edit_product_in_cart";
}
Thanks in advance
Bookmarks