Skip to content

Instantly share code, notes, and snippets.

@DxDiagDx
Last active October 19, 2022 05:27
Show Gist options
  • Save DxDiagDx/bd97f36054bbb71dee89818d4308a5a6 to your computer and use it in GitHub Desktop.
Save DxDiagDx/bd97f36054bbb71dee89818d4308a5a6 to your computer and use it in GitHub Desktop.
СДЭК: вставить карту пунктов самовывоза
add_action( 'wp_head', 'sdek_script' );
function sdek_script() {
?>
<script id="ISDEKscript" type="text/javascript" src="https://widget.cdek.ru/widget/widjet.js" charset="utf-8"></script>
<?php
}
<script type="text/javascript">
var ourWidjet = new ISDEKWidjet ({
defaultCity: 'Москва', //какой город отображается по умолчанию
cityFrom: 'Москва', // из какого города будет идти доставка
country: 'Россия',
link: 'forpvz',
path: 'https://widget.cdek.ru/widget/scripts/',
servicepath: 'https://мойсайт.ru/cdek/service.php',
hidedelt: true // скрыть расчёт стоимости
});
</script>
<div id="forpvz" style="width:100%; height:600px;"></div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment