Youtube video for Parent and Characteristics

  • Posts: 147
  • Thank you received: 6
9 years 5 months ago #233805

Hi,
I created a custom field for the products, created the embed code in the template override and it all works as expected.
But, when I select a characteristics the videos goes away.

So how could I add the embed video code for the parent and get it to be displayed for the characteristics as well?

Thanks

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

  • Posts: 84307
  • Thank you received: 13701
  • MODERATOR
9 years 5 months ago #233819

Hi,

It should be the case automatically. So this means that there must be a problem with the customization of your product page layout.
What you can do is remove the code:

<div id="hikashop_product_custom_info_<?php echo $variant_name;?>" style="display:none;">
		<h4><?php echo JText::_('SPECIFICATIONS');?></h4>
		<table width="100%">
<?php

			$this->fieldsClass->prefix = '';
			foreach ($this->fields as $fieldName => $oneExtraField) {
				if(empty($variant->$fieldName) && !empty($this->element->main->$fieldName)){
					$variant->$fieldName = $this->element->main->$fieldName;
				}
				if(!empty($variant->$fieldName))
					$variant->$fieldName = trim($variant->$fieldName);
				if(!empty($variant->$fieldName) || (isset($variant->$fieldName) && $variant->$fieldName === '0')) {
?>
			<tr class="hikashop_product_custom_<?php echo $oneExtraField->field_namekey;?>_line">
				<td class="key">
					<span id="hikashop_product_custom_name_<?php echo $oneExtraField->field_id;?>_<?php echo $variant_name;?>" class="hikashop_product_custom_name">
						<?php echo $this->fieldsClass->getFieldName($oneExtraField);?>
					</span>
				</td>
				<td>
					<span id="hikashop_product_custom_value_<?php echo $oneExtraField->field_id;?>_<?php echo $variant_name;?>" class="hikashop_product_custom_value">
						<?php echo $this->fieldsClass->show($oneExtraField,$variant->$fieldName); ?>
					</span>
				</td>
			</tr>
<?php
				}
			}
?>
		</table>
	</div>
from the file "show" of the view "product". That should circumvent the problem.

The following user(s) said Thank You: maujbigo

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

  • Posts: 147
  • Thank you received: 6
9 years 5 months ago #233925

Hi Nicolas thanks for clarifying the correct behavior.
I moved it outside the product_description_main div and it works fine.
The script seems to replace all the content of the div when the select changes.

All sorted now.

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

Time to create page: 0.054 seconds
Powered by Kunena Forum