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); | |
require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/config/config.inc.php'; | |
require_once MODX_BASE_PATH . 'index.php'; | |
if (XPDO_CLI_MODE) { | |
$file = @$argv[1]; | |
$fields = @$argv[2]; | |
$update = (bool) !empty($argv[3]); |
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 msczone = { | |
par: {} | |
,setup: function() { | |
msczone.par.spot = '#msczone-spot'; | |
msczone.par.sity = '#msczone-city'; | |
} | |
,initialize: function() { | |
msczone.setup(); | |
// Forms listeners | |
$(document).on('change', 'select[name="options-spot"]', function() { |
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 msczone = { | |
par: {}, | |
setup: function() { | |
msczone.par.spot = '#msczone-spot'; | |
msczone.par.sity = '#msczone-city'; | |
}, | |
initialize: function() { | |
msczone.setup(); | |
// Forms listeners | |
$(document).on('change', 'select[name="options-spot"]', function() { |
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 | |
/* @var array $scriptProperties */ | |
/* @var miniShop2 $miniShop2 */ | |
$miniShop2 = $modx->getService('minishop2'); | |
$miniShop2->initialize($modx->context->key); | |
/** @var msczone $msczone */ | |
if (!$msczone = $modx->getService('msczone', 'msczone', $modx->getOption('msczone_core_path', null, $modx->getOption('core_path') . 'components/msczone/') . 'model/msczone/', $scriptProperties)) { | |
return 'Could not load msczone class!'; | |
} | |
$msczone->initialize($modx->context->key, $scriptProperties); |
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
// скопировать сниппет msOptions | |
// вставить код ниже | |
<?php | |
/* @var array $scriptProperties */ | |
/* @var pdoFetch $pdoFetch */ | |
if (!$modx->loadClass('pdofetch', MODX_CORE_PATH . 'components/pdotools/model/pdotools/', false, true)) {return false;} | |
$pdoFetch = new pdoFetch($modx, $scriptProperties); | |
if (empty($product) && !empty($input)) {$product = $input;} | |
if (empty($selected)) {$selected = '';} |
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
<div class="row ps_subscription"> | |
<div class="span4 col-md-4"> | |
[[+pas_pagetitle]] | |
<p><small>[[+pas_description]]</small></p> | |
</div> | |
<div class="row span8 col-md-8"> | |
<form method="post" class="form-horizontal ps_form"> | |
<input type="hidden" name="id" value="[[+resource_id]]"> | |
<input type="hidden" name="count" value="1"> | |
<input type="hidden" name="options" value="[]"> |
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 | |
/* OnDocFormPrerender */ | |
switch ($modx->event->name) { | |
case 'OnDocFormPrerender': | |
if ($mode !== 'upd') { | |
return ''; | |
} | |
$modx->controller->addHtml('<script type="text/javascript"> | |
Ext.ComponentMgr.onAvailable("minishop2-product-settings-panel", function() { | |
this.on("afterrender", function() { |
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 | |
switch ($modx->event->name) { | |
case 'psOnBeforeOrderSubmit': | |
$payandsee = $modx->getService('payandsee'); | |
$list = $payandsee->ListGet(); | |
$user = $modx->user->id; | |
foreach($list as $key => $subscription) { | |
if ($subscription['pas_price'] != 0) { | |
continue; | |
} |
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 psAccount extends xPDOSimpleObject | |
{ | |
public $_validated = array(); | |
protected $isSetFields = false; | |
protected $closedFields = array('user', 'method', 'identifier', 'balance', 'incoming', 'outcoming', 'active'); |
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 | |
// Add RTE for introtext if richtext option is enabled for the resource | |
// check "OnDocFormRender" event | |
$modx->regClientStartupHTMLBlock('<script>Ext.onReady(function() { | |
if(MODx.loadRTE) MODx.loadRTE("modx-resource-introtext"); | |
});</script>'); |