Hello,
This is a patch made using diff
, you can apply it by invoking the patch
command (provided you have a shell access to your hosting) or by patching it by hand : the line begining with a +
need to be added, the first number after @@
indicates the line number, you should recognize the other lines.
François.
Please do not forget to mark it resolved if this is the case !
Hi,
Thanks a lot, but this doesn’t help in my case.
I’m confident that I do it right but somehow its brakes the page (without redirecting to the shop). Any idea why this happens?
Thanks!
Hi,
Do you created a /blog (or similar) directory in your PrestaShpop base installation directory ? or the inverse (a /shop in your WordPress base installation directory ?
François.
Hi,
both my blog and prestashop have separate sub-folders on my server:
http://www.website.com/test
http://www.website.com/shop
later I’ll be moving the website probably into the root directory of the server.
Your suggestion is that this structure is not sufficient?
Thank you for the help!
Bonjour,
Generally, the blog is on / and the shop /shop (for example) or the shop in / and the blog in /blog.
You can of course put each software in a separate directory, but what do you to be displayed in / ? maybe a redirection to one of the homepage of one software ?
For your configuration, you should configure PrestaShop Integration with relative path = ../shop and you should apply the patch above to avoid the redirection.
François.
Indeed, currently on / is an old site which will be replaced soon.
– This is what I’m trying to do, I already set the path to ../shop
but the patch part doesn’t work.
Thanks
Ok, there could be another “bug” in PrestaShop trying to redirect the page, which has not been detected by me.
I can investigate provided you have SSH access : please mail me to contact at aytechnet.fr for asking my SSH public key you will have to put in your .ssh/authorized_keys
Thanks.
François.
Hi, I will connect you to a developer specialist on my side
because I cannot configure SSH access myself.
Thank you.
Hi, did you manage to fix your problem ? Can you update this thread please ?
François.
Pictures do not work, plugin sets the path for this from the blog and should leave stores path
Please post in only one thread. François.
Hi and excuse for my poor english.
I have followed your step and instructions to patch Shop.php.
This is now my file (part of it):
// Hmm there is something really bad in your Prestashop !
if (!Validate::isLoadedObject($default_shop))
throw new PrestaShopException('Shop not found');
if (defined('PRESTASHOP_INTEGRATION_VERSION')) {
$shop = $default_shop;
} else {
$params = $_GET;
unset($params['id_shop']);
if (!Configuration::get('PS_REWRITING_SETTINGS'))
$url = 'http://'.$default_shop->domain.$default_shop->getBaseURI().'index.php?'.http_build_query($params);
else
{
// Catch url with subdomain "www"
if (strpos($default_shop->domain, 'www.') === 0 && 'www.'.$_SERVER['HTTP_HOST'] === $default_shop->domain
|| $_SERVER['HTTP_HOST'] === 'www.'.$default_shop->domain)
$uri = $default_shop->domain.$_SERVER['REQUEST_URI'];
else
$uri = $default_shop->domain.$default_shop->getBaseURI();
if (count($params))
$url = 'http://'.$uri.'?'.http_build_query($params);
else
$url = 'http://'.$uri;
}
header('location: '.$url);
exit;
}}
}
But it doesn’t work.
WordPress (in root) redirect me in prestashop (subdirectory).
Why ? Could you help me?
Thanks
Hi,
If you use a recent browser it could be normal : make sure any cache are cleaned (especially redirection cache) as 301 redirection may be cached.
François.
it’s not a cache problem, because if i deactivate the plugin the root directory works correctly.
Any idea?