VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: eriksimonx on March 01, 2013, 12:19:32 PM

Title: Display the number and the prices of products with jquery from Cart
Post by: eriksimonx on March 01, 2013, 12:19:32 PM
joomla 2.5.9
vm 2.0.18a

Hi,

I want to fade in the number of the products in the cart, then fade it out, then fade in the price then so on...

example: http://jsfiddle.net/eriksimon/UX4Ce/ (http://jsfiddle.net/eriksimon/UX4Ce/)

I tried to modify the      modules\mod_virtuemart_cart\tmpl\default.php

Quote

<script type="text/javascript">
window.onload = function() {
function fadeContent() {
  $(".contentPanel .content:hidden:first").fadeIn(500).delay(2000).fadeOut(500, function() {
    $(this).appendTo($(this).parent());
    fadeContent();
  });
}
fadeContent();
};
</script>

<div class="vmCartModule <?php echo $params->get('moduleclass_sfx'); ?>" id="vmCartModule">   

<div class="contentPanel">
      <div class="xcontent">
         <div>
<?php echo  $data->totalProductTxt ?>         </div>
      </div>
      <div class="xcontent">
         <div>
<?php if ($data->totalProduct and $show_price) echo  $data->billTotal; ?>         </div>
      </div>
   </div>


But its not reacting.
Title: Re: Display the number and the prices of products with jquery from Cart
Post by: dazmilliom on April 26, 2016, 16:42:46 PM
Hi eriksimonx,

Did you finally get the code to work? I too need to add jquery to the cart but all my efforts are not working