News:

Support the VirtueMart project and become a member

Main Menu

Adding a symbol after a custom field

Started by Malex, September 08, 2016, 11:28:56 AM

Previous topic - Next topic

Malex

Quote from: GJC Web Design on September 12, 2016, 12:42:16 PM
http://docs.virtuemart.net/tutorials/development/196-the-vm-javascript-handler.html

e.g.

from std details

$j = "jQuery(document).ready(function($) {
   Virtuemart.stopVmLoading();
   var msg = '';
   jQuery('a[data-dynamic-update=\"1\"]').off('click', Virtuemart.startVmLoading).on('click', {msg:msg}, Virtuemart.startVmLoading);
   jQuery('[data-dynamic-update=\"1\"]').off('change', Virtuemart.startVmLoading).on('change', {msg:msg}, Virtuemart.startVmLoading);
});";

   vmJsApi::addJScript('vmPreloader',$j);
Sorry, i did'nt saw you reply ..but..hum...i don't understand what does it mean for me ..
What about my last post, should'nt this work anyway ?

Malex

Quote from: GJC Web Design on September 12, 2016, 12:42:16 PM
http://docs.virtuemart.net/tutorials/development/196-the-vm-javascript-handler.html

e.g.

from std details

$j = "jQuery(document).ready(function($) {
   Virtuemart.stopVmLoading();
   var msg = '';
   jQuery('a[data-dynamic-update=\"1\"]').off('click', Virtuemart.startVmLoading).on('click', {msg:msg}, Virtuemart.startVmLoading);
   jQuery('[data-dynamic-update=\"1\"]').off('change', Virtuemart.startVmLoading).on('change', {msg:msg}, Virtuemart.startVmLoading);
});";

   vmJsApi::addJScript('vmPreloader',$j);

Sorry, i did'nt saw your response ..
So for testing, i've putted in my template index file this script with id : euro :
<script id="euro" type="text/javascript">$(window).load(function(){
(function($) {
  $.fn.setCursorPosition = function(pos) {
    if ($(this).get(0).setSelectionRange) {
      $(this).get(0).setSelectionRange(pos, pos);
    } else if ($(this).get(0).createTextRange) {
      var range = $(this).get(0).createTextRange();
      range.collapse(true);
      range.moveEnd('character', pos);
      range.moveStart('character', pos);
      range.select();
    }
  }
}(jQuery));

    $("#mycustomid_31 input").keyup(function(){
        if ($(this).val().split('').pop() !== '€') {
            $(this).val($(this).val() + " €");
            $(this).setCursorPosition( $(this).val().length - 2)
        }
    });
});//]]>
</script>

I'm calling my script in product detail page like this :
...
    <?php
vmJsApi
::addJScript('euro');
?>

<div class="productdetails-view productdetails" >
...


Is this the right way ? doesn't work ..

Malex

Anyway, whithout putting the script in index header, just usin vmJsApi::addJScript('euro'); working, it call my euro.js script :
   <script src="/demo/templates/rt_acacia/js/euro.js?vmver=9267" type="text/javascript" defer="defer"></script>
but still not working..

GJC Web Design

you write the script as rendered php in product detail page

then incl. it


$euro = '>$(window).load(function(){
(function($) {
  $.fn.setCursorPosition = function(pos) {
    if ($(this).get(0).setSelectionRange) {
      $(this).get(0).setSelectionRange(pos, pos);
    } else if ($(this).get(0).createTextRange) {
      var range = $(this).get(0).createTextRange();
      range.collapse(true);
      range.moveEnd('character', pos);
      range.moveStart('character', pos);
      range.select();
    }
  }
}(jQuery));

    $("#mycustomid_31 input").keyup(function(){
        if ($(this).val().split('').pop() !== '€') {
            $(this).val($(this).val() + " €");
            $(this).setCursorPosition( $(this).val().length - 2)
        }
    });
});';

vmJsApi::addJScript('euro',$euro);



check all your  "  &  ' -- your mixing them
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Malex

#19
Many thank's for your precious help !

I've tried but asume that i'm a rookyie, here is my page code, whith blank result, you will find     
// EURO function
and
// EURO calling script


<?php
/**
 *
 * Show the product details page
 *
 * @package VirtueMart
 * @subpackage
 * @author Max Milbers, Eugen Stranz, Max Galt
 * @link http://www.virtuemart.net
 * @copyright Copyright (c) 2004 - 2014 VirtueMart Team. All rights reserved.
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
 * VirtueMart is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * @version $Id: default.php 9185 2016-02-25 13:51:01Z Milbo $
 */
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');

