Hi,

I'm using the uc edi to export the orders. My client would like to have the actual sell price for each product in the export file. Currently the only coupon vars I have available in the order object is the coupon code and such but each product array within the $order object only has it's original sell price (without calculated discount) available.

How would I go about calculating the discounted price on a per product base? I've tried uc_discounts_get_discounted_price_for_product($product) but this doesn't return anything?

Hope you can share some pointers...

Cheers

Comments

bartezz’s picture

Title: How to calculate altered product price (for UC EDI export) » Store actual sell price in uc_order_products table in data array
Category: support » feature

Well I've started digging some deeper and what I ask above isn't possible I guess. Calculations are made on current shopping carts and uid, etc. So figuring out on a later point how much was actually paid for a single article within an order is almost impossible.

What I would like to propose is that the module stores the actual sell price in the data object in de db table. This way at any time in the future it can be looked up.

For example I have an order #1 with three products;

sku A1 - qty 1 - price 8.5
sku B2 - qty 1 - price 1.75
sku C3 - qty 1 - price 59

I have a coupon that discounts C3 for 25%, this is 14.75. So C3 has an actual sell price of 44.25. But this info is stored nowhere and would be very helpfull in reports and exports. But all I can lookup is the total coupon discount for order #1 of 14.75.

Changing into feature request.

Cheers