Closed (fixed)
Project:
e-Commerce
Version:
master
Component:
other
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
5 May 2006 at 22:07 UTC
Updated:
22 May 2006 at 12:16 UTC
Jump to comment: Most recent file
As required for E-commerce 4.7 we need to get rid of the discounts by role functionality hardcoded in core modules. Also we need to implement the discount API.
This patch strips out the discount by role from core modules and introduce the 'amout' hook for discountapi as required.
At this moment the discount data is not being saved in ec_transaction_misc table as expected and the mappings for role->discount are still being saved to ec_payment_adjust.
The draft for the new role_discount module is in my sandbox.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | ecommerce_discountapi_0.patch | 8.43 KB | recidive |
| ecommerce_discountapi.patch | 9.61 KB | recidive |
Comments
Comment #1
recidive commentedUpdate patch and module. Removed the ec_payment_adjust database table. Now the role_discount module makes use of the brand new product_specials hook and have its own database table (ec_role_discount). The .install script also takes care of loading data from the old table.
Comment #2
gordon commentedThanks, I have commited this.
I have also taken a look at the role_discounts module, and have only 1 concern. The hook_product_specials() can be called by many modules at the same time. So before work out the discount you may want to work out how much discount has already been applied. This is esp. important if you are using % based discounts.
Otherwise you can commit this into the contrib when you are ready.
Good work, thanks.
Comment #3
gordon commenteddone.
Comment #4
(not verified) commented