/* Let's see if we found the product */
if (empty($this->product)) {
echo vmText::_('COM_VIRTUEMART_PRODUCT_NOT_FOUND');
echo '' $this->continue_link_html;
return;
}
echo 
shopFunctionsF::renderVmSubLayout('askrecomjs',array('product'=>$this->product));
if(
vRequest::getInt('print',false)){ ?>



<body onload="javascript:print();">
<?php ?>
<div class="productdetails-view productdetails" >
<?php
    
// EURO function
$euro '>$(window).load(function(){
(function($) {
  $.fn.setCursorPosition = function(pos) {
    if ($(this).get(0).setSelectionRange) {
      $(this).get(0).setSelectionRange(pos, pos);
    } else if ($(this).get(0).createTextRange) {
      var range = $(this).get(0).createTextRange();
      range.collapse(true);
      range.moveEnd('
character', pos);
      range.moveStart('
character', pos);
      range.select();
    }
  }
}(jQuery));

    $("#mycustomid_31 input").keyup(function(){
        if ($(this).val().split('').pop() !== '
') {
            $(this).val($(this).val() + " €");
            $(this).setCursorPosition( $(this).val().length - 2)
        }
    });
});'
;
// EURO END
?>

    <?php
    
// Product Navigation
    
if (VmConfig::get('product_navigation'1)) {
?>

        <div class="product-neighbours">
    <?php
    if (!empty(
$this->product->neighbours ['previous'][0])) {
$prev_link JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' $this->product->neighbours ['previous'][0] ['virtuemart_product_id'] . '&virtuemart_category_id=' $this->product->virtuemart_category_idFALSE);
echo JHtml::_('link'$prev_link$this->product->neighbours ['previous'][0]
['product_name'], array('rel'=>'prev''class' => 'previous-page','data-dynamic-update' => '1'));
    }
    if (!empty($this->product->neighbours ['next'][0])) {
$next_link JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' $this->product->neighbours ['next'][0] ['virtuemart_product_id'] . '&virtuemart_category_id=' $this->product->virtuemart_category_idFALSE);
echo JHtml::_('link'$next_link$this->product->neighbours ['next'][0] ['product_name'], array('rel'=>'next','class' => 'next-page','data-dynamic-update' => '1'));
    }
    ?>

    <div class="clear"></div>
        </div>
    <?php // Product Navigation END
    
?>




    <?php // Product Title   ?>
<div class="cat-<?php echo $this->category->virtuemart_category_id?> fond-image-produit">
<h2 class="produit-categorie"><?php echo $this->category->category_name?></h2>
    <h1 itemprop="name" class="titre-produit"><?php echo $this->product->product_name ?></h1>
<div class="image-produit-detail"><?php
echo $this->loadTemplate('images');
?>
</div>
<div class="prix-produit"><div class="fleche-produit">&nbsp;</div>
<?php
echo 
shopFunctionsF::renderVmSubLayout('prices',array('product'=>$this->product,'currency'=>$this->currency));
?>
&nbsp;<div style="float: left;margin-left: 9px;" class="par-an">/an</div>
</div>
<div><img src="images/personnages/perso-30.png" alt="perso 30" style="margin-right: -5px; float: right;margin-top:-137px" /></div>
    <?php // Product Title END   ?>
</div>
    <?php // afterDisplayTitle Event
    
echo $this->product->event->afterDisplayTitle ?>


    <?php
    
// Product Edit Link
    
echo $this->edit_link;
    
// Product Edit Link END
    
?>


    <?php
    
// PDF - Print - Email Icon
    
if (VmConfig::get('show_emailfriend') || VmConfig::get('show_printicon') || VmConfig::get('pdf_icon')) {
?>

        <div class="icons">
    <?php

    
$link 'index.php?tmpl=component&option=com_virtuemart&view=productdetails&virtuemart_product_id=' $this->product->virtuemart_product_id;

echo $this->linkIcon($link '&format=pdf''COM_VIRTUEMART_PDF''pdf_button''pdf_icon'false);
    //echo $this->linkIcon($link . '&print=1', 'COM_VIRTUEMART_PRINT', 'printButton', 'show_printicon');
echo $this->linkIcon($link '&print=1''COM_VIRTUEMART_PRINT''printButton''show_printicon',false,true,false,'class="printModal"');
$MailLink 'index.php?option=com_virtuemart&view=productdetails&task=recommend&virtuemart_product_id=' $this->product->virtuemart_product_id '&virtuemart_category_id=' $this->product->virtuemart_category_id '&tmpl=component';
    echo $this->linkIcon($MailLink'COM_VIRTUEMART_EMAIL''emailButton''show_emailfriend'false,true,false,'class="recommened-to-friend"');
    ?>

    <div class="clear"></div>
        </div>
    <?php // PDF - Print - Email Icon END
    
?>


    <?php
    
// Product Short Description
    
if (!empty($this->product->product_s_desc)) {
?>

        <div class="product-short-description">
    <?php
    
/** @todo Test if content plugins modify the product description */
    echo nl2br($this->product->product_s_desc);
    ?>

        </div>
<?php
    
// Product Short Description END

echo shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'ontop'));
    
?>


    <div class="vm-product-container">
<div class="vm-product-media-container">

</div>

<div class="vm-product-details-container">

</div>
<div class="clear"></div>


    </div>
<?php
$count_images count ($this->product->images);
if ($count_images 1) {
echo $this->loadTemplate('images_additional');
}

// event onContentBeforeDisplay
echo $this->product->event->beforeDisplayContent?>


<?php
//echo ($this->product->product_in_stock - $this->product->product_ordered);
// Product Description
if (!empty($this->product->product_desc)) {
    ?>

        <div class="product-description" >
   <div class="spacer-buy-area">

<?php
// TODO in Multi-Vendor not needed at the moment and just would lead to confusion
/* $link = JRoute::_('index2.php?option=com_virtuemart&view=virtuemart&task=vendorinfo&virtuemart_vendor_id='.$this->product->virtuemart_vendor_id);
  $text = vmText::_('COM_VIRTUEMART_VENDOR_FORM_INFO_LBL');
  echo '<span class="bold">'. vmText::_('COM_VIRTUEMART_PRODUCT_DETAILS_VENDOR_LBL'). '</span>'; ?>
<a class="modal" href="<?php echo $link ?>"><?php echo $text ?></a><br />
*/
?>

<?php
echo shopFunctionsF::renderVmSubLayout('rating',array('showRating'=>$this->showRating,'product'=>$this->product));

if (is_array($this->productDisplayShipments)) {
    foreach ($this->productDisplayShipments as $productDisplayShipment) {
echo $productDisplayShipment '<br />';
    }
}
if (is_array($this->productDisplayPayments)) {
    foreach ($this->productDisplayPayments as $productDisplayPayment) {
echo $productDisplayPayment '<br />';
    }
}

//In case you are not happy using everywhere the same price display fromat, just create your own layout
//in override /html/fields and use as first parameter the name of your file

?>
<div class="clear"></div><?php
echo shopFunctionsF::renderVmSubLayout('addtocart',array('product'=>$this->product));

echo shopFunctionsF::renderVmSubLayout('stockhandle',array('product'=>$this->product));

// Ask a question about this product
if (VmConfig::get('ask_question'0) == 1) {
$askquestion_url JRoute::_('index.php?option=com_virtuemart&view=productdetails&task=askquestion&virtuemart_product_id=' $this->product->virtuemart_product_id '&virtuemart_category_id=' $this->product->virtuemart_category_id '&tmpl=component'FALSE);
?>


<?php
}
?>


<?php
// Manufacturer of the Product
if (VmConfig::get('show_manufacturers'1) && !empty($this->product->virtuemart_manufacturer_id)) {
    echo $this->loadTemplate('manufacturer');
}
?>


    </div>



<?php /** @todo Test if content plugins modify the product description */ ?>

    <div class="description-categorie"><?php echo $this->category->category_description?></div>
<?php echo $this->product->product_desc?>
        </div>
<div style="font-size: 13px;">
<strong>Un doute sur la possibilité de garantir votre appareil ?</strong>
</div>
<?php 
// Ask a question about this product
if (VmConfig::get('ask_question'0) == 1) {
$askquestion_url JRoute::_('index.php?option=com_virtuemart&view=productdetails&task=askquestion&virtuemart_product_id=' $this->product->virtuemart_product_id '&virtuemart_category_id=' $this->product->virtuemart_category_id '&tmpl=component'FALSE);
}
?>

<div class="ask-a-question">
<a class="ask-a-question" href="<?php echo $askquestion_url ?>" rel="nofollow" ><?php echo vmText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL'?></a>
</div>

<?php if  ($this->category->virtuemart_category_id == 2) { ?>


<div class="idee-solo">
<p class="success" style="text-align: justify;"><img src="images/bulb_PNG1250.png" alt="bulb PNG1250" width="39" height="39" style="vertical-align: middle; float: left;" />Pour un choix Malin, <strong>Magarantie.com</strong> vous propose pour quelques euros de plus seulement de garantir l'ensemble des appareils de la même catégorie en optant pour la <a class="idee" href="index.php?option=com_virtuemart&amp;view=productdetails&amp;virtuemart_product_id=6&amp;Itemid=380">formule Pack Ménager</a> !</p>
</div>
<div class="lien-pdf">
<p style="margin-left: 14px;"><a class="pdf" href="notice-information-solo.pdf" target="_blank">Consultez la notice d'information</a></p>
</div>
<?php }?>

<?php if  ($this->category->virtuemart_category_id == 3) { ?>

<div class="lien-pdf">
<p style="margin-left: 14px;"><a class="pdf" href="notice-information-pack.pdf" target="_blank">Consultez la notice d'information</a></p>
</div>
<?php }?>

<?php if  ($this->category->virtuemart_category_id == 4) { ?>
<div class="lien-pdf">
<p style="margin-left: 14px;"><a class="pdf" href="notice-information-pack.pdf" target="_blank">Consultez la notice d'information</a></p>
</div>
<?php }?>

<?php if  ($this->category->virtuemart_category_id == 5) { ?>
<div class="lien-pdf">
<p style="margin-left: 14px;"><a class="pdf" href="notice-information-axa.pdf" target="_blank">Consultez la notice d'information</a></p>
</div>
<?php }?>



<?php
    
// Product Description END

echo shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'normal'));

    
// Product Packaging
    
$product_packaging '';
    if (
$this->product->product_box) {
?>

        <div class="product-box">
    <?php
        echo 
vmText::_('COM_VIRTUEMART_PRODUCT_UNITS_IN_BOX') .$this->product->product_box;
    ?>

        </div>
    <?php // Product Packaging END ?>

    <?php 
echo 
shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'onbot'));

  echo 
shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'related_products','class'=> 'product-related-products','customTitle' => true ));

echo shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'related_categories','class'=> 'product-related-categories'));

?>


<?php // onContentAfterDisplay event
echo $this->product->event->afterDisplayContent;

echo 
$this->loadTemplate('reviews');

// Show child categories
if (VmConfig::get('showCategory'1)) {
echo $this->loadTemplate('showcategory');
}



$j 'jQuery(document).ready(function($) {
Virtuemart.product(jQuery("form.product"));

$("form.js-recalculate").each(function(){
if ($(this).find(".product-fields").length && !$(this).find(".no-vm-bind").length) {
var id= $(this).find(\'input[name="virtuemart_product_id[]"]\').val();
Virtuemart.setproducttype($(this),id);

}
});
});'
;
//vmJsApi::addJScript('recalcReady',$j);

/** GALT
 * Notice for Template Developers!
 * Templates must set a Virtuemart.container variable as it takes part in
 * dynamic content update.
 * This variable points to a topmost element that holds other content.
 */
$j "Virtuemart.container = jQuery('.productdetails-view');
Virtuemart.containerSelector = '.productdetails-view';"
;

vmJsApi::addJScript('ajaxContent',$j);
    
// EURO calling script
vmJsApi::addJScript('euro',$euro);

if(
VmConfig::get ('jdynupdate'TRUE)){
$j "jQuery(document).ready(function($) {
Virtuemart.stopVmLoading();
var msg = '';
jQuery('a[data-dynamic-update=\"1\"]').off('click', Virtuemart.startVmLoading).on('click', {msg:msg}, Virtuemart.startVmLoading);
jQuery('[data-dynamic-update=\"1\"]').off('change', Virtuemart.startVmLoading).on('change', {msg:msg}, Virtuemart.startVmLoading);
});"
;

vmJsApi::addJScript('vmPreloader',$j);
}

echo 
vmJsApi::writeJS();

if (
$this->product->prices['salesPrice'] > 0) {
  echo 
shopFunctionsF::renderVmSubLayout('snippets',array('product'=>$this->product'currency'=>$this->currency'showRating'=>$this->showRating));
}

?>


</div>





Malex

 :-\
I made a huge mistake, sorry, so tirred
That's what i think i have to do, but still not working :
<div class="productdetails-view productdetails" >
<script type="text/javascript">
    // EURO function
