
Originally Posted by
diamond1
No, the first white page code, the second does not change anything forever
<href="https://mozit:8890/index.php?main_page=index&cPath=">
In this:
Code:
$productlink = zen_href_link(zen_get_info_page($products_id), 'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : $_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev(zen_get_products_category_id($products_id)) . '&products_id=' . $products_id));
$cPath_new = 'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : $_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev(zen_get_products_category_id($products_id));
// strip out 0_ from top level cats
$cPath_new = str_replace('=0_', '=', $cPath_new);
$showmorelink = zen_href_link(FILENAME_DEFAULT, $cPath_new);
Remove the extra parentheses (highlighted above):
Code:
$productlink = zen_href_link(zen_get_info_page($products_id), 'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : $_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev(zen_get_products_category_id($products_id)) . '&products_id=' . $products_id));
$cPath_new = 'cPath=' . ($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : $_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev(zen_get_products_category_id($products_id));
// strip out 0_ from top level cats
$cPath_new = str_replace('=0_', '=', $cPath_new);
$showmorelink = zen_href_link(FILENAME_DEFAULT, $cPath_new);
Thought that before, the use of $cPath provided a result? Ohh, sorry: it was $cpath instead as shown here:

Originally Posted by
diamond1
I have another problem, I have a slide in the home that takes the product id from the db, if I read the source code I notice that the link of the category or the product link is not generated by ceon uri I products = id etc. clicking does a normal thing, but SEOs have links on the page with rederict 301 is not the best. How can I do to generate the correct links without cpath etc.
Code:
$productlink=HTTP_SERVER . DIR_WS_CATALOG.'index.php?main_page=product_info&cPath='.$cpath.'&products_id='.$products_id;
$showmorelink=HTTP_SERVER . DIR_WS_CATALOG.'index.php?main_page=index&cPath='.$cpath;
<a href="<?php echo $productlink; ?>"><span class="a-btn-text">Buy now</span></a>
<a href="<?php echo $showmorelink; ?>"><span class="a-btn-slide-text">More</span></a>
So the second "form" could be:
Code:
$productlink = zen_href_link(zen_get_info_page($products_id), 'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : $_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev(zen_get_products_category_id($products_id)) . '&products_id=' . $products_id));
$cPath_new = 'cPath=' . $cpath;
// strip out 0_ from top level cats
$cPath_new = str_replace('=0_', '=', $cPath_new);
$showmorelink = zen_href_link(FILENAME_DEFAULT, $cPath_new);
Bookmarks