logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
Joe Payne2  
#1 Posted : Monday, April 26, 2021 11:36:26 AM(UTC)
Joe Payne2

Rank: Advanced Member

Groups: HelpDesk, Developers
Joined: 11/9/2018(UTC)
Posts: 564

Thanks: 122 times
Was thanked: 26 time(s) in 25 post(s)
In Able v7 and Able Gold, you could add '$price' to the name of a kit component item and it would render the price. Or you could choose not to include it and component products would render just the product name.

This seems intentionally forced in v9 as shown in this code from ProductsController (starting line 3172).

My question is: why did you force the price to be included even if $price was not part of the kit product name? To my knowledge, this does not 'maintain backward compatibility', it does the opposite by breaking away from past behaviors for folks who have upgraded from a previous Able version. If I have some kit product names set up to render without prices because I did not include $price in the name, and others that have $price in the name....I'm still forced to see prices on all kit product names.

Was there another design consideration involved when this was done?

Code:

if (isInStock)
                        {
                            string name = kitProduct.DisplayName;
                            if (!kitProduct.Name.Contains("$price"))
                            {
                                decimal price = kitProduct.CalculatedPrice;
                                if (price != 0)
                                {
                                    // TO MAINTAIN BACKWARD COMPATIBILITY, WE NEED TO INCLUDE THE PRICE WITH THE NAME
                                    string tempName = kitProduct.Name;
                                    kitProduct.Name += " - ($price)";
                                    string displayName = kitProduct.DisplayName;
                                    kitProduct.Name = tempName;
                                    name = displayName;
                                }
                            }

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

shaharyartiwana25816656  
#2 Posted : Monday, May 3, 2021 2:12:06 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 703

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
I have confirmed from the GoldR12 build and found that the behavior is the same as AC9.

By default, we force the price display only on the product page (BuyProductDialog) and the admin CreateOrder section.

Once the product is added to the cart or the order is placed, we always display the price only if the user adds $price in the name field.

Joe Payne2  
#3 Posted : Monday, May 3, 2021 5:32:15 AM(UTC)
Joe Payne2

Rank: Advanced Member

Groups: HelpDesk, Developers
Joined: 11/9/2018(UTC)
Posts: 564

Thanks: 122 times
Was thanked: 26 time(s) in 25 post(s)
I could have sworn both AC7 and Gold worked the way I described. But I just checked a Gold site and you're right, $price is forced into the name in BuyProductDialog.

Maybe I'm just thinking Able v7. Sorry, I feel like I've wasted your time and that was not my intention. Thank you for looking into it.

Doing these upgrades with some coming from v7 and some coming from Gold is becoming a challenge....
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.