AbleCommerce Forums
»
AbleCommerce
»
General Questions
»
v9.0.4 Kit Component Item names and price
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;
}
}
|
|
|
|
Rank: Advanced Member
Groups: Admin, Developers, Registered, HelpDesk, Authorized User Joined: 10/5/2018(UTC) Posts: 704
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.
|
|
|
|
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....
|
|
|
|
AbleCommerce Forums
»
AbleCommerce
»
General Questions
»
v9.0.4 Kit Component Item names and price
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.
Important Information:
The AbleCommerce Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close