price/product code labels on product page

  • Posts: 141
  • Thank you received: 3
5 years 6 months ago #311102

-- HikaShop version -- : 4.2.1
-- Joomla version -- : 3.9.8
-- PHP version -- : 7.2.14

Hello, I would like to use labels on product page for product price (and for product code as well). Because of this I edited view for product/show_tabular.php and added code:

echo JText::_('MY_TEXT');
before code
$this->row =& $this->element;
$this->setLayout('listing_price');
echo $this->loadTemplate();

as it was suggested on following forum thread: link

and this solution works when the product page is loaded first time but when I choose any of product variants (related with product characteristic) price label is disappearing

I would like to ask for a hint how keep price/product code labels visible even after product variant will be chosen on product page
Regards,
Greg

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

  • Posts: 83477
  • Thank you received: 13504
  • MODERATOR
5 years 6 months ago #311108

Hi,

You need to add the same code before the lines:

$this->setLayout('listing_price');
echo $this->loadTemplate();
in the file "show" of the view "product" as this is were the variant HTML is displayed so that it can replace the default HTML when you change the variant selection.

The following user(s) said Thank You: Greg_C

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

  • Posts: 141
  • Thank you received: 3
5 years 6 months ago #311126

Hi Nicolas, it works ! thank you !
Regards,
Greg

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

Time to create page: 0.056 seconds
Powered by Kunena Forum