News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Video embed in custom fields

Started by sfinx, October 04, 2013, 15:37:28 PM

Previous topic - Next topic

sfinx

I have a problem embeding youtube video in custom filed in vm product. It works in  product description however. My custom filed type is editor, so I dont get it...
I ve been searching in form for solution, but I only found solutions for older version. I found some other solution for vm2:
I removed $tagBlacklist iframe, object etc... from libraries/joomla/filter and it still doesnt work.

I know there are plugins on market for this, but it seems they are all Commercial and I am way over budget with this page, so help would be really appreciated.

thanx.

p.s. Joomla  2.5.14, VM 2.0.22c

Maxim Pishnyak

Put Video URL in custom field and use this custom field in your template override then. Field could has separate layout position.
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

sfinx

I am not shore I completely understand you. Let me try to explain... I do have custom field assigned as one of tabs in my template, so thats ok. I also have video url in it, but it only shows url. I tryed with 2 different video embeding plugins, but like I said - product description tab shows video, however custom field tab shows only url.

Can you be please more specific as to what would I have to do in my template?

Thanx for your help.

[attachment cleanup by admin]

Maxim Pishnyak

Quote from: sfinx on October 06, 2013, 16:35:27 PM
I am not shore I completely understand you. Let me try to explain... I do have custom field assigned as one of tabs in my template, so thats ok. I also have video url in it, but it only shows url.
No, you don't need any video embeding plugins to work with available video url.

Do you have example web page with embed video in it? Take HTML code for embed video from mentioned page. Put this code in your template override for product details page. Use your custom video field in code part where video url is necessary.
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

sfinx

#4
I have webpage live at the moment if you are willing to look here: link deleted  (I will delete this link later, since I dont want it to be found in google).
I looked at my template files and i think I probibaly should change something within this part of default.php:
<div class="row-fuid">
<div class="span12 tabular-content-area">
<ul class="nav nav-tabs" id="MegamartTab">
<?php if (!empty($this->product->product_desc)) { ?>
  <li class="active"><a href="#p_description" data-toggle="tab"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_DESC_TITLE'?></a></li>
<?php 
if (!empty($this->product->customfieldsSorted['normal'])) { 
$this->position 'normal';
echo $this->loadTemplate('customfieldstitle');

$product_packaging '';
if ($this->product->packaging || $this->product->box) {?>

<li><a href="#packaging"  data-toggle="tab"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_PACKAGING'?></a></li>
<?php }
if ($this->showReview) {?>

<li><a href="#cust-reviews"  data-toggle="tab" id="reviews-tab"><?php echo JText::('COM_VIRTUEMART_REVIEWS'?></a></li>
<?php }?>
</ul>
<div class="tab-content">
<?php if (!empty($this->product->product_desc)) { ?>
  <div class="tab-pane fade in active" id="p_description"><?php echo $this->product->product_desc;?></div>
<?php 
if (!empty($this->product->customfieldsSorted['normal'])) { 
$this->position 'normal';
echo $this->loadTemplate('customfieldscontent');

$product_packaging '';
if ($this->product->packaging || $this->product->box) {?>

<div class="tab-pane fade in" id="packaging">
  <?php 
if ($this->product->packaging) {
$product_packaging .= JText::_('COM_VIRTUEMART_PRODUCT_PACKAGING1') . $this->product->packaging;
if ($this->product->box)
     $product_packaging .= '<br />';
    
}
    
if ($this->product->box)
$product_packaging .= JText::_('COM_VIRTUEMART_PRODUCT_PACKAGING2') . $this->product->box;
    
echo str_replace("{unit}"$this->product->product_unit $this->product->product_unit JText::_('COM_VIRTUEMART_PRODUCT_FORM_UNIT_DEFAULT'), $product_packaging); ?>

</div>
<?php }
if ($this->showReview) {?>

<div class="tab-pane fade in" id="cust-reviews">
<?php echo $this->loadTemplate('reviews');
if ($this->allowReview) {?>

<div class="write-edit-review row-fluid">
<div class="span12">
<?php echo $this->loadTemplate('writereviews');?>
</div>
</div>
<?php ?>
</div>
<?php }?>
</div>
</div> <?php //if($templateparams->get('hide_sidebar', 0)!==1) {?>
<?php if($templateparams->get('hide_sidebar'0)==1) {;} else {?>
<div class="podobni">
<div class="clear"></div>
<?php if (!empty($this->product->customfieldsRelatedProducts)) {
echo $this->loadTemplate('relatedproducts');
    
?>

</div>
<?php ?>
</div>


Or in custofileds_title
if ($this->position == "normal") {
$i=1;
    foreach ($this->product->customfieldsSorted[$this->position] as $field) {
    if ( $field->is_hidden ) //OSP http://forum.virtuemart.net/index.php?topic=99320.0
    continue;
if ($field->display) { ?>
<li><a href="#custom-field-<?php echo $i ?>" data-toggle="tab"><?php echo JText::_($field->custom_title);  ?></a></li>
    <?php 
$i++;     
}
    }

?>


Thing is that I cant just say that video is called into tabs, sice I have all main - text custom fileds in tabs. Sory, but this solution is a bit over my knowledge

ShowLiFE

Hello,
is that your tab "Video" write HTML code?
Video can also embed the WYSIWYG editor (here is an example of an embedded video with TinyMCE).
http://www.termaltrade.si/trgovina/osvetlitev/disco-efekti/eurolite-pst-9w-tcl-dmx-led-pinspot.html#video
If you need help please contact me via PM or via
http://www.slojoomla.si/index.php?option=com_wrapper&view=wrapper&Itemid=116

Best regards Chico

sfinx

thanx (hvala  ;)) showlife, but it didnt work. Before I already tryed with no editor, sice I thougt editor is stripping code... JCE didnt do much better.

Havent check your page code yet, but I suspect you are using plugin for tabs view. So you basicaly put all your content into description part?
In my case it is different. i have template that sets my custom fields into tabs along with description , Reviews etc...

sfinx

#7
Thanx to ShowLiFE I managed to solved problem. Obviously problem was that I was using just url (plugin that I am using is supposed to do that) With different editors and also without editor it didnt work.
Solution was - no editor selected and complete embed code form Youtube video. It works now.

thanx again.