$euro = '$(window).load(function(){
(function($) {
  $.fn.setCursorPosition = function(pos) {
    if ($(this).get(0).setSelectionRange) {
      $(this).get(0).setSelectionRange(pos, pos);
    } else if ($(this).get(0).createTextRange) {
      var range = $(this).get(0).createTextRange();
      range.collapse(true);
      range.moveEnd('character', pos);
      range.moveStart('character', pos);
      range.select();
    }
  }
}(jQuery));

    $("#mycustomid_31 input").keyup(function(){
        if ($(this).val().split('').pop() !== '€') {
            $(this).val($(this).val() + " €");
            $(this).setCursorPosition( $(this).val().length - 2)
        }
    });
});';
// EURO END
    </script>
    <?php
vmJsApi
::addJScript('euro',$euro);
?>

    <?php
    
// Product Navigation
    
if (VmConfig::get('product_navigation'1)) {
?>


Malex


GJC Web Design

your writing php .. u don't need stuff like  <script type="text/javascript">
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Malex

Ok, so that what i've done here :
<?php
/**
 *
 * Show the product details page
 *
 * @package VirtueMart
 * @subpackage
 * @author Max Milbers, Eugen Stranz, Max Galt
 * @link http://www.virtuemart.net
 * @copyright Copyright (c) 2004 - 2014 VirtueMart Team. All rights reserved.
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
 * VirtueMart is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * @version $Id: default.php 9185 2016-02-25 13:51:01Z Milbo $
 */
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');

/* Let's see if we found the product */
if (empty($this->product)) {
echo vmText::_('COM_VIRTUEMART_PRODUCT_NOT_FOUND');
echo '' $this->continue_link_html;
return;
}
echo 
shopFunctionsF::renderVmSubLayout('askrecomjs',array('product'=>$this->product));
if(
vRequest::getInt('print',false)){ ?>



<body onload="javascript:print();">
<?php ?>
<div class="productdetails-view productdetails" >
<?php
    
// EURO function
$euro '>$(window).load(function(){
(function($) {
  $.fn.setCursorPosition = function(pos) {
    if ($(this).get(0).setSelectionRange) {
      $(this).get(0).setSelectionRange(pos, pos);
    } else if ($(this).get(0).createTextRange) {
      var range = $(this).get(0).createTextRange();
      range.collapse(true);
      range.moveEnd('
character', pos);
      range.moveStart('
character', pos);
      range.select();
    }
  }
}(jQuery));

    $("#mycustomid_31 input").keyup(function(){
        if ($(this).val().split('').pop() !== '
') {
            $(this).val($(this).val() + " €");
            $(this).setCursorPosition( $(this).val().length - 2)
        }
    });
});'
;
// EURO END
?>

    <?php
    
// Product Navigation
    
if (VmConfig::get('product_navigation'1)) {
?>

        <div class="product-neighbours">
    <?php
    if (!empty(
$this->product->neighbours ['previous'][0])) {
$prev_link JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' $this->product->neighbours ['previous'][0] ['virtuemart_product_id'] . '&virtuemart_category_id=' $this->product->virtuemart_category_idFALSE);
echo JHtml::_('link'$prev_link$this->product->neighbours ['previous'][0]
['product_name'], array('rel'=>'prev''class' => 'previous-page','data-dynamic-update' => '1'));
    }
    if (!empty($this->product->neighbours ['next'][0])) {
$next_link JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' $this->product->neighbours ['next'][0] ['virtuemart_product_id'] . '&virtuemart_category_id=' $this->product->virtuemart_category_idFALSE);
echo JHtml::_('link'$next_link$this->product->neighbours ['next'][0] ['product_name'], array('rel'=>'next','class' => 'next-page','data-dynamic-update' => '1'));
    }
    ?>

    <div class="clear"></div>
        </div>
    <?php // Product Navigation END
    
?>




    <?php // Product Title   ?>
<div class="cat-<?php echo $this->category->virtuemart_category_id?> fond-image-produit">
<h2 class="produit-categorie"><?php echo $this->category->category_name?></h2>
    <h1 itemprop="name" class="titre-produit"><?php echo $this->product->product_name ?></h1>
<div class="image-produit-detail"><?php
echo $this->loadTemplate('images');
?>
</div>
<div class="prix-produit"><div class="fleche-produit">&nbsp;</div>
<?php
echo 
shopFunctionsF::renderVmSubLayout('prices',array('product'=>$this->product,'currency'=>$this->currency));
?>
&nbsp;<div style="float: left;margin-left: 9px;" class="par-an">/an</div>
</div>
<div><img src="images/personnages/perso-30.png" alt="perso 30" style="margin-right: -5px; float: right;margin-top:-137px" /></div>
    <?php // Product Title END   ?>
</div>
    <?php // afterDisplayTitle Event
    
echo $this->product->event->afterDisplayTitle ?>


    <?php
    
// Product Edit Link
    
echo $this->edit_link;
    
// Product Edit Link END
    
?>


    <?php
    
// PDF - Print - Email Icon
    
if (VmConfig::get('show_emailfriend') || VmConfig::get('show_printicon') || VmConfig::get('pdf_icon')) {
?>

        <div class="icons">
    <?php

    
$link 'index.php?tmpl=component&option=com_virtuemart&view=productdetails&virtuemart_product_id=' $this->product->virtuemart_product_id;

echo $this->linkIcon($link '&format=pdf''COM_VIRTUEMART_PDF''pdf_button''pdf_icon'false);
    //echo $this->linkIcon($link . '&print=1', 'COM_VIRTUEMART_PRINT', 'printButton', 'show_printicon');
echo $this->linkIcon($link '&print=1''COM_VIRTUEMART_PRINT''printButton''show_printicon',false,true,false,'class="printModal"');
$MailLink 'index.php?option=com_virtuemart&view=productdetails&task=recommend&virtuemart_product_id=' $this->product->virtuemart_product_id '&virtuemart_category_id=' $this->product->virtuemart_category_id '&tmpl=component';
    echo $this->linkIcon($MailLink'COM_VIRTUEMART_EMAIL''emailButton''show_emailfriend'false,true,false,'class="recommened-to-friend"');
    ?>

    <div class="clear"></div>
        </div>
    <?php // PDF - Print - Email Icon END
    
?>


    <?php
    
// Product Short Description
    
if (!empty($this->product->product_s_desc)) {
?>

        <div class="product-short-description">
    <?php
    
/** @todo Test if content plugins modify the product description */
    echo nl2br($this->product->product_s_desc);
    ?>

        </div>
<?php
    
// Product Short Description END

echo shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'ontop'));
    
?>


    <div class="vm-product-container">
<div class="vm-product-media-container">

</div>

<div class="vm-product-details-container">

</div>
<div class="clear"></div>


    </div>
<?php
$count_images count ($this->product->images);
if ($count_images 1) {
echo $this->loadTemplate('images_additional');
}

// event onContentBeforeDisplay
echo $this->product->event->beforeDisplayContent?>


<?php
//echo ($this->product->product_in_stock - $this->product->product_ordered);
// Product Description
if (!empty($this->product->product_desc)) {
    ?>

        <div class="product-description" >
   <div class="spacer-buy-area">

<?php
// TODO in Multi-Vendor not needed at the moment and just would lead to confusion
/* $link = JRoute::_('index2.php?option=com_virtuemart&view=virtuemart&task=vendorinfo&virtuemart_vendor_id='.$this->product->virtuemart_vendor_id);
  $text = vmText::_('COM_VIRTUEMART_VENDOR_FORM_INFO_LBL');
  echo '<span class="bold">'. vmText::_('COM_VIRTUEMART_PRODUCT_DETAILS_VENDOR_LBL'). '</span>'; ?>
<a class="modal" href="<?php echo $link ?>"><?php echo $text ?></a><br />
*/
?>

<?php
echo shopFunctionsF::renderVmSubLayout('rating',array('showRating'=>$this->showRating,'product'=>$this->product));

if (is_array($this->productDisplayShipments)) {
    foreach ($this->productDisplayShipments as $productDisplayShipment) {
echo $productDisplayShipment '<br />';
    }
}
if (is_array($this->productDisplayPayments)) {
    foreach ($this->productDisplayPayments as $productDisplayPayment) {
echo $productDisplayPayment '<br />';
    }
}

//In case you are not happy using everywhere the same price display fromat, just create your own layout
//in override /html/fields and use as first parameter the name of your file

?>
<div class="clear"></div><?php
echo shopFunctionsF::renderVmSubLayout('addtocart',array('product'=>$this->product));

echo shopFunctionsF::renderVmSubLayout('stockhandle',array('product'=>$this->product));

// Ask a question about this product
if (VmConfig::get('ask_question'0) == 1) {
$askquestion_url JRoute::_('index.php?option=com_virtuemart&view=productdetails&task=askquestion&virtuemart_product_id=' $this->product->virtuemart_product_id '&virtuemart_category_id=' $this->product->virtuemart_category_id '&tmpl=component'FALSE);
?>


<?php
}
?>


<?php
// Manufacturer of the Product
if (VmConfig::get('show_manufacturers'1) && !empty($this->product->virtuemart_manufacturer_id)) {
    echo $this->loadTemplate('manufacturer');
}
?>


    </div>



<?php /** @todo Test if content plugins modify the product description */ ?>

    <div class="description-categorie"><?php echo $this->category->category_description?></div>
<?php echo $this->product->product_desc?>
        </div>
<div style="font-size: 13px;">
<strong>Un doute sur la possibilité de garantir votre appareil ?</strong>
</div>
<?php 
// Ask a question about this product
if (VmConfig::get('ask_question'0) == 1) {
$askquestion_url JRoute::_('index.php?option=com_virtuemart&view=productdetails&task=askquestion&virtuemart_product_id=' $this->product->virtuemart_product_id '&virtuemart_category_id=' $this->product->virtuemart_category_id '&tmpl=component'FALSE);
}
?>

<div class="ask-a-question">
<a class="ask-a-question" href="<?php echo $askquestion_url ?>" rel="nofollow" ><?php echo vmText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL'?></a>
</div>

<?php if  ($this->category->virtuemart_category_id == 2) { ?>


<div class="idee-solo">
<p class="success" style="text-align: justify;"><img src="images/bulb_PNG1250.png" alt="bulb PNG1250" width="39" height="39" style="vertical-align: middle; float: left;" />Pour un choix Malin, <strong>Magarantie.com</strong> vous propose pour quelques euros de plus seulement de garantir l'ensemble des appareils de la même catégorie en optant pour la <a class="idee" href="index.php?option=com_virtuemart&amp;view=productdetails&amp;virtuemart_product_id=6&amp;Itemid=380">formule Pack Ménager</a> !</p>
</div>
<div class="lien-pdf">
<p style="margin-left: 14px;"><a class="pdf" href="notice-information-solo.pdf" target="_blank">Consultez la notice d'information</a></p>
</div>
<?php }?>

<?php if  ($this->category->virtuemart_category_id == 3) { ?>

<div class="lien-pdf">
<p style="margin-left: 14px;"><a class="pdf" href="notice-information-pack.pdf" target="_blank">Consultez la notice d'information</a></p>
</div>
<?php }?>

<?php if  ($this->category->virtuemart_category_id == 4) { ?>
<div class="lien-pdf">
<p style="margin-left: 14px;"><a class="pdf" href="notice-information-pack.pdf" target="_blank">Consultez la notice d'information</a></p>
</div>
<?php }?>

<?php if  ($this->category->virtuemart_category_id == 5) { ?>
<div class="lien-pdf">
<p style="margin-left: 14px;"><a class="pdf" href="notice-information-axa.pdf" target="_blank">Consultez la notice d'information</a></p>
</div>
<?php }?>



<?php
    
// Product Description END

echo shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'normal'));

    
// Product Packaging
    
$product_packaging '';
    if (
$this->product->product_box) {
?>

        <div class="product-box">
    <?php
        echo 
vmText::_('COM_VIRTUEMART_PRODUCT_UNITS_IN_BOX') .$this->product->product_box;
    ?>

        </div>
    <?php // Product Packaging END ?>

    <?php 
echo 
shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'onbot'));

  echo 
shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'related_products','class'=> 'product-related-products','customTitle' => true ));

