Zen Cart Logo
Forums / General Questions / Failing redirects

Failing redirects

Views: 695

Results 1 to 7 of 7
14 Oct 2015, 1:16 PM
#1
limey avatar

limey

New Zenner

Join Date:
Dec 2005
Posts:
44
Plugin Contributions:
0

Failing redirects

I've updated a site from 1.5.1 to 1.5.4, installed a new responsive template (Stirling Grand - thanks Anne) and almost everything is fine. The product URL on the bottom of each product page on the old site still connects successfully to the external research site, but the equivalent on the new one fails - and I'm stumped.

Example

Old site. ZC 1.5.1 - http://www.considera.co.uk/hx/index.php?main_page=product_info&cPath=82_3_80&products_id=362

New site ZC1.5.4 - http://www.considera.co.uk/hxx/index.php?main_page=product_info&cPath=82_3_80&products_id=362

php 5.3.7
No debug footprint found
Both old and new sites are on the same host and server
Upgraded following the instructions (I think)

Thanks

Mark

14 Oct 2015, 1:52 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Failing redirects

I'm having difficulties at the moment finding the related post, but there were changes made in ZC 1.5.4 that modified how the product uri was generated/formatted. This change occurred in the header_php.php file for the product related pages. I know lat9 posted it and I commented on it at one point.

Regardless of that, I would suggest reviewing the templates forum and/or posting there. It may be related to the upgrade or the installation of the template.

14 Oct 2015, 1:53 PM
#3
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,081
Plugin Contributions:
56

Re: Failing redirects

The products URL display interface underwent an interface change in Zen Cart v1.5.3; I'm guessing that your template wasn't updated to support that new interface.

14 Oct 2015, 2:07 PM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Failing redirects

Okay, I stand corrected: change occurred in ZC 1.5.3 not 1.5.4 as I incorrectly stated above.

14 Oct 2015, 2:12 PM
#5
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,081
Plugin Contributions:
56

Re: Failing redirects

You can look in your template's tpl_product_info_display.php for

<!--bof Product URL -->
<?php
  if (zen_not_null($products_url)) {
    if ($flag_show_product_info_url == 1) {
?>
    <p id="productInfoLink" class="productGeneral centeredContent"><?php echo sprintf(TEXT_MORE_INFORMATION, zen_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($products_url), 'NONSSL', true, false)); ?></p>
<?php
    } // $flag_show_product_info_url
  }
?>
<!--eof Product URL -->

and make the following changes

<!--bof Product URL -->
<?php
  if (zen_not_null($products_url)) {
    if ($flag_show_product_info_url == 1) {
?>
    <p id="productInfoLink" class="productGeneral centeredContent"><?php echo sprintf(TEXT_MORE_INFORMATION, zen_href_link(FILENAME_REDIRECT, [B]'action=product&products_id=' . zen_output_string_protected($_GET['products_id'])[/B], 'NONSSL', true, false)); ?></p>
<?php
    } // $flag_show_product_info_url
  }
?>
<!--eof Product URL -->
14 Oct 2015, 2:13 PM
#6
limey avatar

limey

New Zenner

Join Date:
Dec 2005
Posts:
44
Plugin Contributions:
0

Re: Failing redirects

Yup - that did it. I found the template_default version of tpl_product_info_display.php and from about line 211 copied:

<!--bof Product URL in default template --> <?php if (zen_not_null($products_url)) { if ($flag_show_product_info_url == 1) { ?>
<p id="productInfoLink" class="productGeneral centeredContent"><?php echo sprintf(TEXT_MORE_INFORMATION, zen_href_link(FILENAME_REDIRECT, 'action=product&products_id=' . zen_output_string_protected($_GET['products_id']), 'NONSSL', true, false)); ?></p>
<?php } // $flag_show_product_info_url } ?> <!--eof Product URL -->

I then pasted it into the Stirling Grand tpl_product_info_display.php at around line 260 to replace

<!--bof Product URL as per Stirling Grand --> <?php if (zen_not_null($products_url)) { if ($flag_show_product_info_url == 1) { ?>
<p id="productInfoLink" class="productGeneral centeredContent"><?php echo sprintf(TEXT_MORE_INFORMATION, zen_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($products_url), 'NONSSL', true, false)); ?></p>
<?php } // $flag_show_product_info_url } ?> <!--eof Product URL -->

Thanks to you both for your rapid and on-the-nose attention

Mark

14 Oct 2015, 2:13 PM
#7
limey avatar

limey

New Zenner

Join Date:
Dec 2005
Posts:
44
Plugin Contributions:
0

Re: Failing redirects

And you beat me to that too ... nuf spect and thanks - Mark