Forums / All Other Contributions/Addons / Newsletter Subscribe + Ultimate SEO not playing together nice in 1.3.7 -- quick fix

Newsletter Subscribe + Ultimate SEO not playing together nice in 1.3.7 -- quick fix

Locked

Views: 1,711

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
20 Feb 2007, 8:02 PM
#1
zberke avatar

zberke

New Zenner

Join Date:
Jul 2005
Posts:
18
Plugin Contributions:
0

Newsletter Subscribe + Ultimate SEO not playing together nice in 1.3.7 -- quick fix

Hi,

I noticed that I couldn't make Newsletter Subscribe play nice with Ultimate SEO on 1.3.7.

Digging a little in the code indicated to me that there was a problem with the POST variables from the Newsletter Subscribe module being lost during the 301 redirect done by the SEO module.

As a quick fix, I selectively disabled the Ulimate SEO redirection for the subscribe and subscribe_confirm pages as follows:

in includes/classes/seo.url.php

change

if ($this->attributes['USE_SEO_REDIRECT'] == 'true'){

to

if ($this->attributes['USE_SEO_REDIRECT'] == 'true' && $_GET[ "main_page" ] != "subscribe" && $_GET[ "main_page" ] != "subscribe_confirm" ){

Anybody want to offer whether this is a decent way to fix this problem?

Thanks,
-Zach

22 Feb 2007, 8:52 AM
#2
zberke avatar

zberke

New Zenner

Join Date:
Jul 2005
Posts:
18
Plugin Contributions:
0

Re: Newsletter Subscribe + Ultimate SEO not playing together nice in 1.3.7 -- quick fix

Continued problems with SEO links...

I wasn't getting redirected to HTTPS when I checked out.
A few others have reported this problem as well: http://www.zen-cart.com/forum/showthread.php?t=54723

I changed the above line to:

if ($this->attributes['USE_SEO_REDIRECT'] == 'true' && $_GET[ "main_page" ] != "subscribe" && $_GET[ "main_page" ] != "subscribe_confirm" && substr( $_GET[ "main_page" ], 0, 8 ) != "checkout" ){

This should work for you whether you use the newsletter subscribe module or not. I make no guarantees that this fix will work in all cases -- please test heavily before deploying.

Thanks,
-Zach