Skip to content

Instantly share code, notes, and snippets.

@MGCodeSnips
MGCodeSnips / Theme fader
Last active January 19, 2017 11:17
You can use this fader code to add a fader to any theme, You may need to fix the height if the theme does not have the same height script
<script type="text/javascript" src="/ekmps/designs/assets/master/1269/other/jlsminifader.min.js"></script>
<script type="text/javascript">
var $j = jQuery;
$j(window).bind('load', function(){
$j('#welcomebanner').jlsMiniFader({ 'delay':3000, 'duration':500, 'hoverStop':true, 'showControls':false, 'autoStart':true, 'showNavigation':true, 'removeEmptySlides':true, 'hideControlsOnHover':true});
});
</script>
CSS
<link rel="stylesheet" href="https://cdn.ekmsecure.com/font-awesome/latest/fa-safe.css">
#menu ul, #menu li {margin: 0; padding: 0; list-style: none;}
#menu li {
position: relative;
z-index; 2;
}
@MGCodeSnips
MGCodeSnips / gist:5393a35dd76e77a9de8cad5eb3696440
Last active January 26, 2017 16:54
How to set price as POA within a show data tag and product page
<!-- category/main page layout --->
{price}
<div class="item-price">
[ekm:nested_if]
iftype="CONTAINS";
ifvalue="[price]";
ifvalue2="0.00";
ifthen="<span class="price-alt"> POA </span>";
@MGCodeSnips
MGCodeSnips / Trade Login
Last active May 24, 2017 10:38
so shop owners can hide prices until the customer is logged in.
[ekm:customer_logged_in]
/* add your price and add to cart button style */
logged_in='<style>.customer-logged-in {display:block;} .customer-logged-out {display: none;}</style>';
logged_out='';
[/ekm:customer_logged_in]
@MGCodeSnips
MGCodeSnips / Basic-contact-form-for-ekm
Created April 21, 2016 11:01
Contact form with CSS for ekm
<style type="text/css">/*CONTACT FORM*/
.contact-form {font-size: 12px;}
.contact-form h1 {font-size: 14px; margin: 10px 0px;}
.contact-form p.required {color: red; font-weight: bold; font-size: 11px; margin: 0 0 0 20%}
.contact-form .hr {border-bottom:1px dotted #CCC; height: 1px; margin: 10px 0px; }
.contact-form-row {clear: both; overflow: hidden; margin: 5px;}
.contact-form-row label {font-weight: bold; width: 20%; float: left; line-height: 38px;}
.contact-form-row input, .contact-form-row textarea {padding:10px; border: 1px solid #CCC; box-shadow: 0px 0px 5px rgba(0,0,0,.1) inset; float:left; width: 60%; background: #EFEFEF}
.contact-form-row textarea {height: 120px;}
.contact-form-row .star {color: red;}
@MGCodeSnips
MGCodeSnips / mobile-scroller
Last active August 5, 2016 10:19
Mobile theme, home page scrolling banner. Paste code into the mobile home page theme. you will need to remove the style from any image you want to use on the mobile scroller.
<!-- desktop theme code start -->
You need to put your hyperlin in the span. The a hyplerling will make the banner look odd on the mobile shop.
When adding your banner image make sure you remove the image style
as the editor adds in width and height styles. This will make the banner strech on the mobile.
<style type="text/css">
.pseudolink {
cursor:pointer;
@MGCodeSnips
MGCodeSnips / editable-text-banners
Created April 21, 2016 10:44
Code form most scrolling banners on ekm
<style type="text/css">
.text-box-container {
position: relative;
}
.top-text {
position: absolute;
top: 90px;
right: 100px; /* change the to left if you want the text to the left */
}