Display Earn Points On Product Page

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
4 years 11 months ago #317048

-- HikaShop version -- : 4.2.3
-- Joomla version -- : 3.9.16

Hi

Is there a way to show points that can be earned for a product as per the screen shot?

Thanks

Dave

Attachments:

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

  • Posts: 83409
  • Thank you received: 13502
  • MODERATOR
4 years 11 months ago #317049

Hi,

There is no option for that.
However, you could edit the view file product / show_default.php via the menu Display>Views and add a bit of code for that.
Supposing that you have only one price for a product and no variant, you could use such code:

<?php
echo 'Earn '. round($this->element->pirces[0]->price_value_with_tax*XXX, 0).' points';
?>
where XXX is the rate to calculate the points from the price of the product.

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

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
4 years 11 months ago #317059

Hi

Thanks for that. Some of the products have variants which have a different price so this would not be possible?

Thanks

Dave B)

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

  • Posts: 83409
  • Thank you received: 13502
  • MODERATOR
4 years 11 months ago #317063

Hi,

Well, it's possible, but then it's a lot more complex as you need to have custom javascript code to refresh the text when the selected variant changes. It's about 20/30 lines of code instead of 1 so it requires proper development.

The following user(s) said Thank You: davec

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

Time to create page: 0.061 seconds
Powered by Kunena Forum