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
$tiny = array('ни', 'не', 'и', 'но', 'а', 'или', 'да', 'как', | |
'из-за', 'про', 'по', 'за', 'для', 'на', | |
'до', 'при', 'меж', 'о', 'у', 'в', 'во', | |
'с', 'со', 'от', 'ото', 'из', 'без', 'безо', | |
'к', 'ко', 'об', 'обо', 'под', 'подо', | |
'над', 'перед', 'передо'); | |
$text = preg_replace('~(\s)«~', | |
' <span class="hpquote">«</span>', $text); | |
$text = preg_replace('~[^>]«~', '<span class="hpquote">«</span>', $text); |
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
jQuery('.colorbox').each(function(){ | |
var lnk = jQuery(this).attr('href'); | |
jQuery(this).find('img').attr('src', lnk); | |
jQuery(this).attr('data-fancybox', 'gallery'); | |
}) |
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
\u0430|а | |
\u0410|А | |
\u0431|б | |
\u0411|Б | |
\u0432|в | |
\u0412|В | |
\u0433|г | |
\u0413|Г | |
\u0434|д | |
\u0414|Д |
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
{% assign root = product.collections | sort: 'level' %}{{ root.last.title }} |
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
(function() { | |
window.addEventListener('scroll', function(event) { | |
var depth, i, layer, layers, len, movement, topDistance, translate3d; | |
topDistance = this.pageYOffset; | |
layers = document.querySelectorAll("[data-type='parallax']"); | |
for (i = 0, len = layers.length; i < len; i++) { | |
layer = layers[i]; | |
depth = layer.getAttribute('data-depth'); | |
movement = -(topDistance * depth); | |
translate3d = 'translate3d(0, ' + movement + 'px, 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
$.ajaxSetup({ | |
beforeSend: function (xhr,settings) { | |
var str = settings.url; | |
if(str.indexOf('https://insales.boxberry.ru/box/insales/get-price-courier.php') + 1) { | |
settings.url = str.replace(/zip/g,'zip_none'); | |
$('#order_delivery_variant_id_1302944').on('updated:insales:delivery', function(e) { | |
if(e.originalEvent.detail.available == true){ | |
$(this).parent().parent().css({'display': 'table-row', 'visibility': 'visible'}) | |
}else{ | |
$(this).parent().parent().css({'display': 'none', 'visibility': 'hidden'}) |
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
.block-ellipsis { | |
display: block; | |
display: -webkit-box; | |
max-width: 100%; | |
height: 43px; | |
margin: 0 auto; | |
font-size: 14px; | |
line-height: 1; | |
-webkit-line-clamp: 3; | |
-webkit-box-orient: vertical; |
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
EventBus.subscribe('products-ready:insales:common', function(data) { | |
$("[data-founded]").each(function(index, el) { | |
var pid = parseInt($(el).attr("data-product-id")), | |
vid = parseInt($(el).attr("data-founded")); | |
$(el).removeAttr('data-founded'); | |
Products._products[pid]._instance[0].variants.setVariant(vid); | |
}); | |
}); | |
EventBus.subscribe('change_variant:insales:product', function(data) { |
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
ИЗМЕНЕНИЕ ПАРАМЕТРОВ ТОВАРА | |
Важный момент: передавать надо все параметры, если ранее установленный параметр не будет передан в запросе, то он будет удален. | |
Запрос: PUT /admin/products/#{id}.xml | |
<?xml version="1.0" encoding="UTF-8"?> | |
<product> | |
<id type="integer">41658</id> | |
<properties-attributes type="array"> |
OlderNewer