Commit df1fde57 authored by cttunvbo's avatar cttunvbo

first commit

parents
(function ($) {
// Drupal.behaviors.cdek = {
// attach: function (context, settings) {
var context = document
var settings = drupalSettings
if ($('.CDEK-widget__preloader').length > 0) {
return;
}
var store = $(context).find('[name="sdek_shipping_Widget[widget_data]"]');
var widjet = new ISDEKWidjet({
defaultCity: 'auto',
cityFrom: settings['cityFrom'],
link: 'cdek_widget',
path: '/modules/custom/commerce_cdek/assets/widget/scripts/',
servicepath: '/cdek_service',
templatepath: '/cdek_template',
hidedress: true,
hidecash: true,
hidedelt: false,
onChoose : function(data) { // при выборе ПВЗ: запишем номер ПВЗ в текстовое поле и доп. информацию
delete data.PVZ.list_block
delete data.PVZ.placeMark
setData(data)
updateSummary(data)
},
onChooseProfile: function(data) {
$(context).find('[name="sdek_shipping_Widget[delivery_type]"]')
.filter('[value="courier"]')
.trigger('click')
},
onReady() {
}
});
function setData(data) {
store.val(JSON.stringify(data))
}
function updateSummary() {
$(context).find('#edit-sdek-shipping-widget-recalculate-shipping').trigger('mousedown')
}
$(context).find('#cdek_widget').on('click', 'button', function() {
var self = $(this);
self.prop("disabled", true);
setTimeout(function() {
self.prop("disabled", false);
}, 100);
})
$.each(settings['goods'], function(index, good) {
widjet.cargo.add(good);
});
// }
// }
})(jQuery)
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?php
header('Access-Control-Allow-Origin: *');
$files = scandir($D = __DIR__ . '/tpl');
unset($files[0]);
unset($files[1]);
$arTPL = array();
foreach ($files as $filesname) {
$file_tmp = explode('.', $filesname);
$arTPL[strtolower($file_tmp[0])] = file_get_contents($D . '/' . $filesname);
}
print_r(array_keys($arTPL)); die();
echo str_replace(array('\r','\n','\t',"\n","\r","\t"),'',json_encode($arTPL));
\ No newline at end of file
<li class="no-active" data-cityid="#CITYID#">
<p class="CDEK-widget__search-list__city-name">#CITYNAME#</p>
<p class="CDEK-widget__search-list__city-details">#CITY_DETAILS#</p>
</li>
\ No newline at end of file
<div class="CDEK-widget__delivery-type__item" data-delivery-type = "courier">
<div class="CDEK-widget__delivery-type__item-title">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 608.99721 611.84603">
<path class="path" d="M417.19812,302.72005a22.21621,22.21621,0,0,0-21.362-20.04709l-72.26781-1.108a9.97688,9.97688,0,0,1-9.10476-7.907L298.5408,172.42893c-0.57712-3.667-3.99636-18.61788-22.66187-18.61788L186.01,157.72438c-11.83932.51451-21.464,6.27084-21.464,22.42639,0,0-.3784,224.99753-0.83847,233.15088l-3.14426,55.66853a91.98249,91.98249,0,0,1-6.32529,26.27846l-36.3755,82.33218a18.97718,18.97718,0,0,0,13.0671,26.65825l12.1102,3.00544a23.2673,23.2673,0,0,0,5.60523.67377c9.77581,0,19.127-5.67329,23.27031-14.11791l34.57743-70.4806a171.14444,171.14444,0,0,0,10.59795-29.41047l19.5108-81.27592,47.2171,72.20793c3.8929,5.95368,8.009,17.37786,8.808,24.4477l9.1279,80.84172a24.0889,24.0889,0,0,0,23.36287,20.86923l13.81027-.04765a20.1837,20.1837,0,0,0,20.24446-22.42911l-9.53353-96.11388a139.95253,139.95253,0,0,0-7.24815-30.64368L300.08163,351.25756l-0.26134-23.29618,98.33117-3.63972a19.785,19.785,0,0,0,19.063-21.41777Zm-92.0808,301.47133h0v0Z" transform="translate(-2.00187 0.84609)"/>
<path class="path" d="M214.73855,132.44774a66.665,66.665,0,0,0,66.24334-73.88758l22.33112-2.5195c7.78172-.87795,15.68051-7.08481,18.37287-14.43777L329.16542,21.176A13.0559,13.0559,0,0,0,328.0098,9.059a12.51735,12.51735,0,0,0-10.50812-5.1193c-0.51043,0-1.03856.0245-1.58029,0.07622l-64.57048,6.14153A66.62573,66.62573,0,1,0,214.73855,132.44774Z" transform="translate(-2.00187 0.84609)"/>
<path class="path" d="M496.86108,236.73808l-6.42465-92.34484a21.71437,21.71437,0,0,0-21.3579-19.88784l-123.44178.21506A19.38181,19.38181,0,0,0,326.194,145.60194l6.42465,92.34484a21.70638,21.70638,0,0,0,21.32113,19.88785l123.47854-.21507A19.37986,19.37986,0,0,0,496.86108,236.73808ZM353.93843,251.02748h0Z" transform="translate(-2.00187 0.84609)"/>
</svg>
<span>#COURIER#</span>
</div>
<div class="CDEK-widget__delivery-type__item-details">
<p>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60">
<g>
<path class="path" d="M30,0a0.99909,0.99909,0,0,0-1,1V14.292a1,1,0,0,0,2,0V2.018a27.99965,27.99965,0,1,1-20.834,8.218A0.99985,0.99985,0,0,0,8.75,8.824,29.99976,29.99976,0,1,0,30,0Z" transform="translate(0 0.00003)"/>
<path class="path" d="M28.555,33.532a3.56312,3.56312,0,1,0,4.975-4.979L20.586,19.19a1.00069,1.00069,0,0,0-1.397,1.397Z" transform="translate(0 0.00003)"/>
</g>
</svg>
#TIME# #DAY#
</p>
<p>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 331.51501 334.87601">
<path class="path" d="M333.196,155.999H317.129V82.09a32.17007,32.17007,0,0,0-32.134-32.134H263.234L240.965,9.917a19.28,19.28,0,0,0-26.222-7.488L129.279,49.955H33.815A32.17007,32.17007,0,0,0,1.681,82.089V302.742a32.17008,32.17008,0,0,0,32.134,32.134h251.18a32.17008,32.17008,0,0,0,32.134-32.134V237.94h16.067V155.999h0Zm-48.201-93.19a19.24277,19.24277,0,0,1,19.068,17.14H279.911l-9.525-17.14h14.609ZM220.996,13.663a6.54816,6.54816,0,0,1,8.734,2.494l35.476,63.786H101.798Zm83.279,289.079a19.30487,19.30487,0,0,1-19.281,19.281H33.815a19.30487,19.30487,0,0,1-19.281-19.281V82.09A19.30487,19.30487,0,0,1,33.815,62.809h72.353L75.345,79.95H37.832a6.427,6.427,0,0,0,0,12.854H304.275v63.201H257.276a39.63892,39.63892,0,0,0-39.589,39.589v2.764a39.63891,39.63891,0,0,0,39.589,39.589h46.999v64.795h0Zm16.067-77.655H257.276a26.76471,26.76471,0,0,1-26.736-26.736v-2.764a26.76471,26.76471,0,0,1,26.736-26.736h63.066v56.236Zm-43.381-27.59a14.19,14.19,0,1,1-14.19-14.19A14.18542,14.18542,0,0,1,276.961,197.497Z" transform="translate(-1.681 0.00003)"/>
</svg>
#SUMM# <span class="CDEK-widget__rub">#RUB#</span>
</p>
</div>
</div>
\ No newline at end of file
<div class="CDEK-widget__delivery-type__item" data-delivery-type = "pvz">
<div class="CDEK-widget__delivery-type__item-title">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 608.99721 611.84603">
<path class="path" d="M515.78535,336.442L609.556,529.07327c3.81317,7.83436-.195,14.2438-8.90811,14.2438H12.35346c-8.713,0-12.72227-6.40938-8.90808-14.2438L97.217,336.442a10.86137,10.86137,0,0,1,8.90808-5.57153h80.40459a11.25693,11.25693,0,0,1,7.44629,3.4251c5.4551,6.30391,11.0117,12.46254,16.55239,18.55849,5.26205,5.78647,10.552,11.64856,15.80011,17.648H130.908a10.85641,10.85641,0,0,0-8.90808,5.57153L59.88013,503.68647H553.11832L491.00357,376.07364a10.85667,10.85667,0,0,0-8.90908-5.57153H386.458c5.24714-5.99941,10.539-11.86153,15.80109-17.648,5.55759-6.11387,11.14506-12.26057,16.6131-18.56645a11.2442,11.2442,0,0,1,7.43335-3.41714h80.57375A10.85489,10.85489,0,0,1,515.78535,336.442ZM444.3625,204.79909c0,105.257-87.626,124.9977-128.83681,226.15a9.851,9.851,0,0,1-18.26991-.03981c-37.17572-91.20135-112.08538-116.211-126.41772-197.45847C156.72663,153.46615,212.10559,75.11644,292.96492,67.47312A137.99029,137.99029,0,0,1,444.3625,204.79909Zm-65.106,0a72.8568,72.8568,0,1,0-72.8568,72.8568A72.85625,72.85625,0,0,0,379.25652,204.79909Z" transform="translate(-2.00187 0.84609)"/>
</svg>
<span>#PICKUP#</span>
</div>
<div class="CDEK-widget__delivery-type__item-details">
<p>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60">
<g>
<path class="path" d="M30,0a0.99909,0.99909,0,0,0-1,1V14.292a1,1,0,0,0,2,0V2.018a27.99965,27.99965,0,1,1-20.834,8.218A0.99985,0.99985,0,0,0,8.75,8.824,29.99976,29.99976,0,1,0,30,0Z" transform="translate(0 0.00003)"/>
<path class="path" d="M28.555,33.532a3.56312,3.56312,0,1,0,4.975-4.979L20.586,19.19a1.00069,1.00069,0,0,0-1.397,1.397Z" transform="translate(0 0.00003)"/>
</g>
</svg>
#TIME# #DAY#
</p>
<p>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 331.51501 334.87601">
<path class="path" d="M333.196,155.999H317.129V82.09a32.17007,32.17007,0,0,0-32.134-32.134H263.234L240.965,9.917a19.28,19.28,0,0,0-26.222-7.488L129.279,49.955H33.815A32.17007,32.17007,0,0,0,1.681,82.089V302.742a32.17008,32.17008,0,0,0,32.134,32.134h251.18a32.17008,32.17008,0,0,0,32.134-32.134V237.94h16.067V155.999h0Zm-48.201-93.19a19.24277,19.24277,0,0,1,19.068,17.14H279.911l-9.525-17.14h14.609ZM220.996,13.663a6.54816,6.54816,0,0,1,8.734,2.494l35.476,63.786H101.798Zm83.279,289.079a19.30487,19.30487,0,0,1-19.281,19.281H33.815a19.30487,19.30487,0,0,1-19.281-19.281V82.09A19.30487,19.30487,0,0,1,33.815,62.809h72.353L75.345,79.95H37.832a6.427,6.427,0,0,0,0,12.854H304.275v63.201H257.276a39.63892,39.63892,0,0,0-39.589,39.589v2.764a39.63891,39.63891,0,0,0,39.589,39.589h46.999v64.795h0Zm16.067-77.655H257.276a26.76471,26.76471,0,0,1-26.736-26.736v-2.764a26.76471,26.76471,0,0,1,26.736-26.736h63.066v56.236Zm-43.381-27.59a14.19,14.19,0,1,1-14.19-14.19A14.18542,14.18542,0,0,1,276.961,197.497Z" transform="translate(-1.681 0.00003)"/>
</svg>
#SUMM# <span class="CDEK-widget__rub">#RUB#</span>
</p>
</div>
</div>
\ No newline at end of file
<div class="CDEK-widget__delivery-type__item" data-delivery-type = "post">
<div class="CDEK-widget__delivery-type__item-title">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 608.99721 611.84603">
<g>
<path class="path" d="M583.48644,1.00006H333.42136V278.85179H611.27187V28.78547A27.78592,27.78592,0,0,0,583.48644,1.00006ZM440.37361,85.39856a23.15306,23.15306,0,1,1,18.19131,27.22786A23.15377,23.15377,0,0,1,440.37361,85.39856Zm87.54323,119.35919H398.25316V149.18813H527.91684v55.56962Z" transform="translate(-0.00001 -1.00006)"/>
<path class="path" d="M55.56963,334.42141H0V584.48774a27.78565,27.78565,0,0,0,27.78541,27.78418h250.0663V334.42141H55.56963ZM125.4755,400.2955a23.15306,23.15306,0,1,1,18.19131,27.22786A23.15373,23.15373,0,0,1,125.4755,400.2955ZM213.0187,519.6547H83.355V464.08509H213.01871V519.6547h0Z" transform="translate(-0.00001 -1.00006)"/>
<path class="path" d="M27.78542,1.00006A27.7859,27.7859,0,0,0,0,28.78547v250.0663H277.85174V1.00006H27.78542Zm97.69008,84.3985a23.15306,23.15306,0,1,1,18.19131,27.22786A23.15376,23.15376,0,0,1,125.4755,85.39856Zm87.5432,119.35919H83.355V149.18813H213.01871v55.56962h0Z" transform="translate(-0.00001 -1.00006)"/>
<path class="path" d="M583.48644,334.42141H333.42136V612.27192H583.48768a27.78567,27.78567,0,0,0,27.78418-27.78542V334.42141H583.48644ZM440.37361,400.2955a23.15307,23.15307,0,1,1,18.19131,27.22786A23.15375,23.15375,0,0,1,440.37361,400.2955ZM527.91684,519.6547H398.25316V464.08509H527.91684V519.6547Z" transform="translate(-0.00001 -1.00006)"/>
</g>
</svg>
<span>Постоматы</span>
</div>
<div class="CDEK-widget__delivery-type__item-details">
<p>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60">
<g>
<path class="path" d="M30,0a0.99909,0.99909,0,0,0-1,1V14.292a1,1,0,0,0,2,0V2.018a27.99965,27.99965,0,1,1-20.834,8.218A0.99985,0.99985,0,0,0,8.75,8.824,29.99976,29.99976,0,1,0,30,0Z" transform="translate(0 0.00003)"/>
<path class="path" d="M28.555,33.532a3.56312,3.56312,0,1,0,4.975-4.979L20.586,19.19a1.00069,1.00069,0,0,0-1.397,1.397Z" transform="translate(0 0.00003)"/>
</g>
</svg>
5-6 дней
</p>
<p>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 331.51501 334.87601">
<path class="path" d="M333.196,155.999H317.129V82.09a32.17007,32.17007,0,0,0-32.134-32.134H263.234L240.965,9.917a19.28,19.28,0,0,0-26.222-7.488L129.279,49.955H33.815A32.17007,32.17007,0,0,0,1.681,82.089V302.742a32.17008,32.17008,0,0,0,32.134,32.134h251.18a32.17008,32.17008,0,0,0,32.134-32.134V237.94h16.067V155.999h0Zm-48.201-93.19a19.24277,19.24277,0,0,1,19.068,17.14H279.911l-9.525-17.14h14.609ZM220.996,13.663a6.54816,6.54816,0,0,1,8.734,2.494l35.476,63.786H101.798Zm83.279,289.079a19.30487,19.30487,0,0,1-19.281,19.281H33.815a19.30487,19.30487,0,0,1-19.281-19.281V82.09A19.30487,19.30487,0,0,1,33.815,62.809h72.353L75.345,79.95H37.832a6.427,6.427,0,0,0,0,12.854H304.275v63.201H257.276a39.63892,39.63892,0,0,0-39.589,39.589v2.764a39.63891,39.63891,0,0,0,39.589,39.589h46.999v64.795h0Zm16.067-77.655H257.276a26.76471,26.76471,0,0,1-26.736-26.736v-2.764a26.76471,26.76471,0,0,1,26.736-26.736h63.066v56.236Zm-43.381-27.59a14.19,14.19,0,1,1-14.19-14.19A14.18542,14.18542,0,0,1,276.961,197.497Z" transform="translate(-1.681 0.00003)"/>
</svg>
230 <span class="CDEK-widget__rub">p</span>.
</p>
</div>
</div>
\ No newline at end of file
<button class="CDEK-widget__delivery-type__button ">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 608.99721 611.84603">
<g>
<path class="CDEK-widget__delivery_courier" d="M417.19812,302.72005a22.21621,22.21621,0,0,0-21.362-20.04709l-72.26781-1.108a9.97688,9.97688,0,0,1-9.10476-7.907L298.5408,172.42893c-0.57712-3.667-3.99636-18.61788-22.66187-18.61788L186.01,157.72438c-11.83932.51451-21.464,6.27084-21.464,22.42639,0,0-.3784,224.99753-0.83847,233.15088l-3.14426,55.66853a91.98249,91.98249,0,0,1-6.32529,26.27846l-36.3755,82.33218a18.97718,18.97718,0,0,0,13.0671,26.65825l12.1102,3.00544a23.2673,23.2673,0,0,0,5.60523.67377c9.77581,0,19.127-5.67329,23.27031-14.11791l34.57743-70.4806a171.14444,171.14444,0,0,0,10.59795-29.41047l19.5108-81.27592,47.2171,72.20793c3.8929,5.95368,8.009,17.37786,8.808,24.4477l9.1279,80.84172a24.0889,24.0889,0,0,0,23.36287,20.86923l13.81027-.04765a20.1837,20.1837,0,0,0,20.24446-22.42911l-9.53353-96.11388a139.95253,139.95253,0,0,0-7.24815-30.64368L300.08163,351.25756l-0.26134-23.29618,98.33117-3.63972a19.785,19.785,0,0,0,19.063-21.41777Zm-92.0808,301.47133h0v0Z" transform="translate(-2.00187 0.84609)"/>
<path class="CDEK-widget__delivery_courier" d="M214.73855,132.44774a66.665,66.665,0,0,0,66.24334-73.88758l22.33112-2.5195c7.78172-.87795,15.68051-7.08481,18.37287-14.43777L329.16542,21.176A13.0559,13.0559,0,0,0,328.0098,9.059a12.51735,12.51735,0,0,0-10.50812-5.1193c-0.51043,0-1.03856.0245-1.58029,0.07622l-64.57048,6.14153A66.62573,66.62573,0,1,0,214.73855,132.44774Z" transform="translate(-2.00187 0.84609)"/>
<path class="CDEK-widget__delivery_courier" d="M496.86108,236.73808l-6.42465-92.34484a21.71437,21.71437,0,0,0-21.3579-19.88784l-123.44178.21506A19.38181,19.38181,0,0,0,326.194,145.60194l6.42465,92.34484a21.70638,21.70638,0,0,0,21.32113,19.88785l123.47854-.21507A19.37986,19.37986,0,0,0,496.86108,236.73808ZM353.93843,251.02748h0Z" transform="translate(-2.00187 0.84609)"/>
</g>
<path class="CDEK-widget__delivery_pvz" d="M515.78535,336.442L609.556,529.07327c3.81317,7.83436-.195,14.2438-8.90811,14.2438H12.35346c-8.713,0-12.72227-6.40938-8.90808-14.2438L97.217,336.442a10.86137,10.86137,0,0,1,8.90808-5.57153h80.40459a11.25693,11.25693,0,0,1,7.44629,3.4251c5.4551,6.30391,11.0117,12.46254,16.55239,18.55849,5.26205,5.78647,10.552,11.64856,15.80011,17.648H130.908a10.85641,10.85641,0,0,0-8.90808,5.57153L59.88013,503.68647H553.11832L491.00357,376.07364a10.85667,10.85667,0,0,0-8.90908-5.57153H386.458c5.24714-5.99941,10.539-11.86153,15.80109-17.648,5.55759-6.11387,11.14506-12.26057,16.6131-18.56645a11.2442,11.2442,0,0,1,7.43335-3.41714h80.57375A10.85489,10.85489,0,0,1,515.78535,336.442ZM444.3625,204.79909c0,105.257-87.626,124.9977-128.83681,226.15a9.851,9.851,0,0,1-18.26991-.03981c-37.17572-91.20135-112.08538-116.211-126.41772-197.45847C156.72663,153.46615,212.10559,75.11644,292.96492,67.47312A137.99029,137.99029,0,0,1,444.3625,204.79909Zm-65.106,0a72.8568,72.8568,0,1,0-72.8568,72.8568A72.85625,72.85625,0,0,0,379.25652,204.79909Z" transform="translate(-2.00187 0.84609)"/>
<!-- <path class="CDEK-widget__delivery_box" d="M2.65884,483.52043L2.00192,205.83482a19.01632,19.01632,0,0,1,26.49046-17.53019L281.28291,296.368a19.0146,19.0146,0,0,1,11.541,17.43932l0.65691,277.68561a19.01643,19.01643,0,0,1-26.49046,17.53118L14.19987,500.96076A19.01337,19.01337,0,0,1,2.65884,483.52043ZM581.8529,218.90533l-233.27959,101.03,0.607,256.98364L582.46091,475.889l-0.608-256.98365m9.4395-33.50094a19.03627,19.03627,0,0,1,19.04968,18.99079L610.999,482.08078A19.01452,19.01452,0,0,1,599.53983,499.575L347.26446,608.83345a18.97537,18.97537,0,0,1-26.57333-17.40334L320.03422,313.7435a19.01226,19.01226,0,0,1,11.46017-17.49426L583.76973,186.99181a18.96546,18.96546,0,0,1,7.52267-1.58742h0ZM304.6555,28.99646L62.66821,137.04388l242.49546,106.8993L547.15193,135.89676,304.6555,28.99646M304.58661-.42119a19.0199,19.0199,0,0,1,7.71532,1.61535L578.26779,118.44046c15.0872,6.65207,15.13814,28.04191.08184,34.76386L312.94086,271.70855a19.01736,19.01736,0,0,1-15.42366.03693L31.55236,154.4992c-15.0882-6.65107-15.13812-28.04191-.08286-34.76386L296.87727,1.2311a19.00856,19.00856,0,0,1,7.70934-1.65228h0Z" transform="translate(-2.00187 0.84609)"/>
<g>
<path class="CDEK-widget__delivery_post" d="M583.48644,1.00006H333.42136V278.85179H611.27187V28.78547A27.78592,27.78592,0,0,0,583.48644,1.00006ZM440.37361,85.39856a23.15306,23.15306,0,1,1,18.19131,27.22786A23.15377,23.15377,0,0,1,440.37361,85.39856Zm87.54323,119.35919H398.25316V149.18813H527.91684v55.56962Z" transform="translate(-0.00001 -1.00006)"/>
<path class="CDEK-widget__delivery_post" d="M55.56963,334.42141H0V584.48774a27.78565,27.78565,0,0,0,27.78541,27.78418h250.0663V334.42141H55.56963ZM125.4755,400.2955a23.15306,23.15306,0,1,1,18.19131,27.22786A23.15373,23.15373,0,0,1,125.4755,400.2955ZM213.0187,519.6547H83.355V464.08509H213.01871V519.6547h0Z" transform="translate(-0.00001 -1.00006)"/>
<path class="CDEK-widget__delivery_post" d="M27.78542,1.00006A27.7859,27.7859,0,0,0,0,28.78547v250.0663H277.85174V1.00006H27.78542Zm97.69008,84.3985a23.15306,23.15306,0,1,1,18.19131,27.22786A23.15376,23.15376,0,0,1,125.4755,85.39856Zm87.5432,119.35919H83.355V149.18813H213.01871v55.56962h0Z" transform="translate(-0.00001 -1.00006)"/>
<path class="CDEK-widget__delivery_post" d="M583.48644,334.42141H333.42136V612.27192H583.48768a27.78567,27.78567,0,0,0,27.78418-27.78542V334.42141H583.48644ZM440.37361,400.2955a23.15307,23.15307,0,1,1,18.19131,27.22786A23.15375,23.15375,0,0,1,440.37361,400.2955ZM527.91684,519.6547H398.25316V464.08509H527.91684V519.6547Z" transform="translate(-0.00001 -1.00006)"/>
</g> -->
</svg>
</button>
\ No newline at end of file
<div class="CDEK-widget__panel-details__block-img">
<img src="#D_PHOTO#">
</div>
\ No newline at end of file
<div class="CDEK-widget__panel-details__back">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 132.59574 240.822">
<path class="path"
d="M57.633,129.007L165.93,237.268a12.16012,12.16012,0,1,0,17.215-17.179L83.438,120.418l99.695-99.671A12.16436,12.16436,0,0,0,165.918,3.556L57.621,111.816A12.27024,12.27024,0,0,0,57.633,129.007Z"
transform="translate(-54.11325 -0.00098)"/>
</svg>
</div>
<div class="CDEK-widget__panel-headline">
<span>#D_NAME#</span>
</div>
<div class="CDEK-widget__panel-content">
<div class="CDEK-widget__panel-details__block">
<p class="CDEK-widget__panel-details__block-head">#L_ADDRESS#:</p>
<p class="CDEK-widget__panel-details__block-text">#D_ADDR#</p>
</div>
<div class="CDEK-widget__panel-details__block">
<p class="CDEK-widget__panel-details__block-head">#L_TIME#:</p>
<p class="CDEK-widget__panel-details__block-text">#D_TIME#</p>
</div>
<div class="CDEK-widget__panel-details__block CDEK-widget__way">
<p class="CDEK-widget__panel-details__block-head">#L_WAY#:</p>
<p class="CDEK-widget__panel-details__block-text">#D_WAY#</p>
</div>
<div class="CDEK-widget__panel-details__block">
<button class="CDEK-widget__choose" data-label="Выбрать" id="#WID#choose_button">#L_CHOOSE#</button>
</div>
<div class="CDEK-widget__panel-details__block sdek_image_block">
#D_IMGS#
</div>
</div>
<div class="CDEK-widget__panel-headline">
<span>#PVZ#</span>
</div>
<div class="CDEK-widget__panel-content">
</div>
<div class="CDEK-widget__panel-list__item" >
<p class="CDEK-widget__panel-list__item-name">#P_NAME#</p>
<p class="CDEK-widget__panel-list__item-adress">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 38.35102 54.757">
<g>
<path class="svg-line" d="M27.557,12a7,7,0,1,0,7,7A7.009,7.009,0,0,0,27.557,12Zm0,12a5,5,0,1,1,5-5A5.00567,5.00567,0,0,1,27.557,24Z" transform="translate(-8.20255 0.00003)"/>
<path class="svg-line" d="M40.94,5.617a19.1761,19.1761,0,0,0-27.12,0c-6.703,6.702-7.536,19.312-1.804,26.952L27.38,54.757,42.721,32.6C48.476,24.929,47.643,12.319,40.94,5.617Zm0.159,25.814L27.38,51.243,13.639,31.4C8.44,24.468,9.185,13.08,15.235,7.031a17.17592,17.17592,0,0,1,24.291,0C45.576,13.08,46.321,24.468,41.099,31.431Z" transform="translate(-8.20255 0.00003)"/>
</g>
</svg>
#P_ADDR#
</p>
<p class="CDEK-widget__panel-list__item-time">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 612 611.66397">
<g>
<path class="svg-line" d="M587.572,186.881C555.306,111.656,500.476,56.947,424.623,24.596A300.779,300.779,0,0,0,305.497.168,297.66951,297.66951,0,0,0,186.713,24.596C111.488,56.861,56.415,111.535,24.092,186.881a305.7175,305.7175,0,0,0,0,237.91c32.323,75.346,87.403,130.348,162.621,162.621a297.683,297.683,0,0,0,118.784,24.42,300.8816,300.8816,0,0,0,119.12-24.42c75.853-32.352,130.683-87.403,162.956-162.621A301.85183,301.85183,0,0,0,587.572,186.881ZM538.724,440.853c-24.021,41.195-56.929,73.876-98.375,98.039-41.195,24.021-86.332,36.135-134.845,36.135a259.121,259.121,0,0,1-104.4-21.415c-33.129-14.384-61.733-33.294-85.661-57.215C91.515,472.469,72.47,443.586,58.229,410.4c-14.199-33.065-21.08-68.258-21.08-104.735q0-72.78,35.807-134.509c23.971-41.231,56.886-73.947,98.039-98.04q61.719-36.138,134.502-36.142c48.52,0,93.649,12.121,134.845,36.142a269.27676,269.27676,0,0,1,98.375,98.039q36.138,61.7295,36.135,134.509C574.852,354.185,562.888,399.399,538.724,440.853Z" transform="translate(0 -0.16797)"/>
<path class="svg-line" d="M324.906,302.988V129.659c0-10.372-9.037-18.738-19.41-18.738-9.701,0-18.403,8.366-18.403,18.738V305.664a15.29339,15.29339,0,0,1,.671,2.678q-1.00648,9.036,5.019,15.062L392.836,423.45c6.695,6.695,19.073,6.695,25.763,0,7.694-7.695,7.188-18.86,0-26.099Z" transform="translate(0 -0.16797)"/>
</g>
</svg>
#P_TIME#
</p>
</div>
\ No newline at end of file
<div id="#WID#CDEK_popup" class="CDEK-widget__popup-mask" style="display: none">
<div class="CDEK-widget__popup">
<a class="CDEK-widget__popup__close-btn" href="#"></a>
#WIDGET#
</div>
</div>
\ No newline at end of file
<div class="CDEK-widget__sidebar-burger CDEK-widget__sidebar-button" data-hint="#list">
<span></span>
<span></span>
<span></span>
</div>
<div id="#WID#butn_cash" class="CDEK-widget__sidebar-button CDEK-widget__sidebar-button-point" data-hint="#point1" data-mtype="cash">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24.50134 32">
<path class="CDEK-widget__pin_green1" d="M12.5,0A12.32748,12.32748,0,0,0,2.8,19.9L12.5,32V0Z" transform="translate(-0.2 0.00003)"/>
<path class="CDEK-widget__pin_green2" d="M12.5,32l9.6-12.1a12.26828,12.26828,0,0,0,2.6-7.6A12.14339,12.14339,0,0,0,12.5,0V32Z" transform="translate(-0.2 0.00003)"/>
<g>
<path class="CDEK-widget__pin_wight" d="M19.4,5.5a1.26754,1.26754,0,0,0-.9-0.4H6.5a1.22153,1.22153,0,0,0-.9.4,1.48929,1.48929,0,0,0-.4.9v9.2a1.22153,1.22153,0,0,0,.4.9,1.26754,1.26754,0,0,0,.9.4H18.6a1.22154,1.22154,0,0,0,.9-0.4,1.26754,1.26754,0,0,0,.4-0.9V6.4A2.62187,2.62187,0,0,0,19.4,5.5ZM18.8,15.6a0.19962,0.19962,0,0,1-.1.2,0.34914,0.34914,0,0,1-.2.1H6.5a0.19962,0.19962,0,0,1-.2-0.1,0.34914,0.34914,0,0,1-.1-0.2V11H18.8v4.6h0Zm0-7.5H6.2V6.4a0.19962,0.19962,0,0,1,.1-0.2,0.34914,0.34914,0,0,1,.2-0.1H18.6a0.19962,0.19962,0,0,1,.2.1,0.34914,0.34914,0,0,1,.1.2L18.8,8.1h0Z" transform="translate(-0.2 0.00003)"/>
<rect class="CDEK-widget__pin_wight" x="15" y="13.1" width="1.8" height="1.7"/>
</g>
</svg>
</div>
<div id="#WID#butn_dress" class="CDEK-widget__sidebar-button CDEK-widget__sidebar-button-point" data-hint="#point3" data-mtype="dress">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24.50134 32">
<path class="CDEK-widget__pin_green1" d="M12.5,0A12.32748,12.32748,0,0,0,2.8,19.9L12.5,32V0Z" transform="translate(-0.2 0.00003)"/>
<path class="CDEK-widget__pin_green2" d="M12.5,32l9.6-12.1a12.26828,12.26828,0,0,0,2.6-7.6A12.14339,12.14339,0,0,0,12.5,0V32Z" transform="translate(-0.2 0.00003)"/>
<path class="CDEK-widget__pin_wight" d="M21.2,12.6L12.9,8.2V7.6h0a2.4392,2.4392,0,0,0,2.2-2.2,2.21953,2.21953,0,0,0-2.2-2.2,2.17382,2.17382,0,0,0-2.2,1.9V5.2h0a0.4,0.4,0,1,0,.8,0h0a1.143,1.143,0,0,1,.3-0.7A1.60584,1.60584,0,0,1,12.9,4a1.36707,1.36707,0,0,1,1.4,1.4,0.90949,0.90949,0,0,1-.4.8,2.281,2.281,0,0,1-1.2.6L12.1,7V7.1h0v1L3.8,12.5A1.41075,1.41075,0,0,0,3,13.7,1.442,1.442,0,0,0,4.5,15H20.4a1.442,1.442,0,0,0,1.5-1.3A0.97336,0.97336,0,0,0,21.2,12.6Zm-0.7,1.7H4.6a0.682,0.682,0,0,1-.7-0.5,0.54993,0.54993,0,0,1,.3-0.5h0l8.3-4.4,8.3,4.4h0a0.54993,0.54993,0,0,1,.3.5C21.2,14,20.9,14.3,20.5,14.3Z" transform="translate(-0.2 0.00003)"/>
</svg>
</div>
<hr>
<div class="CDEK-widget__sidebar-button CDEK-widget__sidebar-button_phone" data-hint="#contacts">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 444.41148 446.40002">
<path class="phone" d="M374.456,293.506c-9.7-10.1-21.4-15.5-33.8-15.5-12.3,0-24.1,5.3-34.2,15.4l-31.6,31.5c-2.6-1.4-5.2-2.7-7.7-4-3.6-1.8-7-3.5-9.9-5.3-29.6-18.8-56.5-43.3-82.3-75-12.5-15.8-20.9-29.1-27-42.6,8.2-7.5,15.8-15.3,23.2-22.8,2.8-2.8,5.6-5.7,8.4-8.5,21-21,21-48.2,0-69.2l-27.3-27.3c-3.1-3.1-6.3-6.3-9.3-9.5-6-6.2-12.3-12.6-18.8-18.6-9.7-9.6-21.3-14.7-33.5-14.7s-24,5.1-34,14.7l-0.2.2-34,34.3a73.16053,73.16053,0,0,0-21.7,46.5c-2.4,29.2,6.2,56.4,12.8,74.2,16.2,43.7,40.4,84.2,76.5,127.6,43.8,52.3,96.5,93.6,156.7,122.7,23,10.9,53.7,23.8,88,26,2.1,0.1,4.3.2,6.3,0.2,23.1,0,42.5-8.3,57.7-24.8,0.1-.2.3-0.3,0.4-0.5,5.2-6.3,11.2-12,17.5-18.1,4.3-4.1,8.7-8.4,13-12.9,9.9-10.3,15.1-22.3,15.1-34.6,0-12.4-5.3-24.3-15.4-34.3Zm35.8,105.3c-0.1,0-.1.1,0,0-3.9,4.2-7.9,8-12.2,12.2a262.94685,262.94685,0,0,0-19.3,20c-10.1,10.8-22,15.9-37.6,15.9-1.5,0-3.1,0-4.6-.1-29.7-1.9-57.3-13.5-78-23.4-56.6-27.4-106.3-66.3-147.6-115.6-34.1-41.1-56.9-79.1-72-119.9-9.3-24.9-12.7-44.3-11.2-62.6a45.90488,45.90488,0,0,1,13.8-29.7l34.1-34.1c4.9-4.6,10.1-7.1,15.2-7.1,6.3,0,11.4,3.8,14.6,7l0.3,0.3c6.1,5.7,11.9,11.6,18,17.9,3.1,3.2,6.3,6.4,9.5,9.7l27.3,27.3c10.6,10.6,10.6,20.4,0,31-2.9,2.9-5.7,5.8-8.6,8.6-8.4,8.6-16.4,16.6-25.1,24.4a2.35721,2.35721,0,0,0-.5.5c-8.6,8.6-7,17-5.2,22.7l0.3,0.9c7.1,17.2,17.1,33.4,32.3,52.7l0.1,0.1c27.6,34,56.7,60.5,88.8,80.8a136.53623,136.53623,0,0,0,12.3,6.7c3.6,1.8,7,3.5,9.9,5.3,0.4,0.2.8,0.5,1.2,0.7a21.67755,21.67755,0,0,0,9.9,2.5c8.3,0,13.5-5.2,15.2-6.9l34.2-34.2c3.4-3.4,8.8-7.5,15.1-7.5,6.2,0,11.3,3.9,14.4,7.3l0.2,0.2,55.1,55.1C420.456,377.706,420.456,388.206,410.256,398.806Z" transform="translate(-0.34447 -27.40598)"/>
</svg>
</div>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
name: commerce cdek shipping method
type: module
package: Custom
core: 8.x
dependencies:
- commerce_shipping
\ No newline at end of file
widget:
version: VERSION
js:
assets/widget/widjet.js: {}
assets/js/main.js: {}
dependencies:
- core/jquery
- views_infinite_scroll/views-infinite-scroll
\ No newline at end of file
commerce_cdek.config:
title: 'Cdek config'
route_name: commerce_cdek.config
parent: system.admin_config_system
weight: 99
\ No newline at end of file
commerce_cdek.service:
path: '/cdek_service'
methods: [GET]
defaults:
_controller: '\Drupal\commerce_cdek\Controller\CdekService::index'
requirements:
_access: 'TRUE'
commerce_cdek.template:
path: '/cdek_template'
methods: [GET]
defaults:
_controller: '\Drupal\commerce_cdek\Controller\CdekService::template'
requirements:
_access: 'TRUE'
commerce_cdek.config:
path: '/admin/commerce_cdek/config'
defaults:
_form: '\Drupal\commerce_cdek\Form\Config'
_title: 'Cdek Config'
requirements:
_permission: 'access administration pages'
options:
_admin_route: TRUE
\ No newline at end of file
services:
commerce_cdek.address_event_subscriber:
class: Drupal\commerce_cdek\EventSubscriber\AddressEventSubscriber
tags:
- { name: event_subscriber }
commerce_cdek.order_shipment_summary:
class: Drupal\commerce_cdek\OrderShipmentSummary
arguments: ['@entity_type.manager']
\ No newline at end of file
This diff is collapsed.
<?php namespace Drupal\commerce_cdek\EventSubscriber;
use Drupal\address\Event\AddressEvents;
use Drupal\address\Event\AddressFormatEvent;
use Drupal\address\Event\SubdivisionsEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class AddressEventSubscriber implements EventSubscriberInterface {
public static function getSubscribedEvents() {
$events[AddressEvents::ADDRESS_FORMAT][] = array('onGetDefinition', 0);
return $events;
}
public function onGetDefinition($event) {
$definition = $event->getDefinition();
$definition['required_fields'] = [];
$event->setDefinition($definition);
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment