Announcement

Collapse
No announcement yet.

How and when should we purge our basket table

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

    #16
    Re: How and when should we purge our basket table

    They should not be getting the Restock Shelves email with the link in it unless the basket had expired. The email does not go out unless the basket is expired and deleted. Hence, the link in the email inserts the items back in.
    Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
    Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
    Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
    Facebook http://www.facebook.com/EmporiumPlus
    Twitter http://twitter.com/emporiumplus

    Comment


      #17
      Re: How and when should we purge our basket table

      That feature already exists. The Restock Shelves http://www.emporiumplus.com/1AA00067.html automatically deletes the basket at your desired frequency. Embedded in the sale saver email that goes to the customer, you can have a link to the store which will repopulate the basket with auto-saved data using the Tool Kit savebasket2email #131 at http://www.emporiumplus.com/1AA00223.html It is all automatic so there is not a need to have a real long basket timeout. They simply click a link and the basket gets refilled. You can see how it works if you fill your basket, go to checkout and save your customer data. Then leave and wait a few hours until you get the sale saver email. You'll see a link to restore last saved basket.
      Restock Shelves will only send a reminder to customers who abandon their cart after providing an email address. That only covers about 10% of my abandoned carts. I am going to stick with a long timeout on baskets so those customers will see their previous selections when they return to the store. In fact, I think I will take Rick's suggestion of a one year timeout.
      To ensure you database doesn't get out of control, I'd suggest some type of limit. 525949 is one year, which is certainly an option.
      Bill Dunn
      SunCam, Inc.
      http://www.SunCam.com
      [email protected]

      Comment


        #18
        Re: How and when should we purge our basket table

        Your alternate is to save the basket to a cookie as long as they visit the basket page. If the store sends them to the basket after the add to basket click, then that would happen every time. They can then return days later and put them back in the basket, one at a time or all with a single button click.
        Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
        Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
        Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
        Facebook http://www.facebook.com/EmporiumPlus
        Twitter http://twitter.com/emporiumplus

        Comment


          #19
          Re: How and when should we purge our basket table

          Yea, leaving a cookie would probably be a better idea since over 99.5% of the baskets do not have content. Too bad we can't expire empty baskets on a different schedule from those with content.
          Bill Dunn
          SunCam, Inc.
          http://www.SunCam.com
          [email protected]

          Comment


            #20
            Re: How and when should we purge our basket table

            I think a cron job that runs once daily could remove any empty baskets that are > 1 day old. Should be pretty easy to do. Wonder if Miva can provide this ability? Or if they would create the cron set up for those of us who want to do this ourselves? Larry
            Last edited by wajake41; 12-21-13, 09:24 AM.
            Larry
            Luce Kanun Web Design
            www.facebook.com/wajake41
            www.plus.google.com/116415026668025242914/posts?hl=en


            Comment


              #21
              Re: How and when should we purge our basket table

              If you can do this through Toolbelt, Toolkit, then just set a page (or just a condition on a page, like mvt:if expr="g.cleanbasket"> and then set the CRON to call /merchant.mvc?screen=WHATEVER&cleanbasket=true).
              Bruce Golub
              Phosphor Media - "Your Success is our Business"

              Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
              phosphormedia.com

              Comment


                #22
                Re: How and when should we purge our basket table

                To see if a Basket purge might be beneficial to us, i ran this query against our production store:

                select `basket_id` from `s01_Baskets` u where not exists (select 1 from `s01_BasketItems` ui where ui.basket_id = u.basket_id)

                The table contains 29873 basket rows and the query returned a count of 29708 baskets without basketitems. Seems like I could purge any of these baskets that are older than 1 day safely.

                Larry
                Larry
                Luce Kanun Web Design
                www.facebook.com/wajake41
                www.plus.google.com/116415026668025242914/posts?hl=en


                Comment


                  #23
                  Re: How and when should we purge our basket table

                  You need to delete the related BasketCharges and AffiliateSession records before deleting the baskets. Otherwise you will be left with thousands of orphaned records.
                  Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
                  Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
                  Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
                  Facebook http://www.facebook.com/EmporiumPlus
                  Twitter http://twitter.com/emporiumplus

                  Comment


                    #24
                    Re: How and when should we purge our basket table

                    Hi Bill: Thanks for mentioning this. I was assuming there would be no BasketCharges if there were no items and didn't know anything about all those AffiliateSessions (I see over 29,000 rows in that table). If I actually attempt this, I'll take both into account. Have I missed anything else? It would be better if this were a standard MIVA cleanup option I think. Larry
                    Larry
                    Luce Kanun Web Design
                    www.facebook.com/wajake41
                    www.plus.google.com/116415026668025242914/posts?hl=en


                    Comment


                      #25
                      Re: How and when should we purge our basket table

                      I have no idea what you might miss. I use the built in API so it does all the cleanup behind the scenes. But you can't do that if you are selectively taking out just some of them. If a customer goes to checkout and then goes back and removes items in the basket, you could have coupons, discounts, fees, etc and maybe even the shipping charge if they got that far. Some of those are removed if they clear the basket but maybe not all. Hence you have to clear that table too. You are probably doing something that you should not do.
                      Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
                      Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
                      Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
                      Facebook http://www.facebook.com/EmporiumPlus
                      Twitter http://twitter.com/emporiumplus

                      Comment


                        #26
                        Re: How and when should we purge our basket table

                        Any thoughts from Miva?
                        Bill Dunn
                        SunCam, Inc.
                        http://www.SunCam.com
                        [email protected]

                        Comment


                          #27
                          Re: How and when should we purge our basket table

                          Bill,

                          Sorry I've only been loosely following this thread, thoughts from Miva on what specifically?
                          Thanks,

                          Rick Wilson
                          CEO
                          Miva, Inc.
                          [email protected]
                          https://www.miva.com

                          Comment


                            #28
                            Re: How and when should we purge our basket table

                            Too bad we can't expire empty baskets on a different schedule from those with content.
                            Some of us would like to delete empty baskets but leave baskets with content so the customer sees the content on the next visit. I figure in a year's time I collect a million empty baskets that I don't need just so I can save the 3000-4000 baskets with content. Larry's suggestion of a cron job is a little over my head but it sounds like it would do the job.

                            I think a cron job that runs once daily could remove any empty baskets that are > 1 day old. Should be pretty easy to do. Wonder if Miva can provide this ability? Or if they would create the cron set up for those of us who want to do this ourselves? Larry
                            Last edited by SunCam; 12-23-13, 09:21 AM.
                            Bill Dunn
                            SunCam, Inc.
                            http://www.SunCam.com
                            [email protected]

                            Comment


                              #29
                              Re: How and when should we purge our basket table

                              You shouldn't do any of that. You're going to bump into walls and cause odd behaviors and perhaps worse.

                              The only way to achieve such a thing without potentially causing catastrophic damage would be for us to build such a feature into the core.
                              Thanks,

                              Rick Wilson
                              CEO
                              Miva, Inc.
                              [email protected]
                              https://www.miva.com

                              Comment


                                #30
                                Re: How and when should we purge our basket table

                                The only way to achieve such a thing without potentially causing catastrophic damage would be for us to build such a feature into the core.
                                Good answer!
                                Bill Dunn
                                SunCam, Inc.
                                http://www.SunCam.com
                                [email protected]

                                Comment

                                Working...
                                X