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
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
<script> | |
if (typeof(Ecwid) == 'object') { | |
// Add handler for Ecwid's OnPageLoad event | |
Ecwid.OnPageLoaded.add(function(page) { | |
if ('CHECKOUT_PAYMENT_DETAILS' == page.type) { | |
jQuery('.ecwid-AddressForm input[type=checkbox]').first().click(function() { | |
if (!this.checked) { | |
jQuery('.ecwid-AddressForm input[type=text]').val(''); | |
} |
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
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
<script> | |
if (typeof(Ecwid) == 'object') { | |
Ecwid.OnAPILoaded.add(function() { | |
var preorderLabel = "Preorder"; | |
function checkPreorder() { | |
if ( | |
!jQuery(".ecwid-productBrowser-details-qtyAvailInfo").is(':visible') | |
&& jQuery(".ecwid-productBrowser-details-outOfStockLabel").length == 0 |
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
/* Styles for the 'Buy now' button */ | |
button.ecwid-AccentedButton { | |
height: auto; | |
} | |
button.ecwid-AccentedButton { | |
font-size: 13px; | |
color: #ffffff; | |
padding: 9px 18px; | |
background: -moz-linear-gradient( |
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
/* | |
* A CSS snippet for Ecwid to alter buy now buttons. | |
* The button CSS styles is from this list: http://hellohappy.org/css3-buttons/ ('Shiny blue') | |
*/ | |
/* This code prevents the button height issues and default IE fallbacks in Ecwid */ | |
button.ecwid-AccentedButton, | |
button.ecwid-AccentedButton:hover, | |
button.ecwid-AccentedButton:active { | |
height: auto; |
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
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
/* An HTML/Javascript code snippet for Ecwid to show/hide product options depending on a trigger(expander) option */ | |
if (typeof(Ecwid) == 'object') { | |
Ecwid.OnAPILoaded.add(function() { | |
var expanderOptionName = "Do_you_want_extra_options"; | |
var expanderOptionFlagValue = "Yes"; | |
function checkExpandableOptions() { |
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
<script type="text/javascript"> | |
// A drop-in HTML/JS script for Ecwid to force logout after an order is placed | |
if (typeof(Ecwid) == 'object') { | |
Ecwid.OnPageLoaded.add(function(page) { | |
if ('ORDER_CONFIRMATION' == page.type) { | |
var localStoragePrefix = 'PSecwid__' + Ecwid.getOwnerId() + 'PS'; | |
var isLoggedIn = (localStorage.getItem(localStoragePrefix + 'token') != null); | |
if (isLoggedIn) { | |
var itemsToRemove = ['token','customerid','profile']; | |
for (var i = 0; i < itemsToRemove.length; i++) { |
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
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
/* An HTML/Javascript code snippet for Ecwid to disallow purchasing of products from certain categories */ | |
if (typeof(Ecwid) == 'object') { | |
Ecwid.OnAPILoaded.add(function() { | |
var __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; | |
var categories = [ | |
1234567, | |
5286250 |
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
<!-- An HTML/Javascript code snippet for Ecwid to redirect continue shopping buttons to a custom page --> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> | |
<script> | |
if (typeof(Ecwid) == 'object') { | |
Ecwid.OnAPILoaded.add(function() { | |
// Redirect address. Change it to the URL of page where you want to redirect your customers. | |
// You can use absolute or relative addresses, e.g. 'index.html', 'http://google.com' | |
var continueShoppingRedirect = "#!/~/category/id=0"; | |
// Delay (ms), which is necessary for the empty cart page to appear after onCartChange event firing |
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
<!-- An HTML/Javascript code snippet for Ecwid to redirect continue shopping buttons to a custom page --> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> | |
<script> | |
if (typeof(Ecwid) == 'object') { | |
Ecwid.OnAPILoaded.add(function() { | |
Ecwid.OnPageLoaded.add(function(page) { | |
jQuery('.ecwid-pager').removeClass('ecwid-pager-hasTopSeparator').insertAfter('div.ecwid-results-topPanel-itemsCountLabel'); | |
}); | |
}); | |
} |