View manually-triggering-attributemachine-change.md

Manually Triggering Attribute Machine Change

Background

Changing the value of a product attribute (dropdown, radio, etc.) using JavaScript (ex: $('.dropdown').val('foo')) will not trigger the change event to fire Attribute Machine and load the new variant's information. Adding $('.dropdown').trigger('change') won't work either.

You need to use .dispatchEvent(new CustomEvent('change')) in order for Attribute maMachine to respond.

Implimentation

View angular-firebase-bootstrap-crud-app-template.html
<!DOCTYPE html>
<html lang="en-US" ng-app="app" ng-controller="appCtrl" ng-cloak>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{title}}</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/css/bootstrap.min.css">
<style>
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
View miva-mvtdo-quick-sort-array-sort-by-two-properties.xml
<mvt:comment>
<!-- Sort Shipping Methods by Price then Name -->
</mvt:comment>
<mvt:assign name="l.comparisons[1]:subelement" value="':price'" />
<mvt:assign name="l.comparisons[1]:direction" value="1" />
<mvt:assign name="l.comparisons[2]:subelement" value="':name'" />
<mvt:assign name="l.comparisons[2]:direction" value="1" />
<mvt:do file="g.Module_Library_Utilities" name="l.success" value="QuickSortArray_Sort( l.settings:shippingmethods, 1, miva_array_elements( l.settings:shippingmethods ), l.comparisons, 2 )" />
View miva-invc-create-account.md

Miva - INVC Create Account

Add a form to the INVC page to allow new customers to create an account by just providing a login & password. After the customer creates an account, there is some functionality to assign the customer to the order that they just placed too.

Screen shot of form on INVC page

Implimentation Steps:

  1. Create a ReadyTheme Content Section with a code of invc_create_account.
View searchspring-prices.html
<mvt:comment>
<!--
g.Product_Codes is a comma separated list of product codes being sent as a query-string parameter
-->
</mvt:comment>
<mvt:assign name="l.settings:product_codes" value="miva_array_deserialize(g.Product_Codes)" />
<mvt:foreach iterator="code" array="product_codes">
<mvt:do name="l.result" file="g.Module_Library_DB" value="Product_Load_Code( l.settings:code, l.settings:product )" />
<mvt:do file="g.Module_Feature_TUI_UT" name="l.result" value="CommonComponentFields_Initialize_Product_Runtime( l.settings:product )" />
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 \
View customizing-searchspring-facet-options.md

Search Spring Facet Customizations

About

SearchSpring's default AJAX display functionality does not give us direct access to the HTML that is used to render the facets, so we have to use their JavaScript API's function hooks to select the desired facet and modify it with JavaScript/jQuery.

Basic Changes

The Default SearchSpring facet HTML is typically a nested set of unordered lists like this:

View sample-searchspring-data-feed.xml
<mvt:comment>
GLOBAL Setup
| 1) File Settings
| 2) Initial File Handling
| - Set Offset / Per Page Variables
| - Delete Existing File (if EXISTS)
| 3) Special Character Reference Variables
========================================
</mvt:comment>
<mvt:comment> =1 File Settings </mvt:comment>
View sample-miva-searchspring-intellisuggest.xml
<mvt:comment>
<!--
Create a <mvt:item name="readytheme" param="contentsection( 'intellisuggest' )" /> and populate it with the following content.
It can then be added to the PROD, BASK, and INVC pages to display & track IntelliSuggest product recommmendations
-->
</mvt:comment>
<mvt:assign name="l.settings:searchspring:site_id" value="'abc123'" />
<mvt:if expr="'PROD' CIN l.settings:page:code">
<div class="intellisuggest" name="Product Recommendations"></div>