Hi,
This patch for the 6.x branch allow to display a description of a discount on the product page.
This patch only apply on the latest bazaar version of the Ubercart 6.x branch, cause it depend on the core modification about product fields administration page (more details here).
So ATM, it couldn't be backported until the 5.x branch of ubercart get this core improvement too.
So, basically, it add a discount line in admin/store/settings/products/edit/fields, if enabled, it display matching discount description into the node.
To do that, I had to alter the return value of uc_discounts_product_discount_price(). Instead of returning a value, it return an array that is interpreted in the nodeapi function. I think it's a good thing for extensibility and this is a first step to make this module work with attributes too..
Here is the patch
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | uc_discounts_discount_description.patch | 4.87 KB | zmove |
| uc_discounts_line_discount_description.patch | 4.38 KB | zmove |
Comments
Comment #1
zmove commentederror in the patch, wait a little moment for another commit
Comment #2
zmove commentedshould work now
Comment #3
psynaptic commentedComment #4
zmove commentedI committed it on the latest 6.x dev version. I added the description entry to the discount array that is associated to a product. So you can access a discount description like that :
Comment #5
zmove commented