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
{ "file_url": "http://my-service/files/abcd.pdf" } |
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
{ | |
"printable_document": { | |
"title":"моя форма", | |
"url":"http://my-service.ru/doc", | |
"handle": "my_printable_form" | |
} | |
} |
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
{ | |
"product": { | |
"dimensions": "3х3х3" | |
} | |
} |
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
[ | |
{ | |
"price": 100, // Стоимость доставки | |
// Для срока доставки может быть указано описание и\или числовые значения min и\или max | |
"delivery_interval": { | |
"min_days": 1, // Минимальный срок доставки | |
"max_days": 3, // Максимальный срок доставки | |
"description": "от 1 до 3-х дней" // Текстовое описание срока доставки | |
}, | |
// Внутрениий идентификатор тарифа службы доставки. Нужен для возможности пересчета стоимости доставки при изменении состава заказа |
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
{ | |
"order": { | |
"order_lines": [ | |
{ | |
"quantity":1, | |
"weight":100, // Вес в кг | |
"dimensions":"100х10х3" //Габариты в формате ШхГхВ | |
} | |
], | |
"shipping_address": { |
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
Запрос: | |
Актуально только для PostgreSQL, т.к. оконные функции есть не везде. | |
SELECT t.* FROM | |
( | |
SELECT | |
news.*, | |
row_number() OVER (PARTITION BY source ORDER BY source, CASE n_type WHEN 'realty' THEN 0 WHEN 'sport' THEN 1 ELSE 2 END, created_at DESC) as rnum | |
FROM news |
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
Сейчас появилась возможность содздавать блоки с одинаковыми permalink для разных шаблонов блоков | |
т.е. у нас может быть блок slide1 с типом блоков slider1 и еще один slide1 с типом блоков slider2 | |
в связи с этим мы добавили новый синтаксис для обращения к блокам через liquid | |
blocks.with_template['slider1'].slide1.content | |
blocks.with_template['slider2'].slide1.content | |
Тоже самое касается панелей блоков, за исключением того, что панели блоков могут не иметь типа |
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
'use strict'; | |
self.addEventListener('push', function(event) { | |
if (!(self.Notification && self.notification.permission === 'granted')) { | |
return; | |
} | |
var data = {}; | |
if (event.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
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> | |
<script type="text/javascript"> | |
(function($) { | |
MyExternalPickup = (function() { | |
function MyExternalPickup(deliveryId, fieldId) { | |
this.deliveryId = deliveryId; | |
this.fieldId = fieldId; | |
this.bind(); | |
this.prependDialog(); |
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($) { | |
MyExternalPickup = (function() { | |
function MyExternalPickup(deliveryId, fieldId) { | |
this.deliveryId = deliveryId; | |
this.fieldId = fieldId; | |
this.bind(); | |
} | |
MyExternalPickup.prototype.input = function() { | |
return this.element || (this.element = $(this.inputSelector)); |
NewerOlder