- Posts: 12
- Thank you received: 0
Variant names in product title
14 years 9 months ago #34052
by steveman
Replied by steveman on topic Re: Variant names in product title
I managed to get it working with only changing:
to:
You mentioned to remove the lines:
but I didn't find them, so I left them alone.
Seems to work OK, thank you Nicolas.
Code:
echo $this->element->product_name;
Code:
echo $this->element->main->product_name;
You mentioned to remove the lines:
Code:
<div id="hikashop_product_name_<?php echo $variant_name;?>" style="display:none;">
<?php echo $variant->product_name;?>
</div>
Seems to work OK, thank you Nicolas.
Please Log in or Create an account to join the conversation.
7 years 11 months ago #298893
by vashmel
Replied by vashmel on topic Re: Variant names in product title
Hi Nicholas,
Sorry for reviving a post. I am using Hikashop 4 version and I would like to display the variant names that are appended to the Product title on the other part of the page, not just beside the Original title, like under the Prices maybe.
On the show_default.php file, the title only has these codes:
What code do hold's these variant names that gets added to the original product names and where do I find it?
Any help is greatly appreciated.
Sorry for reviving a post. I am using Hikashop 4 version and I would like to display the variant names that are appended to the Product title on the other part of the page, not just beside the Original title, like under the Prices maybe.
On the show_default.php file, the title only has these codes:
Code:
<span id="hikashop_product_name_main" class="hikashop_product_name_main" itemprop="name"><?php
if(hikashop_getCID('product_id') != $this->element->product_id && isset($this->element->main->product_name))
echo $this->element->main->product_name;
else
echo $this->element->product_name;
?></span>
What code do hold's these variant names that gets added to the original product names and where do I find it?
Any help is greatly appreciated.
Please Log in or Create an account to join the conversation.
7 years 11 months ago #298925
by nicolas
Replied by nicolas on topic Re: Variant names in product title
Hi,
The variants data is handled in the "show.php" view file. There, you have the $variant->product_name which contains the full name: main product name + the characteristic values of the current variant.
Note that there is some specific javascript code in administrator/components/com_hikashop/types/characteristic.php in order to dynamically copy the text from the selected variant to the main divs of the show_default view file when the customer changes the selection of the characteristics.
The variants data is handled in the "show.php" view file. There, you have the $variant->product_name which contains the full name: main product name + the characteristic values of the current variant.
Note that there is some specific javascript code in administrator/components/com_hikashop/types/characteristic.php in order to dynamically copy the text from the selected variant to the main divs of the show_default view file when the customer changes the selection of the characteristics.
Please Log in or Create an account to join the conversation.
Time to create page: 0.163 seconds