https://farfor.crm-onebox.com/
The client places an order on the opencart website, the price is 125, there is a discount, after placing the order the price becomes 100. When we upload the order to CPM, the discount is not loaded, the price of the product is just 100. The discount is not recorded in the database, so another solution is needed, like load discount:
As a result, we need to do the following when parsing the products in the order:
1) Take the total and qunatity columns from the oc_order_product table
2) Take from the table oc_product by product_id parse the value of the price column
3) do the calculation [% discount] = 1-total(oc_order_product)/price(oc_product)/qunatity(oc_order_product)
And load the correct price, discount, quantity and exchange rate into the order (orders in euros)
Sale price = price(oc_product)
discount % = [discount %]
and parse the order rate from currency_value(oc_order)
Need an evaluation
https://farfor.crm-onebox.com/ The client places an order on the opencart website, the price is 125, there is a discount, after placing the order the price becomes 100. When we upload the order to CPM, the discount is not loaded, the price of the product is just 100. The discount is not recorded in the database, so another solution is needed, like load discount: As a result, we need to do the following when parsing the products in the order: 1) Take the total and qunatity columns from the oc_order_product table 2) Take from the table oc_product by product_id parse the value of the price column 3) do the calculation [% discount] = 1-total(oc_order_product)/price(oc_product)/qunatity(oc_order_product) And load the correct price, discount, quantity and exchange rate into the order (orders in euros) Sale price = price(oc_product) discount % = [discount %] and parse the order rate from currency_value(oc_order) Need an evaluation
Korop Vladislav Pavlovich KTS wrote: Looked in the database discount is not recorded
And in the admin panel itself, the discount is also not displayed? What is it like?
[quote]
Korop Vladislav Pavlovich
KTS wrote:
Looked in the database discount is not recorded
[/quote]
And in the admin panel itself, the discount is also not displayed? What is it like?
Korop Vladislav Pavlovich KTS wrote: Looked in the database discount is not recorded
And in the admin panel itself, the discount is also not displayed? What is it like?
We looked in the database, the discount is 0 everywhere, they immediately write the discounted price, so we need to calculate it
[quote]
anonymous duck
OneBox production wrote:
[quote]
Korop Vladislav Pavlovich
KTS wrote:
Looked in the database discount is not recorded
[/quote]
And in the admin panel itself, the discount is also not displayed? What is it like?
[/quote]
We looked in the database, the discount is 0 everywhere, they immediately write the discounted price, so we need to calculate it
Please join the conversation. If you have something to say - please write a comment. You will need a mobile phone and an SMS code for identification to enter.
Log in and comment
Donate
You don't have enough funds in your account Top up