Developer forum

Forum » Development » Edit Product Discount Name

Edit Product Discount Name

Tin Ma Ma
Reply

Dear All,
I created the discount on Order discounts. I changed the discount name. Then I checked in EcomDiscount table The discount name didn't change in EcomDiscount table but the change in EcomDiscountTranslation table (please refer to the attached image).

In the product list and product template,

@foreach (LoopItem item in GetLoop("ProductDiscounts")){
    <p>@item.GetValue("Ecom:Product.Discount.Name")</p>
}

It shows the name from EcomDiscount Table not from EcomDiscountTranslation.
May I know how can I get the discount name from EcomDiscountTranslation in product list and product template?

Regards,

Tin Ma Ma

Image8.png Image_1.png

Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Tin ma ma

I belive this has been changed in 9.6 - discount name is updates on the discount table as well when editing the default language.

If the discount has been translated to the name you have in the website context, the name from discount table should not be used.

BR Nicolai

Votes for this answer: 1

 

You must be logged in to post in the forum