echo shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'related_categories','class'=> 'product-related-categories'));

?>


<?php // onContentAfterDisplay event
echo $this->product->event->afterDisplayContent;

echo 
$this->loadTemplate('reviews');

// Show child categories
if (VmConfig::get('showCategory'1)) {
echo $this->loadTemplate('showcategory');
}



$j 'jQuery(document).ready(function($) {
Virtuemart.product(jQuery("form.product"));

$("form.js-recalculate").each(function(){
if ($(this).find(".product-fields").length && !$(this).find(".no-vm-bind").length) {
var id= $(this).find(\'input[name="virtuemart_product_id[]"]\').val();
Virtuemart.setproducttype($(this),id);

}
});
});'
;
//vmJsApi::addJScript('recalcReady',$j);

/** GALT
 * Notice for Template Developers!
 * Templates must set a Virtuemart.container variable as it takes part in
 * dynamic content update.
 * This variable points to a topmost element that holds other content.
 */
$j "Virtuemart.container = jQuery('.productdetails-view');
Virtuemart.containerSelector = '.productdetails-view';"
;

vmJsApi::addJScript('ajaxContent',$j);
    
// EURO calling script
vmJsApi::addJScript('euro',$euro);

if(
VmConfig::get ('jdynupdate'TRUE)){
$j "jQuery(document).ready(function($) {
Virtuemart.stopVmLoading();
var msg = '';
jQuery('a[data-dynamic-update=\"1\"]').off('click', Virtuemart.startVmLoading).on('click', {msg:msg}, Virtuemart.startVmLoading);
jQuery('[data-dynamic-update=\"1\"]').off('change', Virtuemart.startVmLoading).on('change', {msg:msg}, Virtuemart.startVmLoading);
});"
;

