Editing Product Attributes in nop4.3

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
2 years ago
I am trying to adjust the Products Attributes for the Messages that are emailed to clients and Store owners.  

I was able to remove the extra field from the Attributes in the PDF files that are attached;
however, the Email content to the client also has those attributes and no matter what I tried in the MessageTokenProvider.cs, the attributes still gets displayed.  

Specifically, I am referring to the orderItem.AttributeDescription and orderItem.CheckoutAttributeDescription from ProductListToHtmlTable.  

Those variables do not seem to have any affect on the attached photo (red box).


Does anyone know how to remove the extra values between the red brackets that is emailed to the Client and Store Owner?
2 years ago
Are you saying the text "WEIGHT: 16Oz[+$5.75]" is not in AttributeDescription ?

There is two fields
orderItem.AttributeDescription
and
orderItem.AttributesXml

AttributeDescription is formated from AttributesXml at the time the order is created

I would have thought the text you want to replace is in these fields and you will need to search in AttributeDescription and replace the text
2 years ago
Hi,
I Tried to remove the tail-end of that value from the WEIGHT values, utilizing this bit of code to no avail.  It worked elsewhere...

          string str = order.CheckoutAttributeDescription;
          int end = str.Length;
         if (str.IndexOf("[") > 0){  
         str.Remove(end - (end - str.IndexOf("[")));  
          }
          sb.AppendLine(str);


I would like to wind-up with WEIGHT: 16Oz
2 years ago
What is the text string in order.CheckoutAttributeDescription
2 years ago
I am not sure.  It is difficult for me to debug it without making a purchase so the email might be generated.
2 years ago
Yidna,

I found and fixed it.  Since I could not debug this issue in real time, I tagged the Both areas (CheckoutAttributeDescription and AttributeDescription).  It happens that the AttributeDescription is where the update is required.  So, it is now complete.  clean tags all around.  

Thanks again for your direction, support, and recommendations.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.