Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
How would I show a calculated discounted price per product in the shopping cart and a catalog?
I'd like to use the following format:
OLD PRICE: €100,00
NEW PRICE: €75,00
Comments
Comment #1
jazzitup CreditAttribution: jazzitup commentedOk, a new price is visible if I use this method: #512060: [SOLVED] Showing discounted price on product nodes
But what approach should I use to show the new price with modifying my tpl.php file?
I was thinking of something like this:
OLD PRICE: [show the original SELL PRICE]
NEW PRICE: [show the discounted SELL PRICE]
OLD PRICE could be shown like this:
print uc_currency_format($node->sell_price);
But how can I show my (discounted) NEW PRICE in the code?
Perhaps I should use a uc_price($price_info, $context) function (which is accessible only within the modules), but is there a way to use this value in my tpl.php?
Comment #2
jazzitup CreditAttribution: jazzitup commentedThis module is so buggy. Sometimes discount predicates don't trigger at all, but maybe it's because of the presence of uc_vat module with some non-imported patches applied.
Comment #3
Scott M. Sanders CreditAttribution: Scott M. Sanders commentedSubscribe: I want to do this too...
Comment #4
Scott M. Sanders CreditAttribution: Scott M. Sanders commentedI kinda figured out a way to do this dynamically on Ubercart catalog pages, if you happen to use the same amount for list and sell prices for your products. First, in Store Admin > Config > Product Settings > Fields, enable the list and sell prices, then...
You should see a column each for list and sell, list being the original price and sell discounted via this module.
You may want to then use the String Overrides module or something else to edit the column headings for these.
Comment #5
bellagio CreditAttribution: bellagio commented#4: List prices show for all products that might not have a discount. (maybe useful for store wide sale)
Did you find a way to show List price for discounted product only?