Friday, January 29, 2010

BANS Cloaking Redirect Fix


Tao has come up with a re-direct fix for US stores for BANS since a few feed parameters changed. You will want to edit both the index.php file and the FrontControl.php file in BANS for this fix to work correctly.

Make sure you back up both these files before making any changes. You can open these up in notepad, but I highly suggest using a code editor like PSPad, I think it is still free and very easy to use. The FrontControl.php file is in the cont folder of your install while the index.php is likely in the root directory unless you installed BANS in a sub directory.

Open both files and scan for this block of code below:

if(($siteType == "US") && ($cloak == "1")){
$front->sid = str_replace("%2B", "+", $front->sid);
$link[$counter] = str_replace("http://rover.ebay.com/rover/1/711-53200-19255-0/1?", "".URL_PATH."/item/", $link[$counter]);
$link[$counter] = str_replace("&mpre=http%3A%2F%2Fcgi.ebay.com%2F", "", $link[$counter]);
$link[$counter] = str_replace("QQcmdZViewItemQQssPageNameZRSS%3AB%3ASRCH%3AUS%3A101", "", $link[$counter]);
$link[$counter] = str_replace("campid=".CJID."", "", $link[$counter]);
$link[$counter] = str_replace("&customid=".$front->sid."", "", $link[$counter]);
$link[$counter] = str_replace("&toolid=10005", "", $link[$counter]);
}


Replace that code with this block of code:

if(($siteType == "US") && ($cloak == "1")){
$itempos = strpos($link[$counter],"item=");
$cloakeditem = substr($link[$counter],$itempos+5,12);
$cloakedtitle = preg_replace("/[^a-zA-Z0-9\s]/", "", $title[$counter]);
$link[$counter] = URL_PATH.'/item/'.str_replace(" ","-",$cloakedtitle)."_W0QQitemZ".$cloakeditem;
}


Save both files back to your hard drive and FTP them back to their appropriate places. You may be prompted to over write the existing files, just say Yes.

Log into your BANS admin and go to settings. Check the cloak option in box 4 and hit save. Reload your BANS site home page and check that an eBay listing URL is indeed cloaked and click it to make sure it redirects properly to the matching listing on eBay.

Related Posts by Categories



3 comments:

Anonymous said...

Thank You this appears to have worked. I will track the EPC now to see if it bounces back. I'm not sure I want to remove cloaking as the site is actually ranking.

Unknown on March 23, 2010 at 3:39 PM said...

thanks for that info,,worked for me!
http://www.epartscar.com

soggy on May 19, 2010 at 8:48 PM said...

You are better off asking that to Tao in the forum.

Dave

Followers

Twitter Updates

    follow me on Twitter
     

    Build A Niche Store Blog. Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted by Bloganol dot com Privacy Policy