WordPress.org

Ready to get started?Download WordPress

Forums

PrestaShop Integration
[resolved] Prestashop, WordPress cookie information? (8 posts)

  1. dynm
    Member
    Posted 1 year ago #

    Hi François,

    In your faq, where you talk about:

    If a customer logon in PrestaShop, informations about the user is lost in WordPress

    Can you elaborate as to the patch? What line? How do you replace/patch it?

    My prestashop is in a subfolder of wordpress, and I'm not able to get access to the information. Thank you, I appreciate your assistance.

    dyn

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

  2. aytechnet
    Member
    Plugin Author

    Posted 1 year ago #

    Hi dynm,

    You need to search in class/Cookie.php for the function call "setcookie" and to change the patch to '/'.

    Kind Regards,
    François.

  3. dynm
    Member
    Posted 1 year ago #

    Hi François,

    Thanks for responding. Would you mind showing a patch of what that looks like? You had done it for this question:

    I can't access my WordPress frontpage due to a redirection to the PrestaShop frontpage

    Thanks!

    dyn

  4. aytechnet
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    Effectively, it is more easy to check :

    --- classes/Cookie.php.setcookie 2011-10-04 17:49:44.000000000 +0200
    +++ classes/Cookie.php  2011-11-16 08:37:22.000000000 +0100
    @@ -295,9 +295,9 @@
                    $time = time() - 1;
            }
            if (PHP_VERSION_ID <= 50200) /* PHP version > 5.2.0 */
    -               return setcookie($this->_name, $content, $time, $this->_path, $this->_domain, 0);
    +               return setcookie($this->_name, $content, $time, '/' /* $this->_path */, $this->_domain, 0);
            else
    -               return setcookie($this->_name, $content, $time, $this->_path, $this->_domain, 0, true);
    +               return setcookie($this->_name, $content, $time, '/' /* $this->_path */, $this->_domain, 0, true);
         }
    
         /**

    Is it ok like that ?

    You may have to replace $this->_domain by '.mywebsite.com' to get a cookie for all subdomains of mywebsite.com too.

  5. aytechnet
    Member
    Plugin Author

    Posted 1 year ago #

    Please do not forget to mark it resolved if this is the case !

  6. dynm
    Member
    Posted 1 year ago #

    Yes, thank you! I'm still working on the implementation. I should resolve this case shortly.

  7. aytechnet
    Member
    Plugin Author

    Posted 1 year ago #

    Hi, is it ok now for you ? Can you update this thread please ?

    François.

  8. dynm
    Member
    Posted 1 year ago #

    Sorry, I was away. Thanks for being patient!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.