The Gallery How To's

Miva Merchant Modules and Development
Want to start an online store? We work with you from start to finish, from commerce platform to design to SEO.
Experience counts, and we have a lot.

The Gallery How To's

by Scot Ranney • September 05, 2018

The Gallery


How to override a gallery style in order to change the gallery without redoing things.

This is how we have links to show different styles on The Gallery product page. The easiest way is to set a global style variable like this:

<mvt:assign name="g.thegallery_style_override" value="'another_style_code'">

This needs to be placed above the module's page item at the bottom of the head, like this:

<mvt:assign name="g.thegallery_style_override" value="'another_style_code'">
<mvt:item name="thegallery"sparam="unite_gallery unite_default products" />

After you do this the module will load a different gallery style. Granted, it's not that useful without a conditional. Let's say you have a product with the code product_123 and you want to load a new style just for that product. You could do it like this:

<mvt:if expr="l.settings:product:code EQ 'product_123'">
    <mvt:assign name="g.thegallery_style_override" value="'another_style_code'">
</mvt:if>
<mvt:item name="thegallery"sparam="unite_gallery unite_default products" />


overall rating:
my rating: log in to rate

gallery miva merchant module

The blog posts on Scot's Scripts are made using by Scot's Blogger, a full featured Wordpress replacement Miva Merchant blogging module.