WordPress.org

Ready to get started?Download WordPress

Forums

PrestaShop Integration
[resolved] Redirection URL (19 posts)

  1. Prestance Design
    Member
    Posted 1 year ago #

    Hi François,

    Bravo pour cette extension et merci pour cette mise à jour
    compatible avec Prestashop 1.5.
    Je suis justement en train de tester avec la dernière version de Prestashop (1.5.3.1) que j'ai installé dans un sous-dossier "shop/".
    http://localhost/shop/
    Wordpress est à la racine.

    Une fois configuré, quand je veux accéder à WordPress http://localhost/ il y a une redirection automatique vers http://localhost/shop/ (la page index de Prestashop).

    Est-ce possible avec cette configuration ou seul l'inverse fonctionne, mettre wordpress dans un sous-dossier ?

    Au plaisir de vous lire.

    http://wordpress.org/extend/plugins/prestashop-integration/

  2. aytechnet
    Member
    Plugin Author

    Posted 1 year ago #

    Bonjour,

    La redirection n'est pas normale du tout, vous devez avoir laissé un .htaccess ou un cache dans le navigateur (IE9 ?). Videz le cache et revérifiez.

    Normalement, WordPress doit pouvoir fonctionner en racine ou l'inverse PrestaShop, faites attentions aux cookies de PrestaShop lorsque WordPress est à la racine (car sinon le panier est perdu car le cookie est perdu en raison de la "manière" dont les cookies sont géré par PrestaShop : il faut alors patcher, cf FAQ).

    Bonne chance,
    François.

  3. esmi
    Forum Moderator
    Posted 1 year ago #

    These are English language forums. Please use English.

  4. aytechnet
    Member
    Plugin Author

    Posted 1 year ago #

    Sorry, I re-post in english :

    The redirection is abnormal, check for a .htaccess or an cache in your browser (IE9 ?). Please ensure the cache is empty and check again.

    WordPress can work as root software as well as PrestaShop. But if PrestaShop is not in the root, patch it according to our FAQ because the cookie will not be visible for WordPress (thus causing cart not synced with PrestaShop, ...)

    Good luck,
    François.

  5. Prestance Design
    Member
    Posted 1 year ago #

    Sorry, I re-post my first post in english too :

    Hi François,

    Thank for this extension and thank you for this update
    compatible with Prestashop 1.5.
    I'm just trying to test with the latest version of Prestashop (1.5.3.1) that I installed in a subfolder "shop /".
    http://localhost/shop/
    Wordpress is the root.

    Once configured, when I try to access http://localhost/ WordPress there's automatically redirect on http://localhost/shop/ (index page of Prestashop).

    Is it possible like this configuration or only the inverse works, put wordpress in a subfolder?

    Hope to read you.

  6. Prestance Design
    Member
    Posted 1 year ago #

    Thank for response.

    I work with firefox and chrome. I've tried with empty cache and without htaccess.
    Note that I've tested with default installation of both CMS. I tried disabling the redirection canonical of Prestashop but it is the same.

    I'll try with an older version of Prestashop and will keep you informed.

    Cheers.

  7. aytechnet
    Member
    Plugin Author

    Posted 1 year ago #

    I think it is not a PrestaShop behaviour anyway. use wget or curl (or wireshark) to check for what happens. François.

  8. Prestance Design
    Member
    Posted 1 year ago #

    I've tried with Prestashop 1.4.9 and it work perfectly.
    Good idea, I'll tried to use tools like wget, curl to debugging.

    Thanks. Mike.

  9. dontcair
    Member
    Posted 1 year ago #

    I am having the same problem with the 0.8 version of your plugin, and prestashop 1.5 with wordpress 3.5, I have tried with css and js enabled or disabled. As soon as I disable this plugin it stops redirecting. It does this whether I actually have a widget or not. I am not able to downgrade my prestashop for testing. I have safari, and I have cache disabled, I have a caching plugin on wordpress but even when I clear it's cache it doesn't help. Let me know what files or logs I can give you, or what I can try to fix

  10. Prestance Design
    Member
    Posted 1 year ago #

    Hello Francois,

    You can try to debug the HTTP Header here.

    http://wallcaps.prestance-informatique.fr/ (WordPress URL)
    http://wallcaps.prestance-informatique.fr/shop/index.php (Prestashop URL)

    With firebug, we can see a "302 Move temporarily" but nothing in htaccess. I don't understand, maybe it's a new system routing (dispatcher) of Prestashop ?

    Thanks a lot. Mike.

  11. aytechnet
    Member
    Plugin Author

    Posted 1 year ago #

    Hello,

    The problem is under examination : FYI the simple fact to load PrestaShop configurations files seems to fire the redirection ?!?!? (loading config/config.inc.php of PS). François.

  12. aytechnet
    Member
    Plugin Author

    Posted 1 year ago #

    The problem is found : there is a "bug" in PrestaShop multishop management (even if you do not activate it). The following patch can be used to fix that (it has been added in the FAQ of the plugin) :

    --- classes/shop/Shop.php.prestashop_integration        2013-01-07 09:18:32.000000000 +0100
    +++ classes/shop/Shop.php       2013-01-07 09:25:26.000000000 +0100
    @@ -368,6 +368,9 @@
                            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'))
    @@ -388,6 +391,7 @@
                            }
                            header('location: '.$url);
                            exit;
    +                       }
                    }
            }
  13. Prestance Design
    Member
    Posted 1 year ago #

    Great !

    I prefered to override the Shop.php class for avoid to loose the modification when I'll do a Prestashop upgrade.

    Thank you, it work perfectly.

  14. aytechnet
    Member
    Plugin Author

    Posted 1 year ago #

    You can apply the patch the way you prefer, the override mechanism can help you track the changes made and is much better that a change not being tracked.

  15. dontcair
    Member
    Posted 1 year ago #

    I just updated the plugin to 0.8.1 I then reactivated the plugin and it is still redirecting after emptying all caches. Uninstalling and reinstalling the plugin is no help. Disabling the plugin fixes redirection without clearing caches.

  16. Prestance Design
    Member
    Posted 1 year ago #

    Dontcair,

    For complete working, you must also patch/override this Prestashop file classes/shop/Shop.php.
    Look at the F.A.Q update.

  17. dontcair
    Member
    Posted 1 year ago #

    nevermind I skimmed and missed the relevant line in the file and thought it changed

  18. winworldbcn
    Member
    Posted 1 year ago #

    I tried to modify the file but I get redirected shop.php 404 .....
    can you help me? Please
    Prestashop version 1.5.2.0
    Wordpress version 3.4.1.

    Tahnk you

  19. aytechnet
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    You need to patch Shop.php class file according to FAQ, there may be other redirection that should be canceled.

    Kind Regards,
    François.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic