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
$id = $modx->resource->id; | |
$tpl = '@INLINE <a href="[[~[[+id]]]]">[[+pagetitle]]</a>'; | |
$pdo = $modx->getService('pdoFetch'); | |
$options = array( | |
'innerJoin' => array( | |
'msCategory' => array('on' => 'msCategoryMember.category_id = msCategory.id') | |
), |
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
$resources = $modx->getCollection('modResource',array('parent' => 22)); | |
foreach ($resources as $res) { | |
$res->set('class_key', msProduct); | |
$res->save(); | |
} |
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
{$publishedon | date : "d M Y" | rus_months} |
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
{set $today_date = '' | date : 'Y-m-d'} | |
{'!pdoResources' | snippet : [ | |
'parents' => 40437, | |
'tplWrapper' => 'wrapper.article.sale', | |
'tpl' => 'row.article.sale', | |
'includeTVs' => 'img_article,date_start,date_finish', | |
'tvPrefix' => '' | |
'where' => [ | |
'date_finish:>' => $today_date, |
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 | |
$pdo = $modx->getService('pdoFetch'); | |
$modx->addPackage('seofilter', $modx->getOption('core_path') . 'components/seofilter/model/'); | |
$id = $modx->resource->id; | |
$seo_id = $modx->getPlaceholder('sf.seo_id'); | |
$tpl = '@INLINE <div class="filter_item filter_logo_item"> | |
<p><img src="{$logo}" alt="" /><span>{$name}</span></p> | |
</div>'; |
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
echo '<pre>';print_r($row);die; |
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
{'!MinifyX' | snippet : [ | |
'minifyCss' => 1, | |
'minifyJs' => 1, | |
'registerCss' => 'placeholder', | |
'registerJs' => 'placeholder', | |
'cssSources' => 'assets/components/dsmcapp/css/pixel.css', | |
'jsSources' => ' | |
assets/components/dsmcapp/js/jquery/dist/jquery.min.js, | |
assets/components/dsmcapp/js/popper.js/dist/umd/popper.min.js, | |
assets/components/dsmcapp/js/bootstrap/dist/js/bootstrap.min.js, |
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
Ext.ux.Ace = Ext.extend(Ext.form.TextField, { | |
growMin : 60, | |
growMax: 1000, | |
mode : 'text', | |
theme : 'textmate', |
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
tinymce.PluginManager.add('showcase', function (editor, url) { | |
// Add a button that opens a window | |
editor.addButton('showcase', { | |
text: 'Вставить витрину товаров', | |
icon: false, | |
onclick: function () { | |
// Open window | |
editor.windowManager.open({ | |
title: 'Параметры витрины товаров', | |
minWidth: 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
<?php | |
$tv_prod_coffee_ids = (explode(',' , $modx->resource->getTVValue('prod_coffee_ids'))); | |
$tv_prod_coffee_sprecial = (explode(',' , $modx->resource->getTVValue('prod_coffee_sprecial'))); | |
$option_coffee_total = explode(',' , $modx->getOption('coffee_total')); | |
$output = $tv_prod_coffee_sprecial | |
? $tv_prod_coffee_sprecial | |
: array_filter(array_unique(array_merge($tv_prod_coffee_ids,$option_coffee_total))); | |
return (implode(',' , $output)); |