This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MivaEvents.SubscribeToEvent('variant_changed', function (product_data) { | |
console.log( product_data ); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mvt:if expr="g.CustomerCreate"> | |
<iframe name="processCreate" id="js-process-create" class="hidden"></iframe> | |
<form action="&mvt:global:secure_sessionurl;" method="post" target="processCreate" id="js-create-account" class="hidden"> | |
<input type="hidden" name="Store_Code" value="&mvte:global:Store_Code;" /> | |
<input type="hidden" name="Action" value="ICST" /> | |
<input type="hidden" name="Screen" value="ACED" /> | |
<input type="hidden" name="PrevPage" value="INVC" /> | |
<input type="hidden" name="Customer_LoginEmail" value="&mvte:global:Basket:ship_email;" /> | |
<input type="password" name="Customer_Password" value="&mvte:global:CustomerCreate;" /> | |
<input type="password" name="Customer_VerifyPassword" value="&mvte:global:CustomerCreate;" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mvt:assign name="g.select_sql" value="'SELECT name FROM s01_PageFinderCats WHERE cat_id=' $ l.settings:category:id $ ' LIMIT 1'" /> | |
<mvt:item name="ry_toolbelt" param="query|g.select_sql|pagename" /> | |
<mvt:if expr="l.settings:pagename"> | |
<mvt:assign name="l.settings:category:pagelink" value="'http://' $ g.domain:name $ '/' $ l.settings:pagename $ '.html'" /> | |
<mvt:else> | |
<mvt:assign name="l.settings:category:pagelink" value="'http://' $ g.domain:name $ '/category/' $ l.settings:category:code $ '.html'" /> | |
</mvt:if> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mvt:assign name="g.select_sql" value="'SELECT name FROM s01_PageFinderProducts WHERE product_id=' $ l.settings:product:id $ ' LIMIT 1'" /> | |
<mvt:item name="ry_toolbelt" param="query|g.select_sql|pagename" /> | |
<mvt:if expr="l.settings:pagename"> | |
<mvt:assign name="l.settings:product:pagelink" value="'http://' $ g.domain:name $ '/' $ l.settings:pagename $ '.html'" /> | |
<mvt:else> | |
<mvt:assign name="l.settings:product:pagelink" value="'http://' $ g.domain:name $ '/product/' $ l.settings:product:code $ '.html'" /> | |
</mvt:if> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mvt:miva output="on" compresswhitespace="on" /> | |
<mvt:assign name="g.line_break" value="asciichar(10)" /> | |
<mvt:assign name="g.sql_query" value="'SELECT * FROM s01_Pages'" /> | |
<mvt:item name="ry_toolbelt" param="query|g.sql_query|Pages" /> | |
<mvt:assign name="g.excludes" value="'rss'" /> | |
<Pages> | |
<mvt:foreach iterator="page" array="Pages"> | |
<mvt:assign name="g.is_lower" value="islower(l.settings:page:code)" /> | |
<mvt:if expr="g.is_lower AND NOT (l.settings:page:code CIN g.excludes)"> | |
<mvt:assign name="g.url" value="'http://' $ g.domain:name $ '/mm5/merchant.mvc?Store_Code=' $ g.Store_Code $ '&Screen=' $ l.settings:page:code" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// FROM: http://stackoverflow.com/questions/14352139/multiple-ajax-calls-from-array-and-handle-callback-when-completed | |
// FROM: http://jsfiddle.net/MBZEu/4/ | |
var list = ['obj1', 'obj2', 'obj3', 'obj4', 'obj5']; | |
var callback = function() { | |
console.log("done"); | |
}; | |
var requests = []; | |
for(i = 0; i < list.length; i++) { | |
requests.push($.ajax({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
# Dynamic Image Stack | |
RewriteCond %{REQUEST_URI} /mm5/stack/(\d+)x(\d+)/top/(.*)/bottom/(.*) | |
RewriteRule ^(.*)$ http://www.example.com/mvthumb/stack.php?width=%1&height=%2&top=%3&bottom=%4 [L] | |
*/ | |
// Example Usage: http://www.example.com/mm5/stack/300x350/top/graphics/00000001/sample-top-image.jpg/bottom/graphics/00000001/sample-bottom-image.jpg | |
// TODO: Add support for gif & png files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// FROM: http://snippetrepo.com/snippets/object-oriented-javascript | |
// Here I define global variables, which I update in this file | |
var windowWidth; | |
// Create a class | |
var App = function() { | |
// app variable will reference the App class (like using $this-> in php) | |
var app = this; | |
var debug = true; // Allows me to disable things in production, like app.log() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ---- Heading with background line ---- */ | |
/* | |
EXAMPLE | |
---------------------- | |
<h5 class="heading-hr cyan uppercase"> | |
<span>Customers Also Purchased</span> | |
</h5> | |
*/ | |
.heading-hr{ | |
display: block; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// FROM: http://www.qwiple.com/posts/14106/simple-templates-with-vanilla-js | |
if (!String.prototype.supplant) { | |
String.prototype.supplant = function(o) { | |
return this.replace(/{([^{}]*)}/g, function(a, b) { | |
var r = o[b]; | |
return typeof r === 'string' ? r : a; | |
}); | |
}; | |
} |