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

jazzitup’s picture

Ok, 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?

jazzitup’s picture

This 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.

Scott M. Sanders’s picture

Subscribe: I want to do this too...

Scott M. Sanders’s picture

I 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...

  • Make a conditional action to "calculate product discounts."
  • Set your conditions as you wish.
  • Set an action to "apply a discount to a product" (only action that applies really) as appropriate.

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.

bellagio’s picture

#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?