Author Topic: Help with matchHeight.js and multi-variant Dynamic update  (Read 129 times)

DanBH

  • Beginner
  • *
  • Posts: 38
Help with matchHeight.js and multi-variant Dynamic update
« on: October 09, 2017, 15:58:34 pm »
Joomla 3.8.0
VirtueMart 3.0.12
PHP 5.6.30

I have used MatchHeight.js to make the containers in my product pages the same height, it works fine on page load and sometimes when the page is dynamically updated.
The problem I am having is that when a child product has a different sized image the matchheight seems to mess up. How the dynamic update and everything works isn't something I'm all that knowledgeable on.

Link to an example problem page: http://www.flooringsales.co.uk/clone/component/virtuemart/wood-flooring/parent-01-detail?Itemid=519

Currently I fire the code at the bottom of the productdetails deafult.php
Code: [Select]
$j = "jQuery(document).ready(function($) {
$('.p-col').matchHeight();
});";
vmJsApi::addJScript('matchHeightUpdate',$j);
echo vmJsApi::writeJS();

It seems to run the script on the dynamic update before adding the new image, so if the image is bigger than the other elements it overflows. (see attached image)

I think I am using a template overrides.
If you need anymore information please let me know.

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26314
  • Always on vacation
    • Jenkin Hill Internet
Re: Help with matchHeight.js and multi-variant Dynamic update
« Reply #1 on: October 09, 2017, 16:21:14 pm »
Yes you are using overrides and of course, matchheight is not part of VM, it is not necessary with VM default templates. See http://forum.virtuemart.net/index.php?topic=108212.0

Quote
Joomla 3.8.0
VirtueMart 3.0.12

You should use at least VM3.2.2 with Joomla 3.7+   - http://virtuemart.net/news/latest-news/480-security-release-of-joomla-3-7-be-prepared
Kelvyn

Jenkin Hill Internet,
Keswick, Lake District

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM3.2.4 on Joomla 3.8 PHP 7.0.23

Testing VM3.2.5.9653 on J!3.8

K&K media production

  • VirtueMart Developer Team
  • Global Moderator
  • Full Member
  • *
  • Posts: 830
  • VirtueMart Version: VM3 on J3
Re: Help with matchHeight.js and multi-variant Dynamic update
« Reply #2 on: October 09, 2017, 22:55:01 pm »
you need something like a JS on change function to update your matchHeight items

DanBH

  • Beginner
  • *
  • Posts: 38
Re: Help with matchHeight.js and multi-variant Dynamic update
« Reply #3 on: October 10, 2017, 09:03:03 am »
Thank you K&K media production, I'll give that a go.