Skip to content

Instantly share code, notes, and snippets.

Avatar
Coffee Helps Me Focus...Coffee Helps Me Focus...Coffee Helps Me Focus...

Matt Zimmermann influxweb

Coffee Helps Me Focus...Coffee Helps Me Focus...Coffee Helps Me Focus...
View GitHub Profile
@influxweb
influxweb / bask-basket.html
Last active Jun 6, 2022
Luxe: 10.04 Basket Contents Update
View bask-basket.html
<mvt:if expr="g.Action EQ 'RGRP'">
<mvt:assign name="g.Quantity" value="miva_variable_value('Quantity' $ g.Restore_Counter)" />
<mvt:assign name="g.Restore_Name" value="miva_variable_value('Restore_Name' $ g.Restore_Counter)" />
<mvt:assign name="g.Restore_Params" value="miva_variable_value('Restore_Params' $ g.Restore_Counter)" />
<div class="message message--info h-nm">
<strong>&mvte:global:Restore_Name;</strong> has been removed from your cart. <a href="&mvte:urls:BASK:auto_sep;&mvte:global:Restore_Params;">Undo?</a>
</div>
<mvt:assign name="g.Restore_Counter" value="g.Restore_Counter + 1" />
</mvt:if>
<mvt:item name="customfields" param="Read_Basket('continue_url', l.settings:continue_url)" />
@influxweb
influxweb / bask-basket.html
Created Jun 3, 2022
Levels: 10.04 Basket Contents Update
View bask-basket.html
<mvt:if expr="g.Action EQ 'RGRP'">
<mvt:assign name="g.Quantity" value="miva_variable_value('Quantity' $ g.Restore_Counter)" />
<mvt:assign name="g.Restore_Name" value="miva_variable_value('Restore_Name' $ g.Restore_Counter)" />
<mvt:assign name="g.Restore_Params" value="miva_variable_value('Restore_Params' $ g.Restore_Counter)" />
<div class="message message-info">
<strong>&mvte:global:Restore_Name;</strong> has been removed from your cart. <a href="&mvte:urls:BASK:auto_sep;&mvte:global:Restore_Params;">Undo?</a>
</div>
<mvt:assign name="g.Restore_Counter" value="g.Restore_Counter + 1" />
</mvt:if>
<mvt:if expr="l.settings:basket:empty">
@influxweb
influxweb / bask-basket.html
Last active Apr 29, 2022
BASK: Edit Basket Attributes [UPDATED: 04/29/2022]
View bask-basket.html
<script>
function continueShopping(link) {
if (sessionStorage.getItem('continue_url')) {
link.href = sessionStorage.getItem('continue_url');
}
}
</script>
<mvt:if expr="g.Action EQ 'RGRP' AND g.quote_item NE '1'">
<mvt:assign name="g.Quantity" value="miva_variable_value('Quantity' $ g.Restore_Counter)" />
<mvt:assign name="g.Restore_Name" value="miva_variable_value('Restore_Name' $ g.Restore_Counter)" />
@influxweb
influxweb / input.scss
Created Mar 18, 2022
Generated by SassMeister.com.
View input.scss
@use "sass:meta";
/**
* Use this mixin to declare a set of CSS Custom Properties.
* The variables in $css_variables will be properly prefixed.
* The use of this mixin is encouraged to keep a good scalability.
*/
@mixin cssvars($css_variables, $prefix: rt) {
:root {
@each $name, $value in $css_variables {
@influxweb
influxweb / quantify.js
Created Feb 7, 2022
Quantify: Updated for initializations and min/max/step settings
View quantify.js
/**
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|q|u|a|n|t|i|f|y|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*
* This extension allows for the use of buttons to increase/decrease item
* quantities on the product and basket pages. When used on the basket page,
* the decrease button becomes a remove button if the quantity is 1.
*/
@influxweb
influxweb / ctgy-page.html
Created Jan 31, 2022
Colossus: Page Details Code
View ctgy-page.html
<mvt:item name="html_profile" />
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<base href="&mvt:global:basehref;">
<mvt:if expr="NOT ISNULL l.settings:category:page_title">
<title>&mvt:category:page_title;</title>
<mvt:elseif expr="NOT ISNULL l.settings:page:title">
<title>&mvt:page:title;</title>
@influxweb
influxweb / afed-affiliate.html
Last active Nov 10, 2021
AFED: Current Password Field Added
View afed-affiliate.html
<section class="o-layout o-layout--justify-center">
<div class="o-layout__item u-width-12 u-width-9--m">
<p class="u-text-right"><a class="c-button c-button--hollow c-button--small u-color-red" href="&mvte:urls:SFNT:secure_sep;Action=ALOG" title="Log Out">Log Out</a></p>
<form method="post" action="&mvte:urls:AFAE:secure;">
<fieldset>
<legend>&mvt:page:name;</legend>
<input type="hidden" name="Action" value="UAFL" />
<p class="c-heading-delta">Log In Info</p>
<div class="c-form-list o-layout">
@influxweb
influxweb / opay.html
Created Oct 20, 2021
Shadows v2: Default OPAY
View opay.html
<mvt:item name="html_profile" />
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<base href="&mvt:global:basehref;">
<mvt:if expr="NOT ISNULL l.settings:page:title">
<title>&mvt:page:title;</title>
<mvt:else>
<title>&mvt:store:name;: &mvt:page:name;</title>
</mvt:if>
View prod-product_display_imagemachine.js
const productName = '&mvtj:product:name;';
let generate_thumbnail_event = new CustomEvent('ImageMachine_Generate_Thumbnail');
let images = [];
let thumbnailIndex = 0;
let zoomImageLink = document.querySelector('[data-photograph]');
ImageMachine.prototype.oninitialize = function (data) {
images = [];
thumbnailIndex = 0;
zoomImageLink.href = (data.length > 0) ? data[0].image_data[this.closeup_index] : 'graphics/en-US/admin/blank.gif';
@influxweb
influxweb / ajax-add-to-cart.js
Created Sep 2, 2021
Colossus: Add to Cart with GA Universal Enhanced Ecommerce
View ajax-add-to-cart.js
/**
* When called from a `theme.js` file on a product page, this extension will
* work with the default page code to add a product to the cart utilizing an
* AJAX call to the form processor.
*
* The function contains internal error checking as well as a check to see which
* page was reached and displaying messages accordingly. If the store is also
* utilizing the `mini-basket` extension, said extension will be triggered for
* display upon successfully adding a product to the cart.
*/