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
{% if category.title == "Vases et cache-pots" and request.query_params.marque.208768 == '1' %} | |
<p>Je teste une fonctionnalité</p> | |
{% endif %} |
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
// Add a redirect_url to the form to create an extra step | |
let redirectUrlInput = document.createElement("input"); | |
redirectUrlInput.setAttribute('name', 'redirect_url'); | |
redirectUrlInput.setAttribute('value', 'https://your-script-url.com'); | |
redirectUrlInput.setAttribute('type', 'hidden'); | |
document.getElementById('listingForm').appendChild(redirectUrlInput); |
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
/** | |
* Making sure at least one shipping method is selected if shipping is enabled | |
*/ | |
if(typeof Kr !== 'undefined' && typeof Kr.Listing !== 'undefined' && Kr.Listing !== null && document.querySelectorAll('input[name="addons"]').length > 0) | |
{ | |
let checkIfShippingHasBeenSelected = function() { | |
if(document.querySelectorAll('input[name="addons"]:checked').length === 0) { | |
[].forEach.call(document.querySelectorAll('input[name="addons"]:first-child'), function (el) {el.checked = true}); | |
} | |
} |
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
/** | |
* Thank You Douglas Karr for this javascript function | |
* @link https://martech.zone/javascript-password-strength/ | |
*/ | |
if($('#signupForm').length > 0 && $('#password').length > 0) { | |
$('#password-input-div').append('<span id="passwordStrength"></span>'); | |
$('#password').on('keyup', function(){ | |
var strength = document.getElementById("passwordStrength"); | |
var strongRegex = new RegExp("^(?=.{14,})(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*\\W).*$", "g"); |
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
if(typeof Kr !== 'undefined' && typeof Kr.Listing !== 'undefined' && Kr.Listing !== null){ | |
if(Kr.Listing.id === YOUR_LISTING_ID) { | |
var iframe = document.createElement('iframe'); | |
iframe.style.width="100%"; | |
iframe.style.height="300px"; | |
iframe.src = "YOUR_IFRAME_URL_SRC"; | |
let container = document.getElementsByClassName('container listing_container_main_wrapper'); | |
container[0].appendChild(iframe); | |
} | |
} |
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
// https://vicopo.selfbuild.fr/ | |
jQuery(function($){var _host=(location.protocol==="http:"?"http:":"https:")+"//vicopo.selfbuild.fr";var _cache={};var _sort=function(a,b){return a.city-b.city};var _filter=function(){return true};$.extend({vicopoSort:function($sort){_sort=$sort},vicopoFilter:function($filter){_filter=$filter},vicopoPrepare:function($cities){$cities=$cities.filter(_filter);return $cities.sort(_sort)},vicopo:function(_input,_done){_input=_input.trim();return this.getVicopo(/^\d+$/.test(_input)?"code":"city",_input,_done)},codePostal:function(_input,_done){return this.getVicopo("code",_input,_done)},ville:function(_input,_done){return this.getVicopo("city",_input,_done)},getVicopo:function(_name,_input,_done){if(_input.length>1){_input=_input.trim();_cache[_name]=_cache[_name]||{};if(_cache[_name][_input]){_done(_input,$.vicopoPrepare(_cache[_name][_input]||[]),_name)}else{var _data={};_data[_name]=_input;return $.getJSON(_host,_data,function(_answer){_cache[_name][_input]=_answer.cities;_done(_an |
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
// listing page | |
.listing_container .rate { | |
display:none; | |
} | |
// Shop view | |
.profile-view .rate { | |
display:none; | |
} |
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
$(document).ready(function() { | |
// Keep only France as authorized Shipping countries | |
if($('#shipping-country').length > 0) { | |
$('#shipping-country') | |
.empty() | |
.append('<option selected="selected" value="FR">France</option>'); | |
} | |
}); |
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
$(document).ready(function() { | |
// Hide the prive range filter if exists | |
if($('.price_filter_side').length > 0) { | |
$('.price_filter_side').remove(); | |
} | |
}); |
NewerOlder