Re: Ceon URI Mapping v4.x
To maximize the possible operation, I think this will accomplsh what was requested:
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['cPath'];
// strip out 0_ from top level cats
$cPath_new = str_replace('=0_', '=', $cPath_new);
$showmorelink = zen_href_link(FILENAME_DEFAULT, $cPath_new);
Re: Ceon URI Mapping v4.x
I should not get a white page.
Re: Ceon URI Mapping v4.x
Quote:
Originally Posted by
mc12345678
To maximize the possible operation, I think this will accomplsh what was requested:
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['cPath'];
// strip out 0_ from top level cats
$cPath_new = str_replace('=0_', '=', $cPath_new);
$showmorelink = zen_href_link(FILENAME_DEFAULT, $cPath_new);
A closing parenthesis was missing from the first line:
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['cPath'];
// strip out 0_ from top level cats
$cPath_new = str_replace('=0_', '=', $cPath_new);
$showmorelink = zen_href_link(FILENAME_DEFAULT, $cPath_new);
In the future, please remember that a blank screen will more than likely have generated a myDebug log in the logs folder as identified in this FAQ: https://www.zen-cart.com/content.php?124-blank-page
Re: Ceon URI Mapping v4.x
No
it remains as it does before but does not show rewriting
<a href="https://mozit:8890/index.php?main_page=product_info&cPath=7&products_id=33"><span class="a-btn-text">Buy</span></a> <a href="https://mozit:8890/index.php?main_page=index&cPath=7"><span class="a-btn-slide-text">More</span></a>
Re: Ceon URI Mapping v4.x
Sorry I made a mistake for the product, but for the category I get it
<href="https://mozit:8890/index.php?main_page=index&cPath=">
Re: Ceon URI Mapping v4.x
Quote:
Originally Posted by
diamond1
Sorry I made a mistake for the product, but for the category I get it
<href="https://mozit:8890/index.php?main_page=index&cPath=">
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);
Or:
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);
Re: Ceon URI Mapping v4.x
No, the first white page code, the second does not change anything forever
<href="https://mozit:8890/index.php?main_page=index&cPath=">
Re: Ceon URI Mapping v4.x
Quote:
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:
Quote:
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);
Re: Ceon URI Mapping v4.x
now it works perfectly with the second, you've been very kind thanks thanks
Re: Ceon URI Mapping v4.x
Hi,
I was about to install CEON URI into a zc155e and came here to confirm there were no conflicts. I read thru the conversation about breadcrumb issues and would prefer to avoid them.
I have two questions. First, both Torvista and MC supply github links... which should I use?
Second, Torvista's version is updated for php7 but I'm still running v5.5.38. Am I out of luck or is the php 7 version backwards compatible?