Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Virtuemart Template - PureMart (SKU# FLEX-00010)

TOPIC: youtube plugin not working in PM template only

youtube plugin not working in PM template only 10 years 3 months ago #7867

Hi.
i have a youtube VM plugin from add-youtube-virtuemart.cmsmart.net/virtuemart-extensions/youtube-for-virtuemart-plugin which works fine on the Beez5 default fruit shop template but as you can see on this product it doesnt display - it is set to show as the bottom of the description

www.climax-sportcam.co.uk/all-categories/cameras/proaction-camera-detail

many thanks !
The topic has been locked.

youtube plugin not working in PM template only 10 years 3 months ago #7881

Hi,

you should better define a new "custom field" layout position for that Youtube plugin, then you can show the plugin in anywhere you would like within the product details page.

Here is a tutorial to define a new custom field layout position (in my example i will use "youtube" but you can use anything you want or create as many as you want)

1- Open this PHP file:
/templates/YOUR_TEMPLATE/html/com_virtuemat/productdetails/default.php

2- The PHP lines you need to include (to load the "youtube" position) are these:
  <div class="clear"></div>
    <?php if (!empty($this->product->customfieldsSorted['youtube'])) { ?>
    	<?php $this->position='youtube';
		echo $this->loadTemplate('customfields'); ?>
   <?php } ?>    
   <div class="clear"></div>	 

Where ever you put those lines, the custom field with the "youtube" layout position will be shown in there.

If you want to show it inside the "Product Description" TAB after the "product description" text, then the location is here:

Attachment Pasted_Image_12_23_13__6_17_AM-6.gif not found



If you want to show the plugin above the "Add to Cart" button, then the location is here:

Attachment Pasted_Image_12_23_13__6_18_AM-5.gif not found



You are going to pick a location and include the lines within the "default.php" depends on wherever you want to show the plugin.

THEN!!.
Open the "youtube" custom field and type "youtube" to it's position. (so this plugin will be loaded only within the "youtube" layout positions that you just defined on the default.php file)

Attachment Pasted_Image_12_23_13__6_23_AM-3.gif not found



(or alternatively you can use the pre-defined layout positions, they are ontop and onbot. But creating a new layout position will make much more sense, so it won't conflict with other things)

Regards,
Support
Last Edit: 10 years 3 months ago by Support.
The topic has been locked.

youtube plugin not working in PM template only 10 years 3 months ago #7895

works perfectly thanks !
The topic has been locked.

youtube plugin not working in PM template only 10 years 3 months ago #7911

I hope this topic will help for those who are looking for the same thing (not particularly for the youtube plugin. I provided a tutorial for a general case)

Case solved. Topic is closed.

Regards,
Support
The topic has been locked.
Time to create page: 0.185 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo