Announcement

Collapse
No announcement yet.

Recalculating pricing on login

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

    Recalculating pricing on login

    I'm starting the process of decommissioning old Emporium Plus modules. I am using the Basket Price Group Recalc module. It's an important functionality for my store, and I would like to see if there is a way to replicate the functionality with newer native Miva code.

    For those not familiar with the module, it allows customers assigned to price groups to shop and add items to the cart without logging in. Once they log in, if they are assigned to a price group that has different pricing than standard, it automatically updates the pricing on all appropriate items in the cart to match their price group pricing. It's a simple little feature, but it saves a world of hassle. I would hate to lose this.

    Is there a way to replicate this using native Miva functionality now?
    Todd Gibson
    Oliver + S | Sewing Patterns for Kids and the Whole Family

    #2
    There is SMT code (and API functions) that can "read the basket items", "remove them", and then reinsert them. But I don't have that whole suite handy.
    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


      #3
      I'm pretty sure the store does that automatically now. I suggest you try it in your dev store; remember to deactivate the EP module first, so it won't interfere.
      Kent Multer
      Magic Metal Productions
      http://TheMagicM.com
      * Web developer/designer
      * E-commerce and Miva
      * Author, The Official Miva Web Scripting Book -- available on-line:
      http://www.amazon.com/exec/obidos/IS...icmetalproducA

      Comment


        #4
        I just tested, and it doesn't do that automatically now. Pricing remains what it was when the item was added to the cart.
        Todd Gibson
        Oliver + S | Sewing Patterns for Kids and the Whole Family

        Comment


          #5
          That's really strange.. I also thought it used to just work automatically in newer Miva releases. I even think I recall testing by activating price groups which took effect immediately on basket prices, however it does not seem to be the case now. Not sure if I have false memory of this working or something may have changed along the way.. It definitely is a pretty important feature for shoppers who are part of price groups.
          Psydde Delicious
          Delicious Boutique & Corseterie
          Philadelphia, PA
          www.DeliciousBoutique.com
          www.DeliciousCorsets.com

          Comment


            #6
            There might be differences based on what is changing the price in the basket. maybe the best approch would be to remove everything from the basket and then reinsert it.
            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


              #7
              Come to think of it, there have been times when I needed to write code to trigger the store to update pricing. The LSK contains numerous examples of a function call that looks like this:
              Code:
              <MvIF EXPR = "{ NOT [ g.Module_Feature_PGR_RT ].Runtime_Discount_Basket( g.Basket ) }">
                  <MvFUNCTIONRETURN VALUE = 0>
              </MvIF>
              Runtime_Discount_Basket() is the function that examines the basket contents and adjusts the prices. In my own work, I generally replace the MvFUNCTIONRETURN with some other code that signals an error.

              According to the LSK, this function is called whenever a customer changes their basket contents, and also when they log in or out. I hope someone in-house can shed some light on why this doesn't always work.
              Kent Multer
              Magic Metal Productions
              http://TheMagicM.com
              * Web developer/designer
              * E-commerce and Miva
              * Author, The Official Miva Web Scripting Book -- available on-line:
              http://www.amazon.com/exec/obidos/IS...icmetalproducA

              Comment


                #8
                Originally posted by delcorsets View Post
                That's really strange.. I also thought it used to just work automatically in newer Miva releases. I even think I recall testing by activating price groups which took effect immediately on basket prices, however it does not seem to be the case now. Not sure if I have false memory of this working or something may have changed along the way.. It definitely is a pretty important feature for shoppers who are part of price groups.
                I agree, this needs to work without having to insert additional coding to make it happen.
                Leslie Kirk
                Miva Certified Developer
                Miva Merchant Specialist since 1997
                Previously of Webs Your Way
                (aka Leslie Nord leslienord)

                Email me: [email protected]
                www.lesliekirk.com

                Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

                Comment


                  #9
                  Miva automatically re-calculates the prices of items in the basket when you login. I just tried it and it does work like that for me. What type of price groups are you using?
                  Brennan Heyde
                  VP Product
                  Miva, Inc.
                  [email protected]
                  https://www.miva.com

                  Comment


                    #10
                    My most used price groups are legacy. For pricing I use either cost or a discount from retail.
                    Todd Gibson
                    Oliver + S | Sewing Patterns for Kids and the Whole Family

                    Comment


                      #11
                      I re-tested on my price groups as well... I found that re-pricing upon customer login DID work on my Product Discount price groups, but did NOT work on my Legacy Price Groups with prices set by the Price Group Manager module.

                      My Legacy Price Groups (using rules set via Price Group Manager module,) did show the correct pricing in the basket (but not on PROD or CTGY screens) IF the shopper was logged in when adding the products to their cart. They did not recalculate standard retail prices upon login to an account assigned to the price group.

                      I guess it might be time to reconfigure my price groups and retire the Price Group Manager module.

                      Psydde Delicious
                      Delicious Boutique & Corseterie
                      Philadelphia, PA
                      www.DeliciousBoutique.com
                      www.DeliciousCorsets.com

                      Comment


                        #12
                        OK, I think I've figured it out. It doesn't have to do with the old Price Group Manager module at all. I don't have that installed.

                        I did some testing this morning and confirmed that legacy price groups do not have basket pricing updated automatically when a user assigned to that legacy price group logs in.

                        I have a legacy price group set up to charge price group members cost for the item. I add items at regular price to the basket. When I log in as the user assigned to the price group, the pricing on items in the basket does not change. But pricing on the PROD page now displays cost for all assigned items. And if the customer adds items to the basket after logging in, they get added at cost.

                        I even tried creating a new legacy price group using cost to see if it was because the price group I am using was created long, long ago. But creating a new legacy price group displays the same behavior.

                        But if I create a new price group using Markup from Cost and set the markup to 0%, I can add items to the basket at retail price and then when the user in the price group logs in the pricing on items in the basket does update to cost.

                        So it appears that Miva will update basket pricing after login for new price groups, but it will not update basket pricing for legacy price groups.
                        Last edited by oliverands; 11-23-21, 02:47 AM.
                        Todd Gibson
                        Oliver + S | Sewing Patterns for Kids and the Whole Family

                        Comment


                          #13
                          What is the advantage of using a "legacy" Price Group?
                          Thank you, Bill Davis

                          Comment


                            #14
                            They're simple to configure if you want to offer a product at cost or at a simple discount to retail price. And in my case, I set these two specific price groups up many years ago before the new price group structure was released. So mine are truly legacy! I now have hundreds of products and customers assigned to them, so I really hope I won't have to convert them to the newer price group structure in order to have the basket recalculate.
                            Todd Gibson
                            Oliver + S | Sewing Patterns for Kids and the Whole Family

                            Comment


                              #15
                              D'oh. All I needed to do was edit my existing legacy price groups by recreating the discounting structure using a non-legacy price group option. Now pricing updates automatically and all is good.
                              Todd Gibson
                              Oliver + S | Sewing Patterns for Kids and the Whole Family

                              Comment

                              Working...
                              X