My Magento catalog product page is pretty standard, uses the regular Magento gallery setup which is controllable through my themes view.xml. The thumbnails are displayed in a vertical list with the main image on the right.

However, I use a quick view module (the one by Amasty - it creates a popup window on the listings) which is a little smaller. The problem with this is it doesn't lend itself to a vertical layout so it looks squashed.

I know in view.xml this is controlled with <var name="navdir">horizontal</var>, but I only wish to change it for the popup window.

Am I able to override view.xml in this manner? I thought maybe

<vars module="Amasty_Quickview">
   <var name="gallery">
      <var name="navdir">horizontal</var> <!-- Sliding direction of thumbnails (horizontal/vertical) -->

Would be the way to do this but that doesn't change anything. (Maybe I'm being a bit too naive that it would).

I was also advised that modifying it in the modules js file would be the way to go, so I tried adding this to the bottom:

], function($){

  $.widget('mage.gallery', {
    _create: function() { // special method of jQuery UI Widgets
      this._setOption('navdir', {'horizontal': {}});
  return $.mage.gallery;

But it doesn't look like it's firing that function at all.

Your help would be most appreciated.

Thanks :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.