vmJsApi::addJScript('vmPreloader',$j);
}

echo 
vmJsApi::writeJS();

if (
$this->product->prices['salesPrice'] > 0) {
  echo 
shopFunctionsF::renderVmSubLayout('snippets',array('product'=>$this->product'currency'=>$this->currency'showRating'=>$this->showRating));
}

?>


</div>


But result is a blank page ..

GJC Web Design

the syntax highlighting shows u it couldn't possibly work!

Quotecheck all your  "  &  ' -- your mixing them

be consistent -- turn on error reporting etc etc

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Malex

#25
...I'm little bit lost, now ...what i'm suppose to do ?
replace ' by " ?
I've just copied the code you sent in reply 16:10:06
and pasted it, anyway that is the code working in my test page so, yes, i'm lost ...
:-\
So sorry to waste your time

GJC Web Design

hmmm .. this is basic syntax...

within the opening and closing php '  you obviously can't have any other ' unless you escape them   ->  \'
or better use   "

you need to check your code for consistency..
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Malex

So, spent lot of time trying many things, here is my last attempt, a parse error on last line but really unable to understand..
and the script tested on
http://phptester.net/
reveal FATAL ERROR syntax error, unexpected '').pop() !== '' (T_CONSTANT_ENCAPSED_STRING) on line
        if ($(this).val().split('').pop() !== \'€\') {
Anyway, i really don't understand why it isn't possible to run this script that working outside of VM  :o

<?php
// EURO function
$euro '$(window).load(function()
{
(function($) 
{
  $.fn.setCursorPosition = function(pos) {
    if ($(this).get(0).setSelectionRange) {
      $(this).get(0).setSelectionRange(pos, pos);
    } else if ($(this).get(0).createTextRange) {
      var range = $(this).get(0).createTextRange();
      range.collapse(true);
      range.moveEnd("character", pos);
      range.moveStart("character", pos);
      range.select();
    }
  }
}
(jQuery));

    $("#mycustomid_31 input").keyup(function()
{
        if ($(this).val().split('').pop() !== \'€\') {
            $(this).val($(this).val() + " €");
            $(this).setCursorPosition( $(this).val().length - 2)
        }
    });
});'
;
?>

GJC Web Design

QuoteAnyway, i really don't understand why it isn't possible to run this script that working outside of VM  :o

as explained in the vmjsapi instructions how can u load a js from the head if your refreshing the page content by ajax?

use ""   !!!

the error explains it exactly
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Malex

#29
many thanks again for your patience and kindness, finally no more errors but not working ...
I tried to put it in different places, differents files, customfields.php, custom field.php ...
here is my final defaut.php productdetails page :

<?php
/**
 *
 * Show the product details page
 *
 * @package VirtueMart
 * @subpackage
 * @author Max Milbers, Eugen Stranz, Max Galt
 * @link http://www.virtuemart.net
 * @copyright Copyright (c) 2004 - 2014 VirtueMart Team. All rights reserved.
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
 * VirtueMart is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * @version $Id: default.php 9185 2016-02-25 13:51:01Z Milbo $
 */
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');

/* Let's see if we found the product */
if (empty($this->product)) {
echo vmText::_('COM_VIRTUEMART_PRODUCT_NOT_FOUND');
echo '' $this->continue_link_html;
return;
}
echo 
shopFunctionsF::renderVmSubLayout('askrecomjs',array('product'=>$this->product));
if(
vRequest::getInt('print',false)){ ?>



<body onload="javascript:print();">
<?php ?>
<div class="productdetails-view productdetails" >
<?php
// EURO function
$euro '$(window).load(function(){
{
(function($) 
{
  $.fn.setCursorPosition = function(pos) {
    if ($(this).get(0).setSelectionRange) {
      $(this).get(0).setSelectionRange(pos, pos);
    } else if ($(this).get(0).createTextRange) {
      var range = $(this).get(0).createTextRange();
      range.collapse(true);
      range.moveEnd("character", pos);
      range.moveStart("character", pos);
      range.select();
    }
  }
}
(jQuery));

    $("#mycustomid_31 input").keyup(function()
{
        if ($(this).val().split("").pop() !== \'€\') {
            $(this).val($(this).val() + " €");
            $(this).setCursorPosition( $(this).val().length - 2)
        }
    });
});'
;
?>

