[Skip to main content](#vessel-content)

#   Replacing product images with a You Tube Video

##

- **[jazzmeister](/forum/user/4948-jazzmeister "View jazzmeister's Profile")**
- [![jazzmeister's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4948-jazzmeister "View jazzmeister's Profile") Topic Author
- [ Offline](/forum/user/4948-jazzmeister)

Less More

- Posts: 21
- Thank you received: 0
-
-

14 years 10 months ago [\#33140](#33140) by [jazzmeister](/forum/user/4948-jazzmeister "View jazzmeister's Profile")  *[Replacing product images with a You Tube Video](/forum/4-how-to/33140-replacing-product-images-with-a-you-tube-video#33140 "Hi,  my client would like to have an embedded YouTube video in place of his product images, so that they appear automatically appear in the category view and product view.  I am using the Allvideos plugin and can get an YouTube video to appear in the product view by using it in the description, but cannot get it to replace the image in the category view, as the images upload is a browse field, and so cannot have the {youtube}???{/youtube} entered there.  Anyone have any ideas how I can achieve this?  Many thanks  Jason")* was created by *[jazzmeister](/forum/user/4948-jazzmeister "View jazzmeister's Profile")*

Hi,

my client would like to have an embedded YouTube video in place of his product images, so that they appear automatically appear in the category view and product view.

I am using the Allvideos plugin and can get an YouTube video to appear in the product view by using it in the description, but cannot get it to replace the image in the category view, as the images upload is a browse field, and so cannot have the {youtube}???{/youtube} entered there.

Anyone have any ideas how I can achieve this?

Many thanks

Jason

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMzMTQwLXJlcGxhY2luZy1wcm9kdWN0LWltYWdlcy13aXRoLWEteW91LXR1YmUtdmlkZW8/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14266
-
-

14 years 10 months ago [\#33163](#33163) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Replacing product images with a You Tube Video](/forum/4-how-to/33140-replacing-product-images-with-a-you-tube-video#33163 "Hi,  my client would like to have an embedded YouTube video in place of his product images, so that they appear automatically appear in the category view and product view.  I am using the Allvideos plugin and can get an YouTube video to appear in the product view by using it in the description, but cannot get it to replace the image in the category view, as the images upload is a browse field, and so cannot have the {youtube}???{/youtube} entered there.  Anyone have any ideas how I can achieve this?  Many thanks  Jason")*

Hi,

You would have to edit the file corresponding to your listing layout ("listing_img_title" of the view "product" by default) via the menu Display-&gt;Views and remove the image display code and add instead something like that:
&lt;?php echo JHTML::_('content.prepare','{youtube}???{/youtube}'); ?&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMzMTQwLXJlcGxhY2luZy1wcm9kdWN0LWltYWdlcy13aXRoLWEteW91LXR1YmUtdmlkZW8/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jazzmeister](/forum/user/4948-jazzmeister "View jazzmeister's Profile")**
- [![jazzmeister's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4948-jazzmeister "View jazzmeister's Profile") Topic Author
- [ Offline](/forum/user/4948-jazzmeister)

Less More

- Posts: 21
- Thank you received: 0
-
-

14 years 10 months ago [\#33219](#33219) by [jazzmeister](/forum/user/4948-jazzmeister "View jazzmeister's Profile")  Replied by *[jazzmeister](/forum/user/4948-jazzmeister "View jazzmeister's Profile")* on topic *[Re: Replacing product images with a You Tube Video](/forum/4-how-to/33140-replacing-product-images-with-a-you-tube-video#33219 "Hi,  my client would like to have an embedded YouTube video in place of his product images, so that they appear automatically appear in the category view and product view.  I am using the Allvideos plugin and can get an YouTube video to appear in the product view by using it in the description, but cannot get it to replace the image in the category view, as the images upload is a browse field, and so cannot have the {youtube}???{/youtube} entered there.  Anyone have any ideas how I can achieve this?  Many thanks  Jason")*

Thanks for the reply. I would need this to be done automatically so that my client would not need to do any coding. Would there be a way to acheive this through adding a text field to the add product page? I have looked at the code, and cannot quite see how this could be achieved.

Do you (or anyone) offer a custom modification service to HikaShop?

Many thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMzMTQwLXJlcGxhY2luZy1wcm9kdWN0LWltYWdlcy13aXRoLWEteW91LXR1YmUtdmlkZW8/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14266
-
-

14 years 10 months ago [\#33234](#33234) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Replacing product images with a You Tube Video](/forum/4-how-to/33140-replacing-product-images-with-a-you-tube-video#33234 "Hi,  my client would like to have an embedded YouTube video in place of his product images, so that they appear automatically appear in the category view and product view.  I am using the Allvideos plugin and can get an YouTube video to appear in the product view by using it in the description, but cannot get it to replace the image in the category view, as the images upload is a browse field, and so cannot have the {youtube}???{/youtube} entered there.  Anyone have any ideas how I can achieve this?  Many thanks  Jason")*

Yes, you could create a custom field of the table "product" via the menu Display-&gt;Custom fields in our commercial editions.
That would display a new field on the product page.
Suppose that your custom field column name is "youtube_link"

You could use the code:

&lt;?php echo JHTML::_('content.prepare','{youtube}'.$this-&gt;row-&gt;youtube_link.'{/youtube}'); ?&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMzMTQwLXJlcGxhY2luZy1wcm9kdWN0LWltYWdlcy13aXRoLWEteW91LXR1YmUtdmlkZW8/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jazzmeister](/forum/user/4948-jazzmeister "View jazzmeister's Profile")**
- [![jazzmeister's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4948-jazzmeister "View jazzmeister's Profile") Topic Author
- [ Offline](/forum/user/4948-jazzmeister)

Less More

- Posts: 21
- Thank you received: 0
-
-

14 years 10 months ago [\#33309](#33309) by [jazzmeister](/forum/user/4948-jazzmeister "View jazzmeister's Profile")  Replied by *[jazzmeister](/forum/user/4948-jazzmeister "View jazzmeister's Profile")* on topic *[Re: Replacing product images with a You Tube Video](/forum/4-how-to/33140-replacing-product-images-with-a-you-tube-video#33309 "Hi,  my client would like to have an embedded YouTube video in place of his product images, so that they appear automatically appear in the category view and product view.  I am using the Allvideos plugin and can get an YouTube video to appear in the product view by using it in the description, but cannot get it to replace the image in the category view, as the images upload is a browse field, and so cannot have the {youtube}???{/youtube} entered there.  Anyone have any ideas how I can achieve this?  Many thanks  Jason")*

Thats great, have purchased commercial version today and that works.

Trying to do a similar thing now with a link to google maps

I have added a custom field for products, and this displays as a text box on the add products page where I can enter a link.

My column is called 'location' and my code is: &lt;?php echo JHTML::_('content.prepare','&lt;a href="'.$this-&gt;row-&gt;location.'"&gt;Location&lt;/a&gt;'); ?&gt; in the products, show.php

However I cannot seem to get the link to work on the frontend, it just goes to the root of my website all the time???

Any suggestions?

Many thanks again

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMzMTQwLXJlcGxhY2luZy1wcm9kdWN0LWltYWdlcy13aXRoLWEteW91LXR1YmUtdmlkZW8/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14266
-
-

14 years 10 months ago [\#33325](#33325) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Replacing product images with a You Tube Video](/forum/4-how-to/33140-replacing-product-images-with-a-you-tube-video#33325 "Hi,  my client would like to have an embedded YouTube video in place of his product images, so that they appear automatically appear in the category view and product view.  I am using the Allvideos plugin and can get an YouTube video to appear in the product view by using it in the description, but cannot get it to replace the image in the category view, as the images upload is a browse field, and so cannot have the {youtube}???{/youtube} entered there.  Anyone have any ideas how I can achieve this?  Many thanks  Jason")*

If you don't use a content plugin, you can simply do:
&lt;a href="&lt;?php echo $this-&gt;row-&gt;location; ?&gt;"&gt;Location&lt;/a&gt;

Make sure that you have the http:// in your location field.
If that still doesn't work, please give a link to that page so that we can see what you did.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMzMTQwLXJlcGxhY2luZy1wcm9kdWN0LWltYWdlcy13aXRoLWEteW91LXR1YmUtdmlkZW8/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jazzmeister](/forum/user/4948-jazzmeister "View jazzmeister's Profile")**
- [![jazzmeister's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4948-jazzmeister "View jazzmeister's Profile") Topic Author
- [ Offline](/forum/user/4948-jazzmeister)

Less More

- Posts: 21
- Thank you received: 0
-
-

14 years 10 months ago [\#33387](#33387) by [jazzmeister](/forum/user/4948-jazzmeister "View jazzmeister's Profile")  Replied by *[jazzmeister](/forum/user/4948-jazzmeister "View jazzmeister's Profile")* on topic *[Re: Replacing product images with a You Tube Video](/forum/4-how-to/33140-replacing-product-images-with-a-you-tube-video#33387 "Hi,  my client would like to have an embedded YouTube video in place of his product images, so that they appear automatically appear in the category view and product view.  I am using the Allvideos plugin and can get an YouTube video to appear in the product view by using it in the description, but cannot get it to replace the image in the category view, as the images upload is a browse field, and so cannot have the {youtube}???{/youtube} entered there.  Anyone have any ideas how I can achieve this?  Many thanks  Jason")*

Hi,

no still not working, have checked that there is http: on the products page backend.

Here is a link to the frontend: [ www.stillwalks.com/beta/index.php/walks/product/cid-59](http://www.stillwalks.com/beta/index.php/walks/product/cid-59)

and here is the code for product.show

(look for line of code near bottom, &lt;!-- CODE FOR LOCATION --&gt; )

&lt;?php
/**
* @package HikaShop for Joomla!
* @version 1.5.5
* @author hikashop.com
* @copyright (C) 2010-2011 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 [ www.gnu.org/licenses/gpl-3.0.html](http://www.gnu.org/licenses/gpl-3.0.html)
*/
defined('_JEXEC') or die('Restricted access');
?&gt;
&lt;div style="background-color:#ffffff; width: 625px; padding: 20px; margin-top: 15px; position:relative; overflow:hidden;" id="hikashop_product_&lt;?php echo @$this-&gt;element-&gt;product_code; ?&gt;_page" class="hikashop_product_page"&gt;
&lt;div id="hikashop_product_&lt;?php echo @$this-&gt;element-&gt;product_code; ?&gt;_page" class="hikashop_product_page"&gt;
&lt;?php if(empty($this-&gt;element)){
$app =&amp; JFactory::getApplication();
$app-&gt;enqueueMessage(JText::_('PRODUCT_NOT_FOUND'));
}else{
?&gt;
&lt;form action="&lt;?php echo hikashop_completeLink('product&amp;task=updatecart'); ?&gt;" method="post" name="hikashop_product_form" enctype="multipart/form-data"&gt;
&lt;div id="hikashop_product_top_part" class="hikashop_product_top_part"&gt;

&lt;h1&gt; &lt;div style="width:500px; float:left; font-weight:900; height:25px; overflow:hidden; " id="hikashop_product_name_main" class="hikashop_product_name_main"&gt;
&lt;?php
echo $this-&gt;element-&gt;product_name;
?&gt;
&lt;/div&gt;&lt;/h1&gt;
&lt;span class="hikashop_product_page" style=" width: 600px; padding: 20px; margin-top: 15px;"&gt;&lt;/span&gt;
&lt;div style="position:relative;
width:100px;
left:510px;
top:-50px;"&gt;
&lt;/div&gt;
&lt;img src="/beta/images/line.png" width="630" height="3" style="position:relative; top:-30px;"&gt;
&lt;span id="hikashop_product_code_main" class="hikashop_product_code_main"&gt;
&lt;?php
echo $this-&gt;element-&gt;product_code;
?&gt;
&lt;/span&gt;

&lt;?php
$pluginsClass = hikashop_get('class.plugins');
$plugin = $pluginsClass-&gt;getByName('content','hikashopsocial');
if(@$plugin-&gt;published &#124;&#124; @$plugin-&gt;enabled){
echo '{hikashop_social}';
}
?&gt;

&lt;/div&gt;
&lt;div id="hikashop_product_left_part" class="hikashop_product_left_part"&gt;
&lt;div id="hikashop_product_image_main" &gt;
&lt;div id="hikashop_main_image_div" class="hikashop_main_image_div"&gt;
&lt;?php
$image = null;
if(!empty($this-&gt;element-&gt;images)){
$image = reset($this-&gt;element-&gt;images);
}
if(!$this-&gt;config-&gt;get('thumbnail')){
if(!empty($image)){
echo '&lt;img src="'.$this-&gt;image-&gt;uploadFolder_url.$image-&gt;file_path.'" alt="'.$image-&gt;file_name.'" id="hikashop_main_image" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle" /&gt;';
}
}else{
$height = $this-&gt;config-&gt;get('thumbnail_y');
$style='';
if(!empty($this-&gt;element-&gt;images) &amp;&amp; count($this-&gt;element-&gt;images)&gt;1){
if(!empty($height)){
$style=' style="height:'.($height+5).'px;"';
}
} ?&gt;
&lt;div class="hikashop_product_main_image_thumb" id="hikashop_main_image_thumb_div" &lt;?php echo $style;?&gt; &gt;
&lt;?php echo $this-&gt;image-&gt;display(@$image-&gt;file_path,true,@$image-&gt;file_name,'id="hikashop_main_image" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle"','id="hikashop_main_image_link"'); ?&gt;
&lt;/div&gt;
&lt;?php }
?&gt;
&lt;/div&gt;&lt;div id="hikashop_small_image_div" class="hikashop_small_image_div"&gt;&lt;?php
if(!empty($this-&gt;element-&gt;images) &amp;&amp; count($this-&gt;element-&gt;images)&gt;1){
foreach($this-&gt;element-&gt;images as $image){
echo $this-&gt;image-&gt;display($image-&gt;file_path,'hikashop_main_image',$image-&gt;file_name,'class="hikashop_child_image"');
}
}
?&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id="hikashop_product_right_part" class="hikashop_product_right_part" style="margin-top:-35px;"&gt;
&lt;span id="hikashop_product_price_main" class="hikashop_product_price_main"&gt;&lt;h1&gt;
&lt;?php
if($this-&gt;params-&gt;get('show_price')){
$this-&gt;row =&amp; $this-&gt;element;
$this-&gt;setLayout('listing_price');
echo $this-&gt;loadTemplate();
}
?&gt;&lt;/h1&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;?php if(isset($this-&gt;element-&gt;product_weight) &amp;&amp; bccomp($this-&gt;element-&gt;product_weight,0,3)){ ?&gt;
&lt;span id="hikashop_product_weight_main" class="hikashop_product_weight_main"&gt;
&lt;?php echo JText::_('PRODUCT_WEIGHT').': '.rtrim(rtrim($this-&gt;element-&gt;product_weight,'0'),',.').' '.JText::_($this-&gt;element-&gt;product_weight_unit); ?&gt;&lt;br /&gt;
&lt;/span&gt;
&lt;?php
}
if($this-&gt;config-&gt;get('dimensions_display',0) &amp;&amp; bccomp($this-&gt;element-&gt;product_width,0,3)){ ?&gt;
&lt;span id="hikashop_product_width_main" class="hikashop_product_width_main"&gt;
&lt;?php echo JText::_('PRODUCT_WIDTH').': '.rtrim(rtrim($this-&gt;element-&gt;product_width,'0'),',.').' '.JText::_($this-&gt;element-&gt;product_dimension_unit); ?&gt;&lt;br /&gt;
&lt;/span&gt;
&lt;?php }
if($this-&gt;config-&gt;get('dimensions_display',0) &amp;&amp; bccomp($this-&gt;element-&gt;product_length,0,3)){ ?&gt;
&lt;span id="hikashop_product_length_main" class="hikashop_product_length_main"&gt;
&lt;?php echo JText::_('PRODUCT_LENGTH').': '.rtrim(rtrim($this-&gt;element-&gt;product_length,'0'),',.').' '.JText::_($this-&gt;element-&gt;product_dimension_unit); ?&gt;&lt;br /&gt;
&lt;/span&gt;
&lt;?php }
if($this-&gt;config-&gt;get('dimensions_display',0) &amp;&amp; bccomp($this-&gt;element-&gt;product_height,0,3)){ ?&gt;
&lt;span id="hikashop_product_height_main" class="hikashop_product_height_main"&gt;
&lt;?php echo JText::_('PRODUCT_HEIGHT').': '.rtrim(rtrim($this-&gt;element-&gt;product_height,'0'),',.').' '.JText::_($this-&gt;element-&gt;product_dimension_unit); ?&gt;&lt;br /&gt;
&lt;/span&gt;
&lt;?php }
if(!empty($this-&gt;element-&gt;characteristics)){
?&gt;&lt;div id="hikashop_product_characteristics" class="hikashop_product_characteristics" style="font-size:14px;"&gt;&lt;?php
echo $this-&gt;characteristic-&gt;displayFE($this-&gt;element,$this-&gt;params);
?&gt;&lt;/div&gt;&lt;br /&gt;&lt;?php
}
$form = '';
if(!$this-&gt;config-&gt;get('ajax_add_to_cart',1)){
$form = ',\'hikashop_product_form\'';
}
if(hikashop_level(1) &amp;&amp; !empty($this-&gt;element-&gt;options)){
?&gt;&lt;div id="hikashop_product_options" class="hikashop_product_options"&gt;&lt;?php
$this-&gt;setLayout('option');
echo $this-&gt;loadTemplate();
?&gt;&lt;/div&gt;&lt;br /&gt;&lt;?php
$form = ',\'hikashop_product_form\'';
if($this-&gt;config-&gt;get('redirect_url_after_add_cart','stay_if_cart')=='ask_user'){ ?&gt;
&lt;input type="hidden" name="popup" value="1"/&gt;
&lt;?php }
}
if(!$this-&gt;params-&gt;get('catalogue') &amp;&amp; ($this-&gt;config-&gt;get('display_add_to_cart_for_free_products') &#124;&#124; !empty($this-&gt;element-&gt;prices))){
if(!empty($this-&gt;itemFields)){
$form = ',\'hikashop_product_form\'';
if($this-&gt;config-&gt;get('redirect_url_after_add_cart','stay_if_cart')=='ask_user'){ ?&gt;
&lt;input type="hidden" name="popup" value="1"/&gt;
&lt;?php } ?&gt;
&lt;div id="hikashop_product_custom_item_info" class="hikashop_product_custom_item_info"&gt;
&lt;table width="100%"&gt;
&lt;?php
foreach($this-&gt;itemFields as $fieldName =&gt; $oneExtraField) {
$itemData = JRequest::getString('item_data_'.$fieldName,$this-&gt;element-&gt;$fieldName); ?&gt;
&lt;tr id="hikashop_item_&lt;?php echo $oneExtraField-&gt;field_namekey; ?&gt;" class="hikashop_item_&lt;?php echo $oneExtraField-&gt;field_namekey;?&gt;_line"&gt;
&lt;td class="key"&gt;
&lt;span id="hikashop_product_custom_item_name_&lt;?php echo $oneExtraField-&gt;field_id;?&gt;" class="hikashop_product_custom_item_name"&gt;
&lt;?php echo $this-&gt;fieldsClass-&gt;getFieldName($oneExtraField);?&gt;
&lt;/span&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;span id="hikashop_product_custom_item_value_&lt;?php echo $oneExtraField-&gt;field_id;?&gt;" class="hikashop_product_custom_item_value"&gt;
&lt;?php $onWhat='onchange'; if($oneExtraField-&gt;field_type=='radio') $onWhat='onclick'; ?&gt;
&lt;?php echo $this-&gt;fieldsClass-&gt;display($oneExtraField,$itemData,'data[item]',false,' '.$onWhat.'="hikashopToggleFields(this.value,\''.$fieldName.'\',\'item\',0);"'); ?&gt;
&lt;/span&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;?php
}?&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;?php }
}
if(hikashop_level(1) &amp;&amp; !empty($this-&gt;element-&gt;options)){ ?&gt;
&lt;span id="hikashop_product_price_with_options_main" class="hikashop_product_price_with_options_main"&gt;
&lt;/span&gt;
&lt;?php } ?&gt;
&lt;div id="hikashop_product_quantity_main" class="hikashop_product_quantity_main"&gt;&lt;?php
$this-&gt;row =&amp; $this-&gt;element;
$this-&gt;ajax = 'if(hikashopCheckChangeForm(\'item\',\'hikashop_product_form\')){ return hikashopModifyQuantity(\''.$this-&gt;row-&gt;product_id.'\',field,1'.$form.'); } else { return false; }';
$this-&gt;setLayout('quantity');
echo $this-&gt;loadTemplate();
?&gt;
&lt;/div&gt;
&lt;?php $contact = $this-&gt;config-&gt;get('product_contact',0); ?&gt;
&lt;div id="hikashop_product_contact_main" class="hikashop_product_contact_main"&gt;
&lt;?php
if(hikashop_level(1) &amp;&amp; ($contact==2 &#124;&#124; ($contact==1 &amp;&amp; !empty($this-&gt;element-&gt;product_contact)))){
$empty='';
$params = new JParameter($empty);
echo $this-&gt;cart-&gt;displayButton(JText::_('CONTACT_US_FOR_INFO'),'contact_us',$params,hikashop_completeLink('product&amp;task=contact&amp;cid='.$this-&gt;row-&gt;product_id),'window.location=\''.hikashop_completeLink('product&amp;task=contact&amp;cid='.$this-&gt;row-&gt;product_id).'\';return false;');
} ?&gt;
&lt;/div&gt;
&lt;?php if(!empty($this-&gt;fields)){?&gt;
&lt;div id="hikashop_product_custom_info_main" class="hikashop_product_custom_info_main"&gt;
&lt;h4&gt;&lt;?php echo JText::_('SPECIFICATIONS');?&gt;&lt;/h4&gt;
&lt;table width="100%"&gt;
&lt;?php
$this-&gt;fieldsClass-&gt;prefix = '';
foreach($this-&gt;fields as $fieldName =&gt; $oneExtraField) {
if(!empty($this-&gt;element-&gt;$fieldName)){ ?&gt;
&lt;tr class="hikashop_product_custom_&lt;?php echo $oneExtraField-&gt;field_namekey;?&gt;_line"&gt;
&lt;td class="key"&gt;
&lt;span id="hikashop_product_custom_name_&lt;?php echo $oneExtraField-&gt;field_id;?&gt;" class="hikashop_product_custom_name"&gt;
&lt;?php echo $this-&gt;fieldsClass-&gt;getFieldName($oneExtraField);?&gt;
&lt;/span&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;span id="hikashop_product_custom_value_&lt;?php echo $oneExtraField-&gt;field_id;?&gt;" class="hikashop_product_custom_value"&gt;
&lt;?php echo $this-&gt;fieldsClass-&gt;show($oneExtraField,$this-&gt;element-&gt;$fieldName); ?&gt;
&lt;/span&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;?php }
}?&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;?php } ?&gt;
&lt;span id="hikashop_product_id_main" class="hikashop_product_id_main"&gt;
&lt;input type="hidden" name="product_id" value="&lt;?php echo $this-&gt;element-&gt;product_id; ?&gt;" /&gt;
&lt;/span&gt;
&lt;/div&gt;
&lt;div id="hikashop_product_bottom_part" class="hikashop_product_bottom_part"&gt;
&lt;div id="hikashop_product_description_main" class="hikashop_product_description_main" style="margin-top:-30px;"&gt;
&lt;?php echo JHTML::_('content.prepare',preg_replace('#&lt;hr *id="system-readmore" */&gt;#i','',$this-&gt;element-&gt;product_description)); ?&gt;
&lt;/div&gt;
&lt;span id="hikashop_product_url_main" class="hikashop_product_url_main"&gt;
&lt;?php
if(!empty($this-&gt;element-&gt;product_url)){
echo JText::sprintf('MANUFACTURER_URL','&lt;a href="'.$this-&gt;element-&gt;product_url.'" target="_blank"&gt;'.$this-&gt;element-&gt;product_url.'&lt;/a&gt;');
} ?&gt;
&lt;/span&gt;
&lt;div id="hikashop_product_files_main" class="hikashop_product_files_main"&gt;
&lt;?php if(!empty($this-&gt;element-&gt;files)){
$skip = true;
foreach($this-&gt;element-&gt;files as $file){
if($file-&gt;file_free_download) $skip = false;
}
if(!$skip){
?&gt;
&lt;fieldset class="hikashop_product_files_fieldset"&gt;
&lt;?php $html = array();
echo '&lt;legend&gt;'. JText::_('DOWNLOADS').'&lt;/legend&gt;';
foreach($this-&gt;element-&gt;files as $file){
if(empty($file-&gt;file_name)){
$file-&gt;file_name = $file-&gt;file_path;
}
$fileHtml = '';
if(!empty($file-&gt;file_free_download)){
$fileHtml = '&lt;a class="hikashop_product_file_link" href="'.hikashop_completeLink('product&amp;task=download&amp;file_id='.$file-&gt;file_id).'"&gt;'.$file-&gt;file_name.'&lt;/a&gt;&lt;br/&gt;';
}
$html[]=$fileHtml;
}
echo implode('&lt;br/&gt;',$html); ?&gt;
&lt;/fieldset&gt;
&lt;?php }
} ?&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;input type="hidden" name="add" value="1"/&gt;
&lt;input type="hidden" name="ctrl" value="product"/&gt;
&lt;input type="hidden" name="task" value="updatecart"/&gt;
&lt;input type="hidden" name="return_url" value="&lt;?php echo urlencode(base64_encode(urldecode($this-&gt;redirect_url)));?&gt;"/&gt;
&lt;/form&gt;
&lt;?php
if(empty($this-&gt;element-&gt;variants)){
if(hikashop_level(1) &amp;&amp; !empty($this-&gt;element-&gt;options)){
if(!empty($this-&gt;row-&gt;prices)){
foreach($this-&gt;row-&gt;prices as $price){
if(isset($price-&gt;price_min_quantity) &amp;&amp; empty($this-&gt;cart_product_price)){
if($price-&gt;price_min_quantity&lt;=1){
if($this-&gt;params-&gt;get('price_with_tax')){
$priceUsed = $price-&gt;price_value_with_tax;
}else{
$priceUsed = $price-&gt;price_value;
}
echo '
&lt;input type="hidden" name="hikashop_price_product" value="'.$this-&gt;row-&gt;product_id.'" /&gt;
&lt;input type="hidden" id="hikashop_price_product_'.$this-&gt;row-&gt;product_id.'" value="'.$priceUsed.'" /&gt;
&lt;input type="hidden" id="hikashop_price_product_with_options_'.$this-&gt;row-&gt;product_id.'" value="'.$priceUsed.'" /&gt;';
}
}
}
}
}
}else{
foreach($this-&gt;element-&gt;variants as $variant){
$variant_name = array();
if(!empty($variant-&gt;characteristics)){
foreach($variant-&gt;characteristics as $k =&gt; $ch){
$variant_name[]=$ch-&gt;characteristic_id;
}
}
$variant_name = implode('_',$variant_name);
if(!empty($variant-&gt;images)){
?&gt;
&lt;div id="hikashop_product_image_&lt;?php echo $variant_name;?&gt;" style="display:none;"&gt;
&lt;div id="hikashop_main_image_div_&lt;?php echo $variant_name;?&gt;" class="hikashop_main_image_div"&gt;
&lt;?php
$image = reset($variant-&gt;images);
if(!$this-&gt;config-&gt;get('thumbnail')){
echo '&lt;img src="'.$this-&gt;image-&gt;uploadFolder_url.$image-&gt;file_path.'" alt="'.$image-&gt;file_name.'" id="hikashop_main_image_'.$variant_name.'" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle" /&gt;';
}else{
$style='';
if(!empty($variant-&gt;images) &amp;&amp; count($variant-&gt;images)&gt;1){
$height = $this-&gt;config-&gt;get('thumbnail_y');
if(!empty($height)){
$style=' style="height:'.($height+5).'px;"';
}
} ?&gt;
&lt;div class="hikashop_product_main_image_thumb" id="hikashop_main_image_thumb_div_&lt;?php echo $variant_name;?&gt;" &lt;?php echo $style;?&gt;&gt;
&lt;?php echo $this-&gt;image-&gt;display($image-&gt;file_path,true,$image-&gt;file_name,'id="hikashop_main_image_'.$variant_name.'" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle"','id="hikashop_main_image_'.$variant_name.'_link"'); ?&gt;
&lt;/div&gt;
&lt;?php
}
if(!empty($variant-&gt;images) &amp;&amp; count($variant-&gt;images)&gt;1){
?&gt;
&lt;/div&gt;&lt;div id="hikashop_small_image_div_&lt;?php echo $variant_name;?&gt;" class="hikashop_small_image_div"&gt;&lt;?php
foreach($variant-&gt;images as $image){
echo $this-&gt;image-&gt;display($image-&gt;file_path,'hikashop_main_image_'.$variant_name,$image-&gt;file_name,'class="hikashop_child_image"');
}
}
?&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;?php } ?&gt;
&lt;div id="hikashop_product_name_&lt;?php echo $variant_name;?&gt;" style="display:none;"&gt;
&lt;?php echo $variant-&gt;product_name;?&gt;
&lt;/div&gt;
&lt;div id="hikashop_product_code_&lt;?php echo $variant_name;?&gt;" style="display:none;"&gt;
&lt;?php echo $variant-&gt;product_code;?&gt;
&lt;/div&gt;
&lt;div id="hikashop_product_price_&lt;?php echo $variant_name;?&gt;" style="display:none;"&gt;&lt;h1&gt;
&lt;?php
if($this-&gt;params-&gt;get('show_price')){
$this-&gt;row =&amp; $variant;
$this-&gt;setLayout('listing_price');
echo $this-&gt;loadTemplate();
}
?&gt;&lt;/h1&gt;
&lt;/div&gt;
&lt;?php
if(hikashop_level(1) &amp;&amp; !empty($this-&gt;element-&gt;options)){
if(!empty($this-&gt;row-&gt;prices)){
foreach($this-&gt;row-&gt;prices as $price){
if(isset($price-&gt;price_min_quantity) &amp;&amp; empty($this-&gt;cart_product_price)){
if($price-&gt;price_min_quantity&lt;=1){
if($this-&gt;params-&gt;get('price_with_tax')){
$priceUsed = $price-&gt;price_value_with_tax;
}else{
$priceUsed = $price-&gt;price_value;
}
echo '
&lt;input type="hidden" name="hikashop_price_product" value="'.$this-&gt;row-&gt;product_id.'" /&gt;
&lt;input type="hidden" id="hikashop_price_product_'.$this-&gt;row-&gt;product_id.'" value="'.$priceUsed.'" /&gt;
&lt;input type="hidden" id="hikashop_price_product_with_options_'.$this-&gt;row-&gt;product_id.'" value="'.$priceUsed.'" /&gt;';
}
}
}
}
}
?&gt;
&lt;div id="hikashop_product_quantity_&lt;?php echo $variant_name;?&gt;" style="display:none;"&gt;
&lt;?php
$this-&gt;row =&amp; $variant;
$this-&gt;ajax = 'if(hikashopCheckChangeForm(\'item\',\'hikashop_product_form\')){ return hikashopModifyQuantity(\''.$this-&gt;row-&gt;product_id.'\',field,1'.$form.'); } else { return false; }';
$this-&gt;setLayout('quantity');
echo $this-&gt;loadTemplate();
?&gt;
&lt;/div&gt;
&lt;div id="hikashop_product_contact_&lt;?php echo $variant_name;?&gt;" style="display:none;"&gt;
&lt;?php
if(hikashop_level(1) &amp;&amp; ($contact==2 &#124;&#124; ($contact==1 &amp;&amp; !empty($variant-&gt;product_contact)))){
echo $this-&gt;cart-&gt;displayButton(JText::_('CONTACT_US_FOR_INFO'),'contact_us',@$this-&gt;params,hikashop_completeLink('product&amp;task=contact&amp;cid='.$variant-&gt;product_id),'window.location=\''.hikashop_completeLink('product&amp;task=contact&amp;cid='.$variant-&gt;product_id).'\';return false;');
}
?&gt;
&lt;/div&gt;
&lt;div id="hikashop_product_description_&lt;?php echo $variant_name;?&gt;" style="display:none;"&gt;
&lt;?php echo JHTML::_('content.prepare',preg_replace('#&lt;hr *id="system-readmore" */&gt;#i','',$variant-&gt;product_description));?&gt;
&lt;/div&gt;
&lt;?php if(isset($variant-&gt;product_weight) &amp;&amp; bccomp($variant-&gt;product_weight,0,3)){ ?&gt;
&lt;div id="hikashop_product_weight_&lt;?php echo $variant_name;?&gt;" style="display:none;"&gt;
&lt;?php echo JText::_('PRODUCT_WEIGHT').': '.rtrim(rtrim($variant-&gt;product_weight,'0'),',.').' '.JText::_($variant-&gt;product_weight_unit); ?&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;?php }
if($this-&gt;config-&gt;get('dimensions_display',0)){
if(isset($variant-&gt;product_width) &amp;&amp; bccomp($variant-&gt;product_width,0,3)){ ?&gt;
&lt;div id="hikashop_product_width_&lt;?php echo $variant_name;?&gt;" style="display:none;"&gt;
&lt;?php echo JText::_('PRODUCT_WIDTH').': '.rtrim(rtrim($variant-&gt;product_width,'0'),',.').' '.JText::_($variant-&gt;product_dimension_unit); ?&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;?php } ?&gt;
&lt;?php if(isset($variant-&gt;product_length) &amp;&amp; bccomp($variant-&gt;product_length,0,3)){ ?&gt;
&lt;div id="hikashop_product_length_&lt;?php echo $variant_name;?&gt;" style="display:none;"&gt;
&lt;?php echo JText::_('PRODUCT_LENGTH').': '.rtrim(rtrim($variant-&gt;product_length,'0'),',.').' '.JText::_($variant-&gt;product_dimension_unit); ?&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;?php } ?&gt;
&lt;?php if(isset($variant-&gt;product_height) &amp;&amp; bccomp($variant-&gt;product_height,0,3)){ ?&gt;
&lt;div id="hikashop_product_height_&lt;?php echo $variant_name;?&gt;" style="display:none;"&gt;
&lt;?php echo JText::_('PRODUCT_HEIGHT').': '.rtrim(rtrim($variant-&gt;product_height,'0'),',.').' '.JText::_($variant-&gt;product_dimension_unit); ?&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;?php }
} ?&gt;
&lt;span id="hikashop_product_url_&lt;?php echo $variant_name;?&gt;" style="display:none;"&gt;
&lt;?php
if(!empty($variant-&gt;product_url)){
echo JText::sprintf('MANUFACTURER_URL','&lt;a href="'.$variant-&gt;product_url.'" target="_blank"&gt;'.$variant-&gt;product_url.'&lt;/a&gt;');
} ?&gt;
&lt;/span&gt;
&lt;span id="hikashop_product_id_&lt;?php echo $variant_name;?&gt;"&gt;
&lt;input type="hidden" name="product_id" value="&lt;?php echo $variant-&gt;product_id; ?&gt;" /&gt;
&lt;/span&gt;
&lt;?php if(!empty($this-&gt;fields)){?&gt;
&lt;div id="hikashop_product_custom_info_&lt;?php echo $variant_name;?&gt;" style="display:none;"&gt;
&lt;h4&gt;&lt;?php echo JText::_('SPECIFICATIONS');?&gt;&lt;/h4&gt;
&lt;table width="100%"&gt;
&lt;?php
$this-&gt;fieldsClass-&gt;prefix = '';
foreach($this-&gt;fields as $fieldName =&gt; $oneExtraField) {
if(!empty($variant-&gt;$fieldName)){ ?&gt;
&lt;tr class="hikashop_product_custom_&lt;?php echo $oneExtraField-&gt;field_namekey;?&gt;_line"&gt;
&lt;td class="key"&gt;
&lt;span id="hikashop_product_custom_name_&lt;?php echo $oneExtraField-&gt;field_id;?&gt;_&lt;?php echo $variant_name;?&gt;" class="hikashop_product_custom_name"&gt;
&lt;?php echo $this-&gt;fieldsClass-&gt;getFieldName($oneExtraField);?&gt;
&lt;/span&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;span id="hikashop_product_custom_value_&lt;?php echo $oneExtraField-&gt;field_id;?&gt;_&lt;?php echo $variant_name;?&gt;" class="hikashop_product_custom_value"&gt;
&lt;?php echo $this-&gt;fieldsClass-&gt;show($oneExtraField,$variant-&gt;$fieldName); ?&gt;
&lt;/span&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;?php }
}?&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;?php }
if(!empty($variant-&gt;files)){
$skip = true;
foreach($variant-&gt;files as $file){
if($file-&gt;file_free_download) $skip = false;
}
if(!$skip){ ?&gt;
&lt;div id="hikashop_product_files_&lt;?php echo $variant_name;?&gt;" style="display:none;"&gt;
&lt;fieldset class="hikashop_product_files_fieldset"&gt;
&lt;?php $html = array();
echo '&lt;legend&gt;'. JText::_('DOWNLOADS').'&lt;/legend&gt;';
foreach($variant-&gt;files as $file){
if(empty($file-&gt;file_name)){
$file-&gt;file_name = $file-&gt;file_path;
}
$fileHtml = '';
if(!empty($file-&gt;file_free_download)){
$fileHtml = '&lt;a class="hikashop_product_file_link" href="'.hikashop_completeLink('product&amp;task=download&amp;file_id='.$file-&gt;file_id).'"&gt;'.$file-&gt;file_name.'&lt;/a&gt;&lt;br/&gt;';
}
$html[]=$fileHtml;
}
echo implode('&lt;br/&gt;',$html); ?&gt;
&lt;/fieldset&gt;
&lt;/div&gt;
&lt;?php }
}
}
}
$this-&gt;params-&gt;set('show_price_weight',0);
?&gt;
&lt;div class="hikashop_submodules" id="hikashop_submodules" style="clear:both"&gt;
&lt;?php
if(!empty($this-&gt;modules) &amp;&amp; is_array($this-&gt;modules)){
jimport('joomla.application.module.helper');
foreach($this-&gt;modules as $module){
echo JModuleHelper::renderModule($module);
}
}
?&gt;
&lt;/div&gt;
&lt;div class="hikashop_external_comments" id="hikashop_external_comments" style="clear:both"&gt;
&lt;?php
$config =&amp; hikashop_config();
if($config-&gt;get('comments_feature') == 'jcomments'){
$comments = HIKASHOP_ROOT.'components'.DS.'com_jcomments'.DS.'jcomments.php';
if (file_exists($comments)) {
require_once($comments);
echo JComments::showComments($this-&gt;element-&gt;product_id, 'com_hikashop', $this-&gt;element-&gt;product_name);
}
}elseif($config-&gt;get('comments_feature') == 'jomcomment'){
$comments = HIKASHOP_ROOT.'plugins'.DS.'content'.DS.'jom_comment_bot.php';
if (file_exists($comments)) {
require_once($comments);
echo jomcomment($this-&gt;element-&gt;product_id, 'com_hikashop');
}
}
?&gt;
&lt;/div&gt;&lt;?php
}

if($this-&gt;element-&gt;prices){
echo '&lt;div style="width:185px; position:absolute; top:190px; right: 20px;"&gt;&lt;p&gt;Upon payment you will receive a download link to your still walk file.&lt;/p&gt;&lt;/div&gt;';}

?&gt;

&lt;!-- CODE FOR LOCATION --&gt;
&lt;a style="width:185px; position:absolute; top:260px; right: 20px;" href="&lt;?php echo $this-&gt;row-&gt;location; ?&gt;"&gt;Location&lt;/a&gt;
&lt;!-- END OF LOCATION --&gt;

&lt;?php
if ($this-&gt;row-&gt;video_preview !=''){
echo '{youtube}'.$this-&gt;row-&gt;video_preview.'{/youtube}';
}
?&gt;

&lt;/div&gt;&lt;/div&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMzMTQwLXJlcGxhY2luZy1wcm9kdWN0LWltYWdlcy13aXRoLWEteW91LXR1YmUtdmlkZW8/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14266
-
-

14 years 10 months ago [\#33443](#33443) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Replacing product images with a You Tube Video](/forum/4-how-to/33140-replacing-product-images-with-a-you-tube-video#33443 "Hi,  my client would like to have an embedded YouTube video in place of his product images, so that they appear automatically appear in the category view and product view.  I am using the Allvideos plugin and can get an YouTube video to appear in the product view by using it in the description, but cannot get it to replace the image in the category view, as the images upload is a browse field, and so cannot have the {youtube}???{/youtube} entered there.  Anyone have any ideas how I can achieve this?  Many thanks  Jason")*

That's normal. The code I gave you was for the file "listing_img_title" of the view "product" (a product listing layout).

You're changing the file "show" of the view "product" (a product page layout). As you can see there, it's not the variable $this-&gt;row but the variable $this-&gt;element which is used everywhere.
So you should use $this-&gt;element-&gt;location and $this-&gt;element-&gt;video_preview in that view file.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMzMTQwLXJlcGxhY2luZy1wcm9kdWN0LWltYWdlcy13aXRoLWEteW91LXR1YmUtdmlkZW8/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jazzmeister](/forum/user/4948-jazzmeister "View jazzmeister's Profile")**
- [![jazzmeister's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4948-jazzmeister "View jazzmeister's Profile") Topic Author
- [ Offline](/forum/user/4948-jazzmeister)

Less More

- Posts: 21
- Thank you received: 0
-
-

14 years 10 months ago [\#33462](#33462) by [jazzmeister](/forum/user/4948-jazzmeister "View jazzmeister's Profile")  Replied by *[jazzmeister](/forum/user/4948-jazzmeister "View jazzmeister's Profile")* on topic *[Re: Replacing product images with a You Tube Video](/forum/4-how-to/33140-replacing-product-images-with-a-you-tube-video#33462 "Hi,  my client would like to have an embedded YouTube video in place of his product images, so that they appear automatically appear in the category view and product view.  I am using the Allvideos plugin and can get an YouTube video to appear in the product view by using it in the description, but cannot get it to replace the image in the category view, as the images upload is a browse field, and so cannot have the {youtube}???{/youtube} entered there.  Anyone have any ideas how I can achieve this?  Many thanks  Jason")*

Yeah I tried that already but same result, have just double checked again and still nothing showing???

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMzMTQwLXJlcGxhY2luZy1wcm9kdWN0LWltYWdlcy13aXRoLWEteW91LXR1YmUtdmlkZW8/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14266
-
-

14 years 10 months ago [\#33464](#33464) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Replacing product images with a You Tube Video](/forum/4-how-to/33140-replacing-product-images-with-a-you-tube-video#33464 "Hi,  my client would like to have an embedded YouTube video in place of his product images, so that they appear automatically appear in the category view and product view.  I am using the Allvideos plugin and can get an YouTube video to appear in the product view by using it in the description, but cannot get it to replace the image in the category view, as the images upload is a browse field, and so cannot have the {youtube}???{/youtube} entered there.  Anyone have any ideas how I can achieve this?  Many thanks  Jason")*

What result do you get ? Could you give a link to that page so that we can see the HTML resulting from your code ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMzMTQwLXJlcGxhY2luZy1wcm9kdWN0LWltYWdlcy13aXRoLWEteW91LXR1YmUtdmlkZW8/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jazzmeister](/forum/user/4948-jazzmeister "View jazzmeister's Profile")**
- [![jazzmeister's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4948-jazzmeister "View jazzmeister's Profile") Topic Author
- [ Offline](/forum/user/4948-jazzmeister)

Less More

- Posts: 21
- Thank you received: 0
-
-

14 years 10 months ago [\#33468](#33468) by [jazzmeister](/forum/user/4948-jazzmeister "View jazzmeister's Profile")  Replied by *[jazzmeister](/forum/user/4948-jazzmeister "View jazzmeister's Profile")* on topic *[Re: Replacing product images with a You Tube Video](/forum/4-how-to/33140-replacing-product-images-with-a-you-tube-video#33468 "Hi,  my client would like to have an embedded YouTube video in place of his product images, so that they appear automatically appear in the category view and product view.  I am using the Allvideos plugin and can get an YouTube video to appear in the product view by using it in the description, but cannot get it to replace the image in the category view, as the images upload is a browse field, and so cannot have the {youtube}???{/youtube} entered there.  Anyone have any ideas how I can achieve this?  Many thanks  Jason")*

Here is a [ link](http://www.stillwalks.com/beta/index.php/walks/product/cid-1) to the page

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMzMTQwLXJlcGxhY2luZy1wcm9kdWN0LWltYWdlcy13aXRoLWEteW91LXR1YmUtdmlkZW8/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14266
-
-

14 years 10 months ago [\#33494](#33494) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Replacing product images with a You Tube Video](/forum/4-how-to/33140-replacing-product-images-with-a-you-tube-video#33494 "Hi,  my client would like to have an embedded YouTube video in place of his product images, so that they appear automatically appear in the category view and product view.  I am using the Allvideos plugin and can get an YouTube video to appear in the product view by using it in the description, but cannot get it to replace the image in the category view, as the images upload is a browse field, and so cannot have the {youtube}???{/youtube} entered there.  Anyone have any ideas how I can achieve this?  Many thanks  Jason")*

What did you enter in that product's location custom field ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMzMTQwLXJlcGxhY2luZy1wcm9kdWN0LWltYWdlcy13aXRoLWEteW91LXR1YmUtdmlkZW8/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jazzmeister](/forum/user/4948-jazzmeister "View jazzmeister's Profile")**
- [![jazzmeister's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4948-jazzmeister "View jazzmeister's Profile") Topic Author
- [ Offline](/forum/user/4948-jazzmeister)

Less More

- Posts: 21
- Thank you received: 0
-
-

14 years 10 months ago -  14 years 10 months ago [\#33502](#33502) by [jazzmeister](/forum/user/4948-jazzmeister "View jazzmeister's Profile")  Replied by *[jazzmeister](/forum/user/4948-jazzmeister "View jazzmeister's Profile")* on topic *[Re: Replacing product images with a You Tube Video](/forum/4-how-to/33140-replacing-product-images-with-a-you-tube-video#33502 "Hi,  my client would like to have an embedded YouTube video in place of his product images, so that they appear automatically appear in the category view and product view.  I am using the Allvideos plugin and can get an YouTube video to appear in the product view by using it in the description, but cannot get it to replace the image in the category view, as the images upload is a browse field, and so cannot have the {youtube}???{/youtube} entered there.  Anyone have any ideas how I can achieve this?  Many thanks  Jason")*

As you can see from my screen grab, I entered [ www.maps.google.com](http://www.maps.google.com)

[ ![&#91;img](http://www.hikashop.com/media/kunena/attachments/legacy/images/Screen_Shot_2011_12_22_at_01.png) ](http://www.hikashop.com/media/kunena/attachments/legacy/images/Screen_Shot_2011_12_22_at_01.png "&#91;img")

- [ ![Screen&#95;Shot&#95;2011&#95;12&#95;22&#95;at&#95;01.png](/forum/attachment/2283) ](/forum/attachment/2283 "...2&#95;22&#95;at&#95;01.png") [ ](/forum/attachment/2283?download=1 "...2&#95;22&#95;at&#95;01.png")

Last edit: 14 years 10 months ago by [jazzmeister](/forum/user/4948-jazzmeister "View jazzmeister's Profile"). Reason: mistake

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMzMTQwLXJlcGxhY2luZy1wcm9kdWN0LWltYWdlcy13aXRoLWEteW91LXR1YmUtdmlkZW8/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14266
-
-

14 years 10 months ago [\#33528](#33528) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Replacing product images with a You Tube Video](/forum/4-how-to/33140-replacing-product-images-with-a-you-tube-video#33528 "Hi,  my client would like to have an embedded YouTube video in place of his product images, so that they appear automatically appear in the category view and product view.  I am using the Allvideos plugin and can get an YouTube video to appear in the product view by using it in the description, but cannot get it to replace the image in the category view, as the images upload is a browse field, and so cannot have the {youtube}???{/youtube} entered there.  Anyone have any ideas how I can achieve this?  Many thanks  Jason")*

Are you sure that the column name of your custom field is "location" and not something else ?
Because the code is correct so I don't see why it wouldn't work unless it's not the correct column name.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMzMTQwLXJlcGxhY2luZy1wcm9kdWN0LWltYWdlcy13aXRoLWEteW91LXR1YmUtdmlkZW8/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jazzmeister](/forum/user/4948-jazzmeister "View jazzmeister's Profile")**
- [![jazzmeister's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4948-jazzmeister "View jazzmeister's Profile") Topic Author
- [ Offline](/forum/user/4948-jazzmeister)

Less More

- Posts: 21
- Thank you received: 0
-
-

14 years 10 months ago [\#33540](#33540) by [jazzmeister](/forum/user/4948-jazzmeister "View jazzmeister's Profile")  Replied by *[jazzmeister](/forum/user/4948-jazzmeister "View jazzmeister's Profile")* on topic *[Re: Replacing product images with a You Tube Video](/forum/4-how-to/33140-replacing-product-images-with-a-you-tube-video#33540 "Hi,  my client would like to have an embedded YouTube video in place of his product images, so that they appear automatically appear in the category view and product view.  I am using the Allvideos plugin and can get an YouTube video to appear in the product view by using it in the description, but cannot get it to replace the image in the category view, as the images upload is a browse field, and so cannot have the {youtube}???{/youtube} entered there.  Anyone have any ideas how I can achieve this?  Many thanks  Jason")*

Hi,

yes the column is correct please see image.  [ ![&#91;img](http://www.hikashop.com/media/kunena/attachments/legacy/images/Screen_Shot_2011_12_22_at_13.png) ](http://www.hikashop.com/media/kunena/attachments/legacy/images/Screen_Shot_2011_12_22_at_13.png "&#91;img")

- [ ![Screen&#95;Shot&#95;2011&#95;12&#95;22&#95;at&#95;13.png](/forum/attachment/2289) ](/forum/attachment/2289 "...2&#95;22&#95;at&#95;13.png") [ ](/forum/attachment/2289?download=1 "...2&#95;22&#95;at&#95;13.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMzMTQwLXJlcGxhY2luZy1wcm9kdWN0LWltYWdlcy13aXRoLWEteW91LXR1YmUtdmlkZW8/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14266
-
-

14 years 10 months ago [\#33570](#33570) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Replacing product images with a You Tube Video](/forum/4-how-to/33140-replacing-product-images-with-a-you-tube-video#33570 "Hi,  my client would like to have an embedded YouTube video in place of his product images, so that they appear automatically appear in the category view and product view.  I am using the Allvideos plugin and can get an YouTube video to appear in the product view by using it in the description, but cannot get it to replace the image in the category view, as the images upload is a browse field, and so cannot have the {youtube}???{/youtube} entered there.  Anyone have any ideas how I can achieve this?  Many thanks  Jason")*

Then I don't see how it's possible that it doesn't work.

Please provide a back end access and I'll have a quick look.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMzMTQwLXJlcGxhY2luZy1wcm9kdWN0LWltYWdlcy13aXRoLWEteW91LXR1YmUtdmlkZW8/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jazzmeister](/forum/user/4948-jazzmeister "View jazzmeister's Profile")**
- [![jazzmeister's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4948-jazzmeister "View jazzmeister's Profile") Topic Author
- [ Offline](/forum/user/4948-jazzmeister)

Less More

- Posts: 21
- Thank you received: 0
-
-

14 years 9 months ago [\#34390](#34390) by [jazzmeister](/forum/user/4948-jazzmeister "View jazzmeister's Profile")  Replied by *[jazzmeister](/forum/user/4948-jazzmeister "View jazzmeister's Profile")* on topic *[Re: Replacing product images with a You Tube Video](/forum/4-how-to/33140-replacing-product-images-with-a-you-tube-video#34390 "Hi,  my client would like to have an embedded YouTube video in place of his product images, so that they appear automatically appear in the category view and product view.  I am using the Allvideos plugin and can get an YouTube video to appear in the product view by using it in the description, but cannot get it to replace the image in the category view, as the images upload is a browse field, and so cannot have the {youtube}???{/youtube} entered there.  Anyone have any ideas how I can achieve this?  Many thanks  Jason")*

Hi, can you send me a direct email as I don't want to provide access details on this public forum. Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMzMTQwLXJlcGxhY2luZy1wcm9kdWN0LWltYWdlcy13aXRoLWEteW91LXR1YmUtdmlkZW8/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14266
-
-

14 years 9 months ago [\#34444](#34444) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Replacing product images with a You Tube Video](/forum/4-how-to/33140-replacing-product-images-with-a-you-tube-video#34444 "Hi,  my client would like to have an embedded YouTube video in place of his product images, so that they appear automatically appear in the category view and product view.  I am using the Allvideos plugin and can get an YouTube video to appear in the product view by using it in the description, but cannot get it to replace the image in the category view, as the images upload is a browse field, and so cannot have the {youtube}???{/youtube} entered there.  Anyone have any ideas how I can achieve this?  Many thanks  Jason")*

You can use our contact form for that:
[ www.hikashop.com/en/support/contact-us.html](http://www.hikashop.com/en/support/contact-us.html)
Make sure that you give also a link to this thread.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMzMTQwLXJlcGxhY2luZy1wcm9kdWN0LWltYWdlcy13aXRoLWEteW91LXR1YmUtdmlkZW8/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14266
-
-

14 years 9 months ago [\#34585](#34585) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Replacing product images with a You Tube Video](/forum/4-how-to/33140-replacing-product-images-with-a-you-tube-video#34585 "Hi,  my client would like to have an embedded YouTube video in place of his product images, so that they appear automatically appear in the category view and product view.  I am using the Allvideos plugin and can get an YouTube video to appear in the product view by using it in the description, but cannot get it to replace the image in the category view, as the images upload is a browse field, and so cannot have the {youtube}???{/youtube} entered there.  Anyone have any ideas how I can achieve this?  Many thanks  Jason")*

The problem is that you're using characteristics in your products.
Because of that the code should be a bit different:
&lt;a style="width:185px; position:absolute; top:260px; right: 20px;" href="&lt;?php echo $this-&gt;row-&gt;main-&gt;location; ?&gt;"&gt;Location&lt;/a&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMzMTQwLXJlcGxhY2luZy1wcm9kdWN0LWltYWdlcy13aXRoLWEteW91LXR1YmUtdmlkZW8/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.449 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
