Skip to content

Instantly share code, notes, and snippets.

@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 */
}
@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 / 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 / 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 / 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>";
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 / 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>
@MGCodeSnips
MGCodeSnips / auto sliding mobile banner
Last active January 17, 2017 15:56
Just copy and paste onto the mobile main page.
<style>
.mobileSlide img{
height:auto!important;
width:auto!important;
}
@media screen and (orientation:portrait) {
.mobileSlide{
display:none;
@MGCodeSnips
MGCodeSnips / exact search tick box
Created September 12, 2016 16:22
you can use this to force the search to do an exact search
/* put this in the searchbox ekm tag */
<input type="checkbox" name="ticked" id="ticked" value="Bike"> tick it<br>
/* paste this in the footer */
<script type='text/javascript'>
$(document).ready(function()
{
$("form").submit(function(e)
@MGCodeSnips
MGCodeSnips / Tab boxes for product page
Created December 6, 2016 09:39
You can use this code to add tab boxes to any product page. here you will find CSS body and js
/* Style for tabs. */
<style>
/*** product tabs ***/
#productTabs {
margin: 20px 0 0;
position: relative;
}