<?php
vmJsApi
::addJScript('euro',$euro);
?>

    <?php
    
// Product Navigation
    
if (VmConfig::get('product_navigation'1)) {
?>

        <div class="product-neighbours">
    <?php
    if (!empty(
$this->product->neighbours ['previous'][0])) {
$prev_link JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' $this->product->neighbours ['previous'][0] ['virtuemart_product_id'] . '&virtuemart_category_id=' $this->product->virtuemart_category_idFALSE);
echo JHtml::_('link'$prev_link$this->product->neighbours ['previous'][0]
['product_name'], array('rel'=>'prev''class' => 'previous-page','data-dynamic-update' => '1'));
    }
    if (!empty($this->product->neighbours ['next'][0])) {
$next_link JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' $this->product->neighbours ['next'][0] ['virtuemart_product_id'] . '&virtuemart_category_id=' $this->product->virtuemart_category_idFALSE);
echo JHtml::_('link'$next_link$this->product->neighbours ['next'][0] ['product_name'], array('rel'=>'next','class' => 'next-page','data-dynamic-update' => '1'));
    }
    ?>

    <div class="clear"></div>
        </div>
    <?php // Product Navigation END
    
?>




    <?php // Product Title   ?>
<div class="cat-<?php echo $this->category->virtuemart_category_id?> fond-image-produit">
<h2 class="produit-categorie"><?php echo $this->category->category_name?></h2>
    <h1 itemprop="name" class="titre-produit"><?php echo $this->product->product_name ?></h1>
<div class="image-produit-detail"><?php
echo $this->loadTemplate('images');
?>
</div>
<div class="prix-produit"><div class="fleche-produit">&nbsp;</div>
<?php
echo 
shopFunctionsF::renderVmSubLayout('prices',array('product'=>$this->product,'currency'=>$this->currency));
?>
&nbsp;<div style="float: left;margin-left: 9px;" class="par-an">/an</div>
</div>
<div><img src="images/personnages/perso-30.png" alt="perso 30" style="margin-right: -5px; float: right;margin-top:-137px" /></div>
    <?php // Product Title END   ?>
</div>
    <?php // afterDisplayTitle Event
    
echo $this->product->event->afterDisplayTitle ?>


    <?php
    
// Product Edit Link
    
echo $this->edit_link;
    
// Product Edit Link END
    
?>


    <?php
    
// PDF - Print - Email Icon
    
if (VmConfig::get('show_emailfriend') || VmConfig::get('show_printicon') || VmConfig::get('pdf_icon')) {
?>

        <div class="icons">
    <?php

    
$link 'index.php?tmpl=component&option=com_virtuemart&view=productdetails&virtuemart_product_id=' $this->product->virtuemart_product_id;

echo $this->linkIcon($link '&format=pdf''COM_VIRTUEMART_PDF''pdf_button''pdf_icon'false);
    //echo $this->linkIcon($link . '&print=1', 'COM_VIRTUEMART_PRINT', 'printButton', 'show_printicon');
echo $this->linkIcon($link '&print=1''COM_VIRTUEMART_PRINT''printButton''show_printicon',false,true,false,'class="printModal"');
$MailLink 'index.php?option=com_virtuemart&view=productdetails&task=recommend&virtuemart_product_id=' $this->product->virtuemart_product_id '&virtuemart_category_id=' $this->product->virtuemart_category_id '&tmpl=component';
    echo $this->linkIcon($MailLink'COM_VIRTUEMART_EMAIL''emailButton''show_emailfriend'false,true,false,'class="recommened-to-friend"');
    ?>

    <div class="clear"></div>
        </div>
    <?php // PDF - Print - Email Icon END
    
?>


    <?php
    
// Product Short Description
    
if (!empty($this->product->product_s_desc)) {
?>

        <div class="product-short-description">
    <?php
    
/** @todo Test if content plugins modify the product description */
    echo nl2br($this->product->product_s_desc);
    ?>

        </div>
<?php
    
// Product Short Description END

echo shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'ontop'));
    
?>


    <div class="vm-product-container">
<div class="vm-product-media-container">

</div>

<div class="vm-product-details-container">

</div>
<div class="clear"></div>


    </div>
<?php
$count_images count ($this->product->images);
if ($count_images 1) {
echo $this->loadTemplate('images_additional');
}

// event onContentBeforeDisplay
echo $this->product->event->beforeDisplayContent?>


<?php
//echo ($this->product->product_in_stock - $this->product->product_ordered);
// Product Description
if (!empty($this->product->product_desc)) {
    ?>

        <div class="product-description" >
   <div class="spacer-buy-area">

<?php
// TODO in Multi-Vendor not needed at the moment and just would lead to confusion
/* $link = JRoute::_('index2.php?option=com_virtuemart&view=virtuemart&task=vendorinfo&virtuemart_vendor_id='.$this->product->virtuemart_vendor_id);
  $text = vmText::_('COM_VIRTUEMART_VENDOR_FORM_INFO_LBL');
  echo '<span class="bold">'. vmText::_('COM_VIRTUEMART_PRODUCT_DETAILS_VENDOR_LBL'). '</span>'; ?>
<a class="modal" href="<?php echo $link ?>"><?php echo $text ?></a><br />
*/
?>

<?php
echo shopFunctionsF::renderVmSubLayout('rating',array('showRating'=>$this->showRating,'product'=>$this->product));

if (is_array($this->productDisplayShipments)) {
    foreach ($this->productDisplayShipments as $productDisplayShipment) {
echo $productDisplayShipment '<br />';
    }
}
if (is_array($this->productDisplayPayments)) {
    foreach ($this->productDisplayPayments as $productDisplayPayment) {
echo $productDisplayPayment '<br />';
    }
}

//In case you are not happy using everywhere the same price display fromat, just create your own layout
//in override /html/fields and use as first parameter the name of your file

?>
<div class="clear"></div><?php
echo shopFunctionsF::renderVmSubLayout('addtocart',array('product'=>$this->product));

echo shopFunctionsF::renderVmSubLayout('stockhandle',array('product'=>$this->product));

// Ask a question about this product
if (VmConfig::get('ask_question'0) == 1) {
$askquestion_url JRoute::_('index.php?option=com_virtuemart&view=productdetails&task=askquestion&virtuemart_product_id=' $this->product->virtuemart_product_id '&virtuemart_category_id=' $this->product->virtuemart_category_id '&tmpl=component'FALSE);
?>


<?php
}
?>


<?php
// Manufacturer of the Product
if (VmConfig::get('show_manufacturers'1) && !empty($this->product->virtuemart_manufacturer_id)) {
    echo $this->loadTemplate('manufacturer');
}
?>


    </div>



<?php /** @todo Test if content plugins modify the product description */ ?>

    <div class="description-categorie"><?php echo $this->category->category_description?></div>
<?php echo $this->product->product_desc?>
        </div>
<div style="font-size: 13px;">
<strong>Un doute sur la possibilité de garantir votre appareil ?</strong>
</div>
<?php 
// Ask a question about this product
if (VmConfig::get('ask_question'0) == 1) {
$askquestion_url JRoute::_('index.php?option=com_virtuemart&view=productdetails&task=askquestion&virtuemart_product_id=' $this->product->virtuemart_product_id '&virtuemart_category_id=' $this->product->virtuemart_category_id '&tmpl=component'FALSE);
}
?>

<div class="ask-a-question">
<a class="ask-a-question" href="<?php echo $askquestion_url ?>" rel="nofollow" ><?php echo vmText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL'?></a>
</div>

<?php if  ($this->category->virtuemart_category_id == 2) { ?>


<div class="idee-solo">
<p class="success" style="text-align: justify;"><img src="images/bulb_PNG1250.png" alt="bulb PNG1250" width="39" height="39" style="vertical-align: middle; float: left;" />Pour un choix Malin, <strong>Magarantie.com</strong> vous propose pour quelques euros de plus seulement de garantir l'ensemble des appareils de la même catégorie en optant pour la <a class="idee" href="index.php?option=com_virtuemart&amp;view=productdetails&amp;virtuemart_product_id=6&amp;Itemid=380">formule Pack Ménager</a> !</p>
</div>
<div class="lien-pdf">
<p style="margin-left: 14px;"><a class="pdf" href="notice-information-solo.pdf" target="_blank">Consultez la notice d'information</a></p>
</div>
<?php }?>

<?php if  ($this->category->virtuemart_category_id == 3) { ?>

<div class="lien-pdf">
<p style="margin-left: 14px;"><a class="pdf" href="notice-information-pack.pdf" target="_blank">Consultez la notice d'information</a></p>
</div>
<?php }?>

<?php if  ($this->category->virtuemart_category_id == 4) { ?>
<div class="lien-pdf">
<p style="margin-left: 14px;"><a class="pdf" href="notice-information-pack.pdf" target="_blank">Consultez la notice d'information</a></p>
</div>
<?php }?>

<?php if  ($this->category->virtuemart_category_id == 5) { ?>
<div class="lien-pdf">
<p style="margin-left: 14px;"><a class="pdf" href="notice-information-axa.pdf" target="_blank">Consultez la notice d'information</a></p>
</div>
<?php }?>



<?php
    
// Product Description END

echo shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'normal'));

    
// Product Packaging
    
