This file contains hidden or 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
Выводим в шаблоне категории список товаров так: | |
[[!pdoPage? | |
&element=`msProducts` | |
&loadModels=`gallery` | |
&leftJoin=`{ | |
"360x270": {"class":"msProductFile","alias":"360x270", "on": "360x270.product_id = msProduct.id AND 360x270.path LIKE '%/360x270/' AND 360x270.rank=0"} | |
,"360x270x1": {"class":"msProductFile","alias":"360x270x1", "on": "360x270x1.product_id = msProduct.id AND 360x270x1.path LIKE '%/360x270/' AND 360x270x1.rank=1"} | |
}` | |
&select=`{ |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="de"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1" /> | |
<title>.</title> | |
<style> | |
.grecaptcha-badge { | |
display: none !important; | |
visibility: hidden !important; |
This file contains hidden or 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
$('button#cart_add').click(function(e){ // не забудьте изменить селектор | |
// Добавляем товары в корзину | |
var products = []; | |
$('input[name="price"]:checked').each(function () { | |
var product = {}; | |
product['id'] = $(this).data('dop'); | |
product['count'] = $(this).parents('.tm-dop').find('input.number-input').val(); | |
products.push(product); | |
}); | |
// Добавляем услуги в корзину |
This file contains hidden or 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
<?php | |
$context = $modx->context->get('key'); | |
if ($context == 'mgr' || empty($_POST['quick_order']) || empty($_POST['id']) || empty($_POST['customer'])) { | |
return; | |
} | |
/** | |
* @var miniShop2 $miniShop2 | |
*/ | |
$miniShop2 = $modx->getService('minishop2'); | |
$miniShop2->initialize($context, array( |
This file contains hidden or 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
var loadedMetrica = false; | |
window.addEventListener('scroll', loadMetrica); | |
window.addEventListener('click', loadMetrica); | |
window.addEventListener('mousemove', loadMetrica); | |
function loadMetrica() { | |
if (!loadedMetrica) { | |
setTimeout(function() { | |
/* ТУТ ВАШ КОД И СКРИПТЫ, метрика например*/ | |
},500); | |
} |
This file contains hidden or 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
/* Плагин с событием на OnBeforeCommentSave | |
https://modx.pro/help/4370 | |
https://bezumkin.ru/sections/522/1540/ */ | |
if ($modx->event->name == 'OnBeforeCommentSave') { | |
if(!empty($_POST['my_property_prop'])){ | |
$properties = array( | |
'my_property' => $modx->stripTags($_POST['my_property_prop']) | |
); | |
} else { |
This file contains hidden or 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
$('button#cart_add').click(function(e){ // не забудьте изменить селектор | |
// Добавляем товары в корзину | |
var products = []; | |
$('input[name="price"]:checked').each(function () { | |
var product = {}; | |
product['id'] = $(this).data('dop'); | |
product['count'] = $(this).parents('.tm-dop').find('input.number-input').val(); | |
products.push(product); | |
}); | |
// Добавляем услуги в корзину |
This file contains hidden or 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
<?php | |
//настройки для коннекта к portobello.ru | |
$portobelloUrlTree = 'https://portobello.ru/export/new-products.xml'; //весь каталог товаров | |
$portobelloUrlStock = 'https://portobello.ru/export/new-products-quantity.xml'; //наличие товаров | |
//настройки для парсинга и установки шаблонов для создаваемых продуктов | |
$fileProductGroups = dirname(__FILE__).'/portobello_groups.txt'; | |
$fileCatExist = dirname(__FILE__).'/portobello_category_exist.txt'; | |
//настройки для обработки товаров |
OlderNewer