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
https://github.com/bezumkin/miniShop2/blob/master/core/components/minishop2/processors/mgr/product/getlist.class.php#L69 | |
// начиная с 68 строки | |
if (!empty($query)) { | |
//if (is_numeric($query)) { | |
// $c->where(array( | |
// 'msProduct.id' => $query, | |
// 'OR:Data.article:=' => $query, | |
// )); | |
//} else { | |
$c->where(array( |
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
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width"> | |
<meta name="format-detection" content="telephone=no"> | |
<meta http-equiv="x-rim-auto-match" content="none"> | |
<base href="{$_modx->config.site_url}" /> | |
{if $_modx->resource.titl} | |
<title>{$_modx->resource.titl| ereplace:'/\"([^\"]*)\"/':'«$1»'}{if $city_name_conjugate} {$city_name_conjugate}{/if}</title> | |
{elseif $_modx->resource.template in [7]} | |
<title>{$_modx->resource.pagetitle| ereplace:'/\"([^\"]*)\"/':'«$1»'}{if $city_name_conjugate} - купить оптом {$city_name_conjugate}{/if}</title> | |
{elseif $_modx->resource.id in [4]} |
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->getPlaceholder('mf2_total') != 0} | |
<div class="row msearch2" id="mse2_mfilter"> | |
<div class="filters"> | |
<form action="[[~[[*id]]]]" method="post" id="mse2_filters"> | |
<div class="left"> | |
[[+mf2_ms|vendor:vendors]] | |
<div class="for_hid"> | |
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
{set $rows = 1 | resource : 'partner' | fromJSON} | |
<div> | |
<ul class="partners"> | |
{foreach $rows as $row index=$idx} | |
<li><a href="{$row.url}"><img src="{$row.image}" alt=""></a>{$idx}</li> | |
{if ($idx+1) % 3 == 0 && count($rows) > $idx+1 } | |
</ul> </div> <div> <ul class="partners"> | |
{/if} | |
{/foreach} | |
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
<script> | |
$(document).ready(function() { | |
AjaxForm.Message.success = function() {}; | |
}); | |
$(document).on('af_complete', function(event,res) { | |
if(res.success) $('.fancybox-close-small').click(); | |
if (res.success) { | |
// показываем сообщение об успехе | |
$.fancybox.close(); |
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('ROOT', MODX_BASE_PATH); | |
define('EX', 'jpg,png,gif,jpeg,doc,xls,zip,pdf'); // Через запятую имена расширений (нижний регистр) | |
$folder=isset($folder) ? $folder : "assets/images/"; // папка назначения стыренного контента | |
if(!is_dir(MODX_BASE_PATH.$folder)) mkdir(MODX_BASE_PATH.$folder); | |
// Функция траслита | |
function rus2translit($string) { | |
$converter = array( | |
'а' => 'a', 'б' => 'b', 'в' => 'v', | |
'г' => 'g', 'д' => 'd', 'е' => 'e', |
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
//там ещё RTE подключается для определенные категорий ресуров) | |
//создаем плагин AceTv, событие на «OnDocFormRender» с кодом: | |
$script = ''; | |
$resource = ($resource instanceof modResource) | |
? | |
$modx->getObject('modResource',$resource->get('id')) | |
: $modx->getObject('modResource',(int)$resource); | |
// ACE |
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
<script type="text/javascript" src="//code.jquery.com/ui/1.9.2/jquery-ui.js"></script> | |
<script type="text/javascript" src="https://github.com/niklasvh/html2canvas/releases/download/v0.5.0-beta4/html2canvas.js"></script> | |
<script type="text/javascript" src="https://cdn.rawgit.com/MrRio/jsPDF/master/dist/jspdf.min.js"></script> | |
<script type='text/javascript'> | |
function demoFromHTML() { | |
var pdf = new jsPDF('p', 'pt', 'letter'); | |
var options = {ignore}{background: '#fff'}{/ignore}; | |
var pdfContainer = $(".pdf"); |
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
{'!pdoMenu' | snippet : [ | |
'parents' => '[[*context_key:is=`web`:then=`1`:else=`[[*context_key:is=`en`:then=`8`]]`]]', | |
'level' => '1', | |
'tplOuter' => '@INLINE <div class="dropdown">{{+wrapper}}</div>', | |
'tpl' => '@INLINE <p><a href="{{+link}}" {{+attributes}}>{{+menutitle}}</a></p>' | |
]} |