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
if($modx->event->name != 'msOnCreateOrder') return; | |
$token = $modx->getOption('mstelegram_token', null, false); | |
$recipients = explode(',', $modx->getOption('mstelegram_recipients', null, '')); | |
$contacts = $modx->getObject('msOrderAddress', array('id'=> $msOrder->address)); | |
$_products = $msOrder->getMany('Products'); | |
$delivery = $msOrder->getOne('Delivery'); | |
$payment = $msOrder->getOne('Payment'); |
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
<?php | |
$parent = 12791; | |
$parents = array_merge([$parent], $modx->getChildIds($parent, 10, ['context' => 'web'])); | |
$template = [28]; | |
$pdo = $modx->getService('pdoFetch'); | |
$results = $pdo->getCollection('msProduct', [], [ | |
'leftJoin' => [ | |
'msProductData' => [ | |
'class' => 'msProductData', |
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
<?php | |
define('MODX_API_MODE', true); | |
/** @noinspection PhpIncludeInspection */ | |
require dirname(dirname(dirname(dirname(__FILE__)))) . '/index.php'; | |
$emailTo = $modx->getOption('notice_emailTo'); | |
$notice_period = $modx->getOption('notice_def'); | |
if (!$emailTo || !$notice_period) return; | |
$notice_period = $notice_period * 60; |
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
<?php | |
$res = array(); | |
$q = $modx->newQuery('modTemplateVarResource', array('tmplvarid' => $tv_id)); | |
$template_id = 28; | |
$template_id = explode(',',$template_id); | |
$q->innerJoin('modResource', 'modResource', "modResource.id = modTemplateVarResource.contentid"); | |
$q->select('contentid,value,modResource.template'); | |
$q->where(array( | |
'modResource.template:IN' => $template_id, | |
'modResource.published' => 1, |
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
<?php | |
define(PICTURE_UPLOAD_PATH, MODX_ASSETS_PATH . 'images/vhodnye/'); | |
$mes = array(); | |
$bravo = $modx->getService('bravo', 'bravo', MODX_CORE_PATH.'components/bravo/'); | |
$data = $bravo->getImport(); //Весь каталог | |
$products = $bravo->getProducts($data); //Все товары с Браво | |
$colors = $bravo->getIdsColors($data); //Все цвета с Браво | |
$categories = $bravo->getCategoriesIds(); //Список категорий | |
$siteProducts = $bravo->getSiteProductsBravo([28]); //Все товары входных дверей с сайта |
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
<?php | |
//СОЗДАНИЕ ИЛИ ОБНОВЛЕНИЕ ГРУПП | |
$groups = array( | |
array('id' => 1,'sortorder' => 1,'label' => 'Общие'), | |
array('id' => 2,'sortorder' => 2,'label' => 'Почта'), | |
array('id' => 3,'sortorder' => 3,'label' => 'Политика и куки'), | |
array('id' => 4,'sortorder' => 4,'label' => 'Социальные сети'), | |
); | |
foreach ($groups as $group) |
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
<?php | |
require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/config.core.php'; | |
require_once MODX_CORE_PATH . 'model/modx/modx.class.php'; | |
$modx = new modX(); | |
$modx->initialize('web'); | |
$modx->getService('error', 'error.modError', '', ''); | |
$path = MODX_CORE_PATH.'components/ajax/processors/web/'; |
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
<?php | |
class mcrm { | |
public $baseUrl = "******"; | |
public $resto_key = "****"; | |
function __construct(modX &$modx, array $config = array()) | |
{ | |
$this->modx =& $modx; |
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
<?php | |
$id = $resource->get('id'); | |
$currentRes = $modx->getObject('modResource', $id); | |
$template = $currentRes->get('template'); | |
//Шаблон товара "Кухня" | |
if ($template == 13) { | |
$cg = 'k_color_groups'; | |
$sg = 'k_style_groups'; | |
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
<?php | |
require_once MODX_ASSETS_PATH . 'ArrayToXML.php'; | |
$feeds = $developer = $complexes = $sales_info = array(); | |
$site_url = $modx->getOption('site_url'); | |
//Информация о застройщике | |
$developer['id'] = $developer_id; | |
$developer['name'] = $developer_name; | |
$developer['phone'] = $developer_phone; |
NewerOlder