Active
Project:
Ubercart Discounts (Alternative)
Version:
6.x-2.4
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 May 2012 at 21:32 UTC
Updated:
22 May 2012 at 19:06 UTC
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
Comment #1
bartezz commentedWell 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