Announcement

Collapse
No announcement yet.

basket id cookie

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    basket id cookie

    I have a subdomain on a different server than my Miva store, one domain is www.domain.com and the other is store.domain.com. I want to read the mm5-StoreCode-basket-id cookie (where StoreCode is my store code) on the www.domain that is created by miva on the store.domain.

    Is there a way to change the setting of the sub domain for that cookie so it is set at the domain level and can be read on the other site? So instead of being set at store.domain.com just set it at domain.com?

    Thanks

    Mark

    #2
    Re: basket id cookie

    I guess I didnt look hard enough. I found the cookie settings under the domain settings in the Miva admin.

    Comment


      #3
      Re: basket id cookie

      This seems to have caused a problem so I went back to the original settings. Does anyone have experience with cookie settings in Miva one sites with subdomains. It looks like some browsers (IE 11 and Safari 7) have an issue where they received the cookie that was set at the domain level but also still had the old one with the subdomain and they can have different basket session ID in them. This causes items to drop out of the basket, when you add an item it goes into the basket and right out. At the same time you cannot login the same thing happens. I cant recreate the problem but I am getting many emails so I am sure even more people have the issue. The only fix I have is to tell them to delete their cookies or use another browser. The cookies dont expire for 1 year so the issue wont clear up any time soon.

      Comment


        #4
        Re: basket id cookie

        It could be that the customers having the problem are getting both cookies. You should lower your cookie expiration for a while so that when you make the switch the people with the old cookie won't have it for that long.
        Jim McCormick
        Miva Merchant Support
        866-284-9812

        https://www.miva.com

        Comment


          #5
          Re: basket id cookie

          Yea that is what is happening. I set the cookies to 1 week. The problem seemed to pop back up on my IE 11 browser today and the cookies were in conflict. I cant explain why it was writing the basket id at the domain level because that setting was changed back weeks ago. The only thing writing to that should be google analytics. I tried deleting just the domain level cookie but it came right back when I went to any Miva page. Once I deleted all cookies it stopped writing the Basket ID to the domain level cookie. I am concerned that the issue came back with the cookie setting in Miva not set to write it at the domain level for a few weeks now.

          Comment


            #6
            Re: basket id cookie

            Is it possible to have this setting write both a domain level and subdomain level cookie? Right now I have it blank so it write the basket ID cookie to store.domain.com but I had it set to domain.com so it wrote cookies for both store.domain.com and domain.com. Some have conflicting Basket ID's which causes an issue with IE11 and Safari 7.

            Non-secure Miva Merchant Cookie "domain":

            If I could make above setting something like domain.com,store.domain.com I think think it would get everything inline.

            Comment


              #7
              Re: basket id cookie

              Im not sure if what your trying to do will work. I haven't tested it myself but I can forsee some unintended issues like you mentioned.

              Instead of trying to set it up so you can read the cookies on both domains, the better way to do this would be to do a external call on www. to store. to return the a session id. You can then save the session id locally to the www domain.

              You then have to make sure when the session id is passed in the url when transitioning from www to store.

              We do something similar here (Click the tabs up top):

              http://www.pomades.com/
              Brennan Heyde
              VP Product
              Miva, Inc.
              [email protected]
              https://www.miva.com

              Comment


                #8
                Re: basket id cookie

                Thanks for the response. Right now I am not worried about reading the session ID on the www page I am trying to figure out how to correct people's browsers that have both cookies with different session ID's in them causing their browser not to function correctly in the Miva store. With the number of call/emails we are getting for the issue I am sure we are losing 5x as many people that just get frustrated and leave. The above question I had was an attempt to get bot cookies to have the same session ID. Really need a way to detect if both cookies exist on a pc and if they have a different basket ID in them and also if they are using IE 11 or Safari 7 (seems to only happen with those browsers) then maybe popup a message to delete cookies or use a different browser.

                Comment


                  #9
                  Re: basket id cookie

                  does anyone know the javascript to delete a specific cookie for a domain level cookie only while leaving the subdomain intact? I see you just have to change the expiration date to a date in the past to delete it. Will this just delete the cookie at the domain.com level and leave the store.domain.com one intact?

                  document.cookie = "mm5-RW-basket-id=0; expires=Sat, 01-Jan-2000 00:00:00 GMT;
                  domain=domain.com";

                  Comment


                    #10
                    Re: basket id cookie

                    We had the same issue with a different client and here is how we fixed it.


                    IE and Safari are seeing and sending both cookies, which is causing Miva to create a new session every time. You need to delete the "bad" cookie which is at www. We used an iframe to call in a php page that deleted the cookie we did not need.

                    We put this code in the global footer:

                    Code:
                    <mvt:if expr="NOT(g.secure)">
                    	<iframe src="http://www.domain.com/clear-cookie.php" style="display:none"></iframe>
                    </mvt:if>
                    Then in the clear-cookie.php file we have this code:

                    Code:
                    <?php
                    
                    
                    setcookie('mm5-RW-basket-id','123',time() - 3600,'/','domain.com')
                    
                    
                    ?>
                    This code is erasing the basket cookie at domain.com. You may need to tweak what is above for your specific situation.
                    Brennan Heyde
                    VP Product
                    Miva, Inc.
                    [email protected]
                    https://www.miva.com

                    Comment


                      #11
                      Re: basket id cookie

                      Thanks Brennan. That looks exactly like what we need, I will give it a try.

                      Comment


                        #12
                        Re: basket id cookie

                        In certain cases I want a new session id every time I visit our site. Using ideas in this thread I want to delete/expire the mm5-storecode-basket-id cookie using the example that Brennan shows above. I have tested this two ways:

                        First using Brennan's example within an iframe to execute a PHP program with the set cookie code that is suggested
                        and
                        second by executing the PHP program via the program's URL.
                        Neither of these approaches have expired the cookie.

                        $name is valued to the cookie name "mm5-storecode-basket-id" where storecode = our store code
                        On the site I have the iframe displaying as block and my PHP program returns the cookie value using a PHP echo $_COOKIE[$name]; within the iframe so it appears that my program is successfully reading the cookie. After displaying the cookie value, the program is also setting the cookie to expired as per the example above:
                        setcookie($name,'123',time() - 3600,'/','domain.com');
                        I have also tried using: setcookie($name,'123',time() - 3600);

                        After the program is executed, the cookie is still shown in the Latu dump.

                        Hope someone can help, Larry

                        PS This is being tested in our DEV site if that makes a difference.
                        Last edited by wajake41; 02-23-14, 05:23 PM.
                        Larry
                        Luce Kanun Web Design
                        www.facebook.com/wajake41
                        www.plus.google.com/116415026668025242914/posts?hl=en


                        Comment

                        Working...
                        X