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 : Tuesday, May 3, 2022 10:54:36 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)
Steps to reproduce:

1. Set up default AC906 install with sample data.
2. Create a new order, any product and any customer.
3. Modify the Spiky Massage Ball product to charge +$1 price modifier on each of the color choices.
4. View the order you just placed. On the View-Order page click the Items tab.
5. Click Add Product button.
6. Find the Spiky Massage Ball product, click the green + to add it.
7. Click the color option choices.

The product price is not changing based on the variant choice. The base product price remains unmodified in the price field. The price should change as soon as the variant selection is changed. If you add the product now to the shopper basket, you'll only get base price regardless of the variant choice(s).

I went from 904 to 906, so I can't tell you if this was introduced in 905 or 906.

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

Katie S  
#2 Posted : Tuesday, May 3, 2022 2:39:47 PM(UTC)
Katie S

Rank: Advanced Member

Groups: System, Administrators, Developers, Registered, HelpDesk
Joined: 10/29/2018(UTC)
Posts: 472

Thanks: 4 times
Was thanked: 34 time(s) in 33 post(s)
Hi Joe,

I confirmed the issue exists in both 9.0.5 and 9.0.6.

I will report it, but in the meantime, you can manually adjust the price to reflect the option choice price + base.

Thanks for letting us know. If there is an easy fix, we will post it here.
Thanks for your support!

Katie
Secure eCommerce Software and Hosting
thanks 1 user thanked Katie S for this useful post.
Joe Payne2 on 5/4/2022(UTC)
Joe Payne2  
#3 Posted : Wednesday, May 4, 2022 9:51:08 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)
Thanks. We were able to revert the 905 changes to the file to resolve the issue. The changes appear to have something to do with editing a Kit Master item from the Shipments tab. Not exactly sure on that, just deriving that from the code changes I saw.
sweeperqb  
#4 Posted : Friday, May 27, 2022 1:58:40 PM(UTC)
sweeperqb

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 5/30/2020(UTC)
Posts: 125

Thanks: 14 times
Was thanked: 3 time(s) in 3 post(s)
Is there an easy code fix for this? It is going to be one of the first things our team notices when we switch to AC9.
sweeperqb  
#5 Posted : Friday, May 27, 2022 4:32:31 PM(UTC)
sweeperqb

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 5/30/2020(UTC)
Posts: 125

Thanks: 14 times
Was thanked: 3 time(s) in 3 post(s)
I dug into the OrderController and think it is due to a change in the PrepareAddProductModel between 9.0.4 and 9.0.6.

This code block appears to be the culprit (v9.0.6 lines 9982-9985):
Code:
if (model.IsKitMaster)
        model.Price = pcalc.Price;
    else
        model.Price = isPostBack ? price : pcalc.Price;


I believe the isPostBack parameter was added so it would persist user-entered price modifications. However, when you select an option choice, it submits the form via JavaScript and also registers as a postback... The end result is that pcalc.Price doesn't fire, so the price modifier is never applied to the price. Probably need a hidden field that gets set when product options are changed so that the price gets applied.
sweeperqb  
#6 Posted : Friday, May 27, 2022 5:24:27 PM(UTC)
sweeperqb

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 5/30/2020(UTC)
Posts: 125

Thanks: 14 times
Was thanked: 3 time(s) in 3 post(s)
Alright, my workaround is to modify v9.0.6 b7222 line 10156 from:

Code:
model = PrepareAddProductModel(model.ProductId, model.OrderId, model.ShipmentId, model.Quantity, model.Price, true);


To:

Code:
model = PrepareAddProductModel(model.ProductId, model.OrderId, model.ShipmentId, model.Quantity, model.Price, true && !string.IsNullOrEmpty(addToCart));


The new 9.0.6 code to prevent the user-entered price from being overwritten was preventing price modifiers from applying. With this modification, the price modifiers will apply unless the "Add Product" button is clicked (Note: This button click sets the addToCart to a non-empty value within /Areas/Admin/Orders/_AddProduct.cshtml)
thanks 1 user thanked sweeperqb for this useful post.
shaharyar on 6/23/2022(UTC)
Users browsing this topic
Guest (4)
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.