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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE yml_catalog SYSTEM "shops.dtd"> | |
<yml_catalog date="[!mDate? &date=`[*editedon*]`!]"> | |
<shop> | |
<name>[(site_name)]</name> | |
<company>[(site_name)]</company> | |
<url>[(site_url)]</url> | |
<currencies> | |
<currency id="RUR" rate="1"/> | |
</currencies> |
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); | |
include_once("index.php"); | |
$modx->db->connect(); | |
if (empty ($modx->config)){ | |
$modx->getSettings(); | |
} | |
$modx->invokeEvent("OnWebPageInit"); | |
if(!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || (strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) != 'xmlhttprequest')){ | |
$modx->sendRedirect($modx->config['site_url']); |
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
$e = &$modx->Event; | |
if($e->name = 'OnManagerNodePrerender'){ | |
/* Разделы каталога */ | |
if($ph['template'] == '6'){ | |
$ph['icon'] = "<i class='fa fa-table'></i>"; | |
$ph['icon_folder_open'] = "<i class='fa fa-table'></i>"; | |
$ph['icon_folder_close'] = "<i class='fa fa-table'></i>"; | |
$ph['contextmenu'] = array( | |
'header1' => 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
<?php | |
$process = isset($process) ? $process : ''; | |
$mode = isset($mode) ? $mode : ''; | |
switch ($process) { | |
case 'import': | |
//обработчик импорта | |
switch ($mode) { | |
case 'upd': | |
//обновляем ресурс | |
$data['img'] = 'assets/images/products/' . $data['art'] . '/' . $data['art'] . '.jpg'; |
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
var ajax = { | |
post: function(form_wrapper_id,form_id,query_key,success_callback){ | |
//обёртка формы, айди формы, ключ запроса, код на успех | |
$.ajax({ | |
type: 'post', | |
url: '/ajax.php?q=' + query_key, | |
data: $(form_id).serialize(), | |
success:success_callback | |
}); | |
} |
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); | |
include_once("index.php"); | |
$modx->db->connect(); | |
if (empty ($modx->config)){ | |
$modx->getSettings(); | |
} | |
$modx->invokeEvent("OnWebPageInit"); |
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
/** | |
* categoryUpdate | |
* | |
* При сохранении и перемещении товаров обновляет их категорию, для использования в фильтрах | |
* | |
* @category plugins | |
* @internal @events onAfterMoveDocument,OnDocFormSave | |
*/ | |
$e = $modx->Event; |
NewerOlder