The Sebenza ToolsTM module allows you to quickly extend the power of the Store Morph Template language (SMT).
This module is the bridge between Store Morph and the MivaScript language.
Allowing to you virtually run any function or expression within your page templates.
Not only that, but they can be nested so there is less code to run. In addition, the module adds some general store enhancement features such as breadcrumbs, sub-category listings, best seller listings, and more.
See the modules ever growing feature list. Be sure to check this list regularly as we will be adding new features ongoing.
- Execute MivaScript Functions & Variables
- Builtin Features - These include:
- Breadcrumbs
- Sub-Categories
- Category Products
- Category Best Sellers
- Custom Product Field Lookup
- Product Categories
- Page Render
- HTML Stripper
- Basket Item Count, Subtotal, Weight Variables
- Flat File Export
- Include
- Call - Post or Get
- Customer Price Group List
- Customer Availability Group List
- Populate Customer Checkout Fields
- One click basket update
- One click basket empty
- And much more...
- 100% Template Based
- Ongoing Feature Development
- Click here to view the modules PDF listing all features of the module
Example Function & Expression Use
Full function list can be found here. http://www.mivamerchant.com/support/docs/ScriptGuide_html/ScriptGuide.html
Assign to Variable
<mvt:item name="sebenzatools" param="var|widget|l.all_settings:product:code" />
&mvt:global:widget;
substring
<mvt:item name="sebenzatools" param="var|widget|substring(l.all_settings:product:code,'1','3')" />
&mvt:global:widget;
gettoken
<mvt:item name="sebenzatools" param="var|widget|gettoken(l.all_settings:product:code,'-','2')" />
&mvt:global:widget;
len
<mvt:item name="sebenzatools" param="var|widget|len(l.all_settings:product:code)" />
&mvt:global:widget;
glosub
<mvt:item name="sebenzatools" param="var|widget|glosub(l.all_settings:product:code,'-','')" />
&mvt:global:widget;
padl or padr
<mvt:item name="sebenzatools" param="var|widget|padr(l.all_settings:product:price,5,0)" />
&mvt:global:widget;
round
<mvt:item name="sebenzatools" param="var|widget|l.all_settings:product:price ROUND 2" />
&mvt:global:widget;
user ip
<mvt:item name="sebenzatools" param="var|widget|remote_addr" />
&mvt:global:widget;
Day of month
<mvt:item name="sebenzatools" param="var|widget|dyn_tm_mday" />
&mvt:global:widget;
Month of year
<mvt:item name="sebenzatools" param="var|widget|dyn_stm_mon" />
&mvt:global:widget;
user agent
<mvt:item name="sebenzatools" param="var|widget|http_user_agent" />
&mvt:global:widget;
http_referer
<mvt:item name="sebenzatools" param="var|widget|http_referer" />
&mvt:global:widget;
document url
<mvt:item name="sebenzatools" param="var|widget|documenturl" />
&mvt:global:widget;
tolower
<mvt:item name="sebenzatools" param="var|widget|tolower(l.all_settings:product:code)" />
&mvt:global:widget;
Math Example 1
<mvt:item name="sebenzatools" param="var|widget|5 + 5" />
&mvt:global:widget;
Math Example 2
<mvt:item name="sebenzatools" param="var|widget|5 + 5" />
&mvt:global:widget;
Math Example 3
<mvt:item name="sebenzatools" param="var|widget|l.all_settings:product:price + 5" />
&mvt:global:widget;
Nested function example
<mvt:item name="sebenzatools" param="var|widget|tolower(gettoken(l.all_settings:product:code,'-','2'))" />
&mvt:global:widget;
Example usage from the endless things you could do:
Sub-Category List with Top 3 Bestsellers from each
<mvt:item name="sebenzatools" param="subcats|3|l.all_settings:category:id� />
<mvt:foreach iterator="subcat" array="subcats">
<mvt:item name="sebenzatools" param="bestsellers|3|l.all_settings:subcat:code" />
<mvt:if expr="l.settings:bestsellers">
<table cellspacing="0" cellpadding="4" width="100%">
<tr><td colspan="2" bgcolor="#eeeeee">
<b>Top Sellers in <i>&mvt:subcat:name;</i></b>
</td></tr>
<mvt:foreach iterator="bestseller" array="bestsellers">
<tr><td align="left" valign="bottom" width="33%">
<a href="#">&mvte:bestseller:name;</a><br />
$&mvt:bestseller:price;
</td></tr>
</mvt:foreach>
</table>
</mvt:if>
</mvt:foreach>
�You Save� - Custom Product Field - Price
<mvt:if expr="l.settings:product:customfield_values:customfields:RETAIL
AND (l.settings:product:customfield_values:customfields:RETAIL GT l.settings:product:price)">
Retail Price: <s>$&mvt:product:customfield_values:customfields:RETAIL;</s><br />
<mvt:item name="sebenzatools" param="var|yousave|(l.all_settings:product:customfield_values:customfields:RETAIL - l.all_settings:product:price) ROUND 2" />
<mvt:item name="sebenzatools" param="var|yousavep|((g.yousave / l.all_settings:product:customfield_values:customfields:RETAIL) * 100) ROUND 2" />
<mvt:if expr="g.yousave">
You Save: $&mvt:global:yousave; (&mvt:global:yousavep;%)<br />
</mvt:if>
</mvt:if>