Re: I've deleted products. How do I redirect customers to new ones? or to search inst
one more very quick question (sorry!!)
i also need to do this for some image folders which i uploaded as "/images/medium/products/gift cards/" rather than "/images/medium/products/gift_cards/" (had a space instead of underscore
would this be the same method or different?
Re: I've deleted products. How do I redirect customers to new ones? or to search inst
That you must really fix... cannot redirect it
Re: I've deleted products. How do I redirect customers to new ones? or to search inst
yes sorry, i have fixed the folder name on my server and products etc but i am still getting requests for those images and a 404 response, i meant in terms of redirecting them to the correct place rather than them searching for a broken url
Re: I've deleted products. How do I redirect customers to new ones? or to search inst
Hi
Can someone please tell me how to put mulitple product ids in Rewrite condition.
RewriteCond %{QUERY_STRING} products_id=537
RewriteRule (.*) http://www.livvylou.co.uk/$1? [R=301,L]
I am able to get this working for a single product id but dont know how to put multiple product ids in condition.
please help me in getting out of this.
thanks.
Re: I've deleted products. How do I redirect customers to new ones? or to search inst
This part is the query string
products_id=537
So for example changing it to
products_id=
would redirect all product pages.
You must identify a common string that all of the pages you want to redirect share.
~Melanie
Re: I've deleted products. How do I redirect customers to new ones? or to search inst
Quote:
Originally Posted by
mprough
7thVeil, I have edited your code and have some other relevant information and technique regarding this issue here
http://pro-webs.net/blog/2010/03/21/...tock-products/
I have always forced a permanent redirect by hand (ultimate control), but I certainly understand the need for a more large scale dynamic solution. So I edited your code to achieve this.
Cheers,
Melanie
Melanie
I know this is an old post but I am having a similar issue with Sorry, the product was not found. on pages products have been roved I am using:
Zen Cart 1.3.9h
Patch: 1::
Database Patch Level: 1.3.9h
and the solution you gave didn't work in this version. Do you have any suggestions on how to fix this is the version in have mentioned?
Any help would be greatly appreciated.
This is what I am referring to:
How about a more dynamic solution?
In the forum thread we noted earlier, Zenner 7thVeil suggested using a php redirect to move these pages to the category page for their original location. This is an excellent technique for a dynamic solution. The code change supplied by 7thVeil, was very smart, but incomplete as it was returning a 302 in the header. We definitely do not want to return a 302, as this is a temporary redirect, but a permanent headache for your SEO campaign.
So I tweaked his alteration for the following which will send disabled and deleted products to their category page with a permanent 301 redirect. If no category exists they are sent to the product not found page.
In /includes/modules/pages/product_info/main_template_vars.php around line 31 find:
if ( $res->fields['total'] < 1 ) {
Just below this you will see
$tpl_page_body = '/tpl_product_info_noproduct.php';
Replace this line with
$requeststring = (isset($_GET['cPath']))?'&cPath='. (int)$_GET['cPath']:'';
header( "HTTP/1.1 301 Moved Permanently" );
header('location:index.php?main_page=index'.$requeststring);
Remember this is really a very dynamic solution and you are giving up the ultimate control over where this product page url should be sent. There is also the possibility, if you are using a SEO rewrite module, that this tweak will result in a double redirect. This is not a good situation, so if you apply this and the header for the pages is sending a double redirect, or worse, a loop... then this solution is not for you.
Gary
Re: I've deleted products. How do I redirect customers to new ones? or to search inst
Hello
did you find the way to make it work with 1.3.9h?
I tried, it redirects ok but creates a PHP fatal error for the line 188:
$zco_notifier->notify('NOTIFY_MAIN_TEMPLATE_VARS_EXTRA_PRODUCT_INFO');
PHP Warning: require(/my/site/domain.com/includes/templates/custom/templates) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /my/site/domain.com/includes/modules/pages/product_info/main_template_vars.php on line 188
[19-Feb-2012 19:50:27] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'includes/templates/custom/templates' (include_path='.:/usr/local/lib/php') in /my/site/domain.com/includes/modules/pages/product_info/main_template_vars.php on line 188
...