Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Upgrading X-Cart 4.1.9 to 4.1.12 with CDSEO

 
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4
 
Thread Tools
  #1  
Old 06-05-2009, 02:33 PM
  Jayk's Avatar 
Jayk Jayk is offline
 

eXpert
  
Join Date: Nov 2003
Location: Calgary, Alberta, Canada
Posts: 333
 

Default Upgrading X-Cart 4.1.9 to 4.1.12 with CDSEO

I posted this over at the WebsiteCM forum, but I'm thinking I should have posted here in the first place as it will probably get seen by more sets of eyes.

I am running a version of CDSEO Links from prior to the release of CDSEO Pro. I'm currently upgrading my cart from X-Cart Gold 4.1.9 to 4.1.12.

In merging the auth.php file, I'm having a bit of trouble with one spot of CDSEO code as there has been a bit of a change in the original X-Cart code.

The particular section has moved to using a conditional operator "?:" and I'm not sure how to merge in the CDSEO code. I've looked at the original 4.1.9 code, the 4.1.9 code with CDSEO Links added, and the 4.1.12 code and I definitely need a little help.

Here is the snippet of code from the stock 4.1.9 auth.php file:

Code:
if ($js_enabled == "Y") { $qry_string = ereg_replace("(&*)js=y", "", $QUERY_STRING); $js_update_link = $PHP_SELF."?".($qry_string?"$qry_string&":"")."js=n"; } else { $qry_string = ereg_replace("(&*)js=n", "", $QUERY_STRING); $js_update_link = $PHP_SELF."?".($qry_string?"$qry_string&":"")."js=y"; }

Here is the 4.1.9 snippet (CDSEO code already in) from the auth.php file:

Code:
if ($js_enabled == "Y") { $qry_string = ereg_replace("(&*)js=y", "", $QUERY_STRING); if ($cat != "" || $productid != "") { $js_update_link = $PHP_SELF."?".($qry_string?"$qry_string&":"")."js=n"; } else { // WebsiteCM - CDSEO Compatible $wcm_qs = "?" . $QUERY_STRING; $wcm_url = str_replace($wcm_qs,"",$_SERVER['REQUEST_URI']); $js_update_link = $wcm_url."?".($qry_string?"$qry_string&":"")."js=n"; } } else { $qry_string = ereg_replace("(&*)js=n", "", $QUERY_STRING); if ($cat != "" || $productid != "") { $js_update_link = $PHP_SELF."?".($qry_string?"$qry_string&":"")."js=y"; } else { // WebsiteCM - CDSEO Compatible $wcm_qs = "?" . $QUERY_STRING; $wcm_url = str_replace($wcm_qs,"",$_SERVER['REQUEST_URI']); $js_update_link = $wcm_url."?".($qry_string?"$qry_string&":"")."js=y"; } }

Here is the snippet of code from the stock 4.1.12 auth.php file:

Code:
$qry_string = func_qs_remove($QUERY_STRING, "js"); if ($qry_string) $qry_string .= "&"; $js_update_link = basename($PHP_SELF) . "?" . $qry_string . "js=" . ($js_enabled == "Y" ? "n" : "y"); unset($qry_string);

Can anyone give me some guidance or post the snippet from their modified 4.1.12 auth.php file? This is the only file I have left to patch and then I can go live with 4.1.12.

Thanks,
Jason
__________________
X-Cart Gold 4.4.3
Blog: www.flashinthepan.ca
Reply With Quote
  #2  
Old 06-05-2009, 10:37 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default Re: Upgrading X-Cart 4.1.9 to 4.1.12 with CDSEO

I'd highly recommend upgrading to CDSEO Pro:
http://www.x-cart-seo.com/cdseo-pro-for-x-cart/cdseo-basic-vs-pro.php

This should work:

Code:
$qry_string = func_qs_remove($QUERY_STRING, "js"); if ($qry_string) $qry_string .= "&"; // WebsiteCM - CDSEO Compatible $wcm_url = str_replace('?' . $QUERY_STRING,'',$_SERVER['REQUEST_URI']); $js_update_link = $wcm_url . "?" . $qry_string . "js=" . ($js_enabled == "Y" ? "n" : "y"); unset($qry_string);
Reply With Quote

The following user thanks Jon for this useful post:
Jayk (06-12-2009)
  #3  
Old 06-09-2009, 12:51 PM
  Jayk's Avatar 
Jayk Jayk is offline
 

eXpert
  
Join Date: Nov 2003
Location: Calgary, Alberta, Canada
Posts: 333
 

Default Re: Upgrading X-Cart 4.1.9 to 4.1.12 with CDSEO

Thanks for the update Jon. I finished my upgrade to 4.1.12 today and all seems to be running smoothly.

Plans are in the works for us to upgrade to CDSEO Pro. The budget is just a little tight right now with the economy being what it is.

Thanks again,
Jason
__________________
X-Cart Gold 4.4.3
Blog: www.flashinthepan.ca
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:36 PM.

   

 
X-Cart forums © 2001-2020