View regex-string-whitelist.js
// in the regex, the carrot(^) negates the match, so if the stringToReplace contains something that is not a-z or 0-9 it will be replaced
// In this case the desired string will only be alpha numeric characters, stripping out spaces and symbols
// Help from: http://stackoverflow.com/questions/4374822/javascript-regexp-remove-all-special-characters
var desired = stringToReplace.replace(/[^a-zA-Z0-9]/gi, '')
View miva-hash-plain-text-password-to-match-encrypted-customer-password.php
<?php
/* Split the password into component parts */
$encrypted = "PBKDF1:sha1:1000:gE2lydzFBG8=:+vynLWCYzSCRpdRqjNO3ke67Brw=";
$fields = explode( ":", $encrypted );
$iterations = $fields[ 2 ];
$salt = base64_decode( $fields[ 3 ] );
$encrypted = base64_decode( $fields[ 4 ] );
/* This is the password we are verifying */
$password = "wombat!";
View miva-sort-and-update-attribute-option-display-order.xml
<mvt:do file="g.Module_Library_DB" name="l.success" value="Product_Load_Code( g.Product_Code, l.settings:product )" />
<mvt:do file="g.Module_Library_DB" name="l.success" value="AttributeList_Load_Product( l.settings:product:id, l.settings:product:attributes )" />
<mvt:foreach iterator="attribute" array="product:attributes">
<mvt:do file="g.Module_Library_DB" name="l.success" value="OptionList_Load_Attribute( l.settings:attribute:id, l.settings:attribute:options )" />
<mvt:comment>
Only Sort Length Attributes
</mvt:comment>
<mvt:if expr="l.settings:attribute:code NE 'length'">
View html-canvas-file-upload-local-storage.html
<!-- http://tech.pro/tutorial/1383/javascript-one-language-to-rule-them-all -->
<style>
[for=blue] { color: blue; }
[for=green] { color: green; }
[for=red] { color: red; }
</style>
<input id="uploadImage" type="file" name="photo" />
<input id="caption" type="text" name="caption" placeholder="caption" />
<label for="blue">Blue</label>
View miva-preload-attribute-options-from-variant-part-product-code.xml
<mvt:if expr="g.Variant_Product_Code">
<mvt:comment>
Pass the Variant Part Product Code, and Load the Attributes & Options for it
/store/variant-attributes.html?Variant_Product_Code=shirt_small_red
</mvt:comment>
<mvt:do file="g.Module_Library_DB" name="l.success" value="Product_Load_Code( g.Variant_Product_Code, l.settings:variant_product )" />
<mvt:do file="g.Module_Library_DB" name="l.success" value="ProductVariantPartList_Load_Part( l.settings:variant_product:id, l.settings:variant_product:parts )" />
<mvt:foreach iterator="part" array="variant_product:parts">
<mvt:do file="g.Module_Library_DB" name="l.success" value="Product_Load_ID( l.settings:part:product_id, l.settings:part:master_product )" />
<mvt:assign name="l.settings:variant_product:adpr_data:product_code" value="l.settings:part:master_product:code" />
View simple-scroll-to-element.js
// Found at: http://jsfiddle.net/BjpWB/4
function scrollToAnchor(aid){
var aTag = $("a[name='"+ aid +"']");
$('html,body').animate({scrollTop: aTag.offset().top},'slow');
}
scrollToAnchor('id3');
function scrollTo($element){
$('html,body').animate({scrollTop: $element.offset().top},'slow');
}
View miva-load-variants-attributes-and-options.xml
<mvt:if expr="g.Product_Code AND g.Variant_ID">
<mvt:comment>
Pass in a Product_Code and a Variant_ID to load that variant's attribute & option data
Example
/store/variant-attributes.html?Product_Code=shirt&Variant_ID=29522
</mvt:comment>
<mvt:do file="g.Module_Library_DB" name="l.success" value="Product_Load_Code( g.Product_Code, l.settings:product )" />
<mvt:assign name="l.settings:product:variant_id" value="g.Variant_ID" />
<mvt:do file="g.Module_Library_DB" name="l.success" value="ProductVariantList_Load_Variant( l.settings:product:id, g.variant_id, l.settings:product:variants )" />
<mvt:foreach iterator="variant" array="product:variants">
View PROD--variables-mvt.xml
<mvt:if expr="g.variant_id LE 0">
<mvt:assign name="g.variant_id" value="0" />
</mvt:if>
<script>
var variant_id = &mvtj:global:variant_id;;
var product_code = '&mvtj:product:code;';
</script>
View miva-admin-non-secure-mode.md

Appending ?nonsecuremode=1 allows you to access a store's Miva Admin on it's non-secure (http://) url.

This typically is needed when a store's Domain Settings are forcing the admin to be accessed securely, but say their SLL has expired and you no-longer can access the admin on a secure URL.

For Example:

http://www.example.com/mm5/admin.mvc?nonsecuremode=1

View wget--crawl.sh
#!/bin/sh
# wget --mirror --adjust-extension --page-requisites --execute robots=off --wait=30 --rand om-wait --convert-links --user-agent=Mozilla http://www.example.com
### V1
# wget \
# --recursive \
# --no-clobber \
# --page-requisites \
# --html-extension \