1

I'm trying to edit the html output of the code

<?php echo $product->get_price_html(); ?>

I need to separate the regular price and the promo price in separate siblings divs. And then calculate the price difference between then and show it how much its the discount.

I've read all the questions here regarding this problem but nothing could help me. I think this particular once came close.

Cœur
  • 37,241
  • 25
  • 195
  • 267
zeYuri
  • 45
  • 1
  • 6
  • why didn't it help you? what have you tried? so us some code and it's output – giorgio Nov 13 '17 at 15:06
  • See this related threads: https://stackoverflow.com/questions/43757920/display-the-discounted-percentage-near-sale-price-in-single-product-pages-for-wc and https://stackoverflow.com/questions/47255535/how-to-display-the-regular-price-and-sale-price-in-single-product-and-loop-pages/47255937#47255937 – LoicTheAztec Nov 13 '17 at 15:08
  • @LoicTheAztec Hello, almost there. just discovered that i need the variation price and the promotional variable price. This is a variable product. Should i make another question/thread? – zeYuri Nov 13 '17 at 16:31
  • You should search a bit as this has been already answered too … – LoicTheAztec Nov 13 '17 at 16:33
  • May be this can be helpful: https://stackoverflow.com/questions/46005952/woocommerce-variable-products-keep-only-min-price-with-a-custom-label/46009513#46009513 – LoicTheAztec Nov 13 '17 at 17:21
  • @LoicTheAztec i have made another questionar to clarify the problem. Here is the question https://stackoverflow.com/questions/47328965/displaying-price-only-when-the-variation-is-selected-and-discount-in-percentage – zeYuri Nov 16 '17 at 17:17

0 Answers0