Developer forum

Forum » Development » Sales Discount and Product relation

Sales Discount and Product relation


Reply
We are going to import products from an external source. These products can individually have a discount percentage.

On import we want to check the EcomSalesDiscount table for a discount with a given discount percentage from a product, if it is not present then create it and afterwards add all the products with the same percentage to it.

My problem is I can't seem to find where poducts linked to a discount is specified. In
EcomSalesDiscount there is a field named SalesDiscountProductsAndGroups, but it is Null in the test I have made.

Have also lokked for a relation table, but haven't found anything.

So can anyone guide me in the right direction?

Replies

 
Nicolai Høeg Pedersen
Reply
A discount valid for specific products saves the information as a parameter on the discount. You can find the information in EcomSalesDiscount table, field SalesDiscountParameters in a xml document. 
 
Reply
The field EcomSalesDiscount.SalesDiscountParameters is empty. At least from what I can see using SQL Firehose in the backend.

So is the problem that I can't see the data using SQL Firehose?

And to clarify, do you mean that the data is stored in that field in XML format?
 
Nicolai Høeg Pedersen
Reply
It might not show up in SQL Firehose because it is html...

Attached a copy of the XML document and screendump of how it looks in administration.
Salesdiscount.JPG
 
Reply
Ah... Perfect...

Thanks for the help...

 

You must be logged in to post in the forum