WordPress.org

Ready to get started?Download WordPress

Forums

WP-PageNavi
magento integration, fix proposal (3 posts)

  1. dmistriotis
    Member
    Posted 3 years ago #

    Hi, I tried to use this plugin in the context of a magento web-store and after having it enabled it broke the site. After some digging the class_exists(...) function checked for magento classes and not those from wordpress.
    In order to move on I introduced the following patch in load.php, providing it here in case someone else needs it or the author is willing to integrate it?

    PATCH
    8c8,15
    < if ( !class_exists('scbLoad3') ) :
    ---
    > $scbLoad3Exists = false;
    > try {
    > $scbLoad3Exists = class_exists('scbLoad3');
    > } catch (Exception $exp) { //Assumes from magento exception that class does not exits so custom is used
    > $scbLoad3Exists = false;
    > }
    >
    > if ( !$scbLoad3Exists ) :
    52,53c59,66
    < if ( class_exists($class_name) )
    < continue;
    ---
    > try {
    > if ( class_exists($class_name) ) {
    > continue;
    > }
    > } catch (Exception $exp) {
    > //continue execution
    > }
    >

  2. scribu
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    I'm having a hard time understanding what you are doing.

    Do you have both Magento and WordPress running on each page load?

  3. dmistriotis
    Member
    Posted 3 years ago #

    Yes. Magento can be configured to integrate some other "packages" one of them is wordpress. So they are running together on each page load.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic