• Ok, so I’m completely lost now.

    I have included wordpress into my osCommerce site.

    I know what you are going to say, use the plugin that does this for you. I tried, our osCommerce is heavily modified and most plugins don’t work with it. 3yrs worth of mods.

    Basically, when wp-blog-header.php is included it destroys some of the osCommerce session data. This has nothing to do with the mods, I have included the latest stock oscommerce application_top.php with wp-blog-header.php and have the same issues. It’s wordpress destroying the session data.

    I have commented out wp_unregister_GLOBALS(), used the filter options in it with little success. Some things were fixed, others were not. I am now down to $_SESSION[‘language’] getting unset, and set as either WP or en. In wordpress it should be english. I’m not sure where WP is coming from, but I know en is wordpress defaulting to the browser language.

    How can I stop wordpress from taking over the global and session data?

    Any help would be greatly appreciated!

    If this has been resolved, please post me a link and close the thread! I have been searching for a week to resolve this, the things I found and tried are listed above!

    SESSION:
    
    Array
    (
        [cart] => shoppingCart Object
            (
                [contents] => Array
                    (
                        [58841] => Array
                            (
                                [qty] => 10
                                [trackback] => http://www.***.com/***.html
                            )
    
                    )
    
                [total] => 47.1
                [weight] => 0.5
                [cartID] => 70729
                [content_type] =>
                [shiptotal] => 0
                [total_virtual] => 47.1
                [weight_virtual] => 3.8
            )
    
        [language] => en
        [languages_id] => 1
        [currency] => USD
        [navigation] => navigationHistory Object
            (
                [path] => Array
                    (
                        [0] => Array
                            (
                                [page] => index.php
                                [mode] => NONSSL
                                [get] => Array
                                    (
                                    )
    
                                [post] => Array
                                    (
                                    )
    
                            )
    
                        [1] => Array
                            (
                                [page] => index.php
                                [mode] => NONSSL
                                [get] => Array
                                    (
                                    )
    
                                [post] => Array
                                    (
                                    )
    
                            )
    
                    )
    
                [snapshot] => Array
                    (
                    )
    
            )
    
        [affiliate_ref] =>
        [affiliate_clickthroughs_id] =>
        [discount_percentage] =>
    )
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter designgears

    (@designgears)

    bump

    Thread Starter designgears

    (@designgears)

    Ok, I hacked this together to fix the problem for now.

    At the end of wp-blog-header.php I added

    <?php $_SESSION['language'] = "english"; ?>

    note: We only use english on oscommerce, if you only use one language, put yours in there, if you use multiple ones, you could put the logic for deciding what one to use in this file as well.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘WordPress include destroying osCommerce session data’ is closed to new replies.