- Posts: 91
- Thank you received: 5
Show main Product Code on variant change
7 years 4 months ago #307044
by bolando
Show main Product Code on variant change was created by bolando
-- HikaShop version -- : 4.0.2
-- Joomla version -- : 3.9.6
-- PHP version -- : 7.3.0
-- Browser(s) name and version -- : Chrome 74
On my site I display product code in product view. On variant select it changes,
E.g. the code is FD02
and than it changes to FD02_37_48
How can I show always the main code?
I changed the show_default.php part to
but it still changes on variant select.
Thanks!
-- Joomla version -- : 3.9.6
-- PHP version -- : 7.3.0
-- Browser(s) name and version -- : Chrome 74
On my site I display product code in product view. On variant select it changes,
E.g. the code is FD02
and than it changes to FD02_37_48
How can I show always the main code?
I changed the show_default.php part to
Code:
<?php if ($this->config->get('show_code')) { ?>
<span id="hikashop_product_code_main" class="hikashop_product_code_main" itemprop="sku"><?php
echo $this->element->main->product_code;//this line changed
?></span>
<?php } ?>
Thanks!
Please Log in or Create an account to join the conversation.
7 years 4 months ago #307045
by nicolas
Replied by nicolas on topic Show main Product Code on variant change
Hi,
Remove the piece:
That way, the javascript won't change the product code when you change the variant selection.
Remove the piece:
Code:
id="hikashop_product_code_main" class="hikashop_product_code_main"
Please Log in or Create an account to join the conversation.
7 years 4 months ago #307077
by bolando
Replied by bolando on topic Show main Product Code on variant change
Thank you, it helped!
Please Log in or Create an account to join the conversation.
Time to create page: 0.213 seconds