cancel
Showing results for 
Search instead for 
Did you mean: 

Get total price of the product based on attribute selection

Robin_32
Explorer
0 Kudos

Hello Guys,

I have doubt on getting price of products which have the selected attribute.

For example consider product is 'abc'  and it has attribute called type(values: small,medium,large). Suppose I add three 'abc' products. The first product is having attribute type as small. Second have medium and third product have large as attribute value.

Now I need to print the total price of 'abc' product which is having attribute type value as medium and large. Small attribute value in the product should be ignored. Also I need to sum up if there are extra products with medium. Then I need to add those two product total and assign it in a cell of the word template.

Please help me with this issue

paultrozan
Explorer

Edit: Apparently I accidentally submitted multiple comments while trying to add a line break. Here is what I was trying to say:

I'm not sure I understand this question. You have a quote with 3 items in it:
  • ABC ($50 - small)
  • ABC ($100 - medium)
  • ABC ($150 - large)

Is this the scenario? And you just want to sum up the medium and large items for an output document?

 
paultrozan
Explorer

Extra comment - please ignore.

paultrozan
Explorer
0 Kudos

Extra comment - please ignore.

paultrozan
Explorer
0 Kudos

Extra comment - please ignore.

Robin_32
Explorer
0 Kudos
Yes,paultrozan. I want to add total price of product ABC which is having either value medium and large. And if there are multiple products added to the quote then it should sum all the ABC products to get 1 single value(total price).
View Entire Topic
Fancy_Zou
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello,

I understand that you are attempting to perform custom price aggregation calculations, and the result will be utilized in the quote output document. I would suggest implementing this using custom IronPython scripting. You can create a custom object, such as a custom field or a quote table, to store the calculation result, allowing your Word document template to reference it. The value of the custom object can be calculated and assigned in a custom action set as the pre-action of "Generate Documents". This way, every time a new document is generated, the calculation will be triggered and the user will see the updated result in the generated document.

Best Regards
Fancy