Formatting discounts

  • Posts: 85
  • Thank you received: 0
7 years 6 months ago #281024

-- HikaShop version -- : 3.2.1

Hi,

I would like to ask for help again, about formatting discount prices.

At the moment there is a little anomaly with displaying discounts. I attached a screen about what is the current settings, and what I would like to make (right side of the picture).



Thank you in advance.

Regars,
Pal

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 83780
  • Thank you received: 13568
  • MODERATOR
7 years 6 months ago #281027

Hi,

You'll have to edit the file "listing_price" of the view "product" via the menu Display>Views in order to change the way the discount is displayed.
Here is a thread where we talk about that:
www.hikashop.com/forum/4-how-to/21930-ho...discounts.html#33909

Please Log in or Create an account to join the conversation.

  • Posts: 85
  • Thank you received: 0
7 years 6 months ago #281780

Hi,

That post was a good starting point, but I have one more question, I do not find the Discount price in the source code (what is the 10 000 Ft in the example). Please can yopu help me with the discount price line/code what I would like to modify.

Original was (product/ listing_price 87 line)

echo $this->currencyHelper->format(-1*$this->row->discount->discount_flat_amount,$price->price_currency_id);

Modified to:
echo $this->currencyHelper->format($price->price_value_without_discount_with_tax,$price->price_currency_id). '</br> ';
echo $this->currencyHelper->format(-1*$this->row->discount->discount_flat_amount,$price->price_currency_id). '</br> ';

Please Log in or Create an account to join the conversation.

  • Posts: 26232
  • Thank you received: 4035
  • MODERATOR
7 years 6 months ago #281803

Hello,

Since that price is displayed in the view, you can find the corresponding line which contains the information want.
But please note that you can still use PHP in order to know more about what a variable contains.

var_dump($price);

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.132 seconds
Powered by Kunena Forum