Scot's Scripts FAQs and Module Support

If you don't find the answers here contact us.
Documentation and support for our Miva modules is found here. If you can't find the answer you're looking for contact us and we'll add the information.

Clicked: in-store click-to-edit / Module Function Reference

Module Function Reference

Config

If you want to call Clicked functions on a page that has no Clicked page items, you will need to load the configuration first. This only needs to happen once on a page and should happen before any other Clicked functions are used.

<mvt:do file="g.Module_Root $ '/modules/util/clicked.mvc'" name="l.is_editor" value="config()" />

Check If Current Customer is a Clicked Editor

<mvt:do file="g.Module_Root $ '/modules/util/clicked.mvc'" name="l.is_editor" value="is_editor()" />

This returns a boolean letting you know if the currently logged in customer is a Clicked editor.

This could be used to create special areas for editing things like custom fields that are not visible on the page.

For example, if you had a couple custom fields called new_product_color and super_sale used to control whether or not a block of content is displayed on the page, you could set up an editing area for Clicked editors that regular customers would never see.

<mvt:do file="g.Module_Root $ '/modules/util/clicked.mvc'" name="l.is_clicked_editor" value="is_editor()" />
<mvt:if expr="l.is_clicked_editor">
<div>
<mvt:item name="clicked" param="new_product_color cf">
&mvt:product:customfield_values:customfields:new_product_color;
</mvt:item>
</div>
<div>
<mvt:item name="clicked" param="super_sale cf">
&mvt:product:customfield_values:customfields:super_sale
</mvt:item>
</div>
</mvt:if>

Clean Number

This is a utility function to remove all non-numeric characters from a string. It returns the number.

<mvt:do file="g.Module_Root $ '/modules/util/clicked.mvc'" name="l.clean_number" value="clean_number(l.string)" />

If you passed $10,000.00 the function would return 10000.00

Not a lot of interesting stuff here, but config() and is_editor() will give you something to work with.

updated May 16, 2017