$product_packaging '';
    if (
$this->product->product_box) {
?>

        <div class="product-box">
    <?php
        echo 
vmText::_('COM_VIRTUEMART_PRODUCT_UNITS_IN_BOX') .$this->product->product_box;
    ?>

        </div>
    <?php // Product Packaging END ?>

    <?php 
echo 
shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'onbot'));

  echo 
shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'related_products','class'=> 'product-related-products','customTitle' => true ));

echo shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'related_categories','class'=> 'product-related-categories'));

?>


<?php // onContentAfterDisplay event
echo $this->product->event->afterDisplayContent;

echo 
$this->loadTemplate('reviews');

// Show child categories
if (VmConfig::get('showCategory'1)) {
echo $this->loadTemplate('showcategory');
}



$j 'jQuery(document).ready(function($) {
Virtuemart.product(jQuery("form.product"));

$("form.js-recalculate").each(function(){
if ($(this).find(".product-fields").length && !$(this).find(".no-vm-bind").length) {
var id= $(this).find(\'input[name="virtuemart_product_id[]"]\').val();
Virtuemart.setproducttype($(this),id);

}
});
});'
;
//vmJsApi::addJScript('recalcReady',$j);

/** GALT
 * Notice for Template Developers!
 * Templates must set a Virtuemart.container variable as it takes part in
 * dynamic content update.
 * This variable points to a topmost element that holds other content.
 */
$j "Virtuemart.container = jQuery('.productdetails-view');
Virtuemart.containerSelector = '.productdetails-view';"
;

vmJsApi::addJScript('ajaxContent',$j);


if(
VmConfig::get ('jdynupdate'TRUE)){
$j "jQuery(document).ready(function($) {
Virtuemart.stopVmLoading();
var msg = '';
jQuery('a[data-dynamic-update=\"1\"]').off('click', Virtuemart.startVmLoading).on('click', {msg:msg}, Virtuemart.startVmLoading);
jQuery('[data-dynamic-update=\"1\"]').off('change', Virtuemart.startVmLoading).on('change', {msg:msg}, Virtuemart.startVmLoading);
});"
;

vmJsApi::addJScript('vmPreloader',$j);
}

echo 
vmJsApi::writeJS();

if (
$this->product->prices['salesPrice'] > 0) {
  echo 
shopFunctionsF::renderVmSubLayout('snippets',array('product'=>$this->product'currency'=>$this->currency'showRating'=>$this->showRating));
}

?>


</div>