Skip to content

Instantly share code, notes, and snippets.

Володя vgrish

Block or report user

Report or block vgrish

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View export_users.php
<?php
$c = $modx->newQuery('modUser');
$c->InnerJoin('modUserProfile', 'Profile');
$c->InnerJoin('msOrder', 'msOrder', 'modUser.id = msOrder.user_id');
$c->InnerJoin('msOrderAddress', 'msOrderAddress','msOrder.address = msOrderAddress.id');
$c->where(array(
'modUser.active' => 1,
));
View console.php
<?php
$step = 1;
if (!isset($_SESSION['Console']['completed'])) {
$_SESSION['console_offset'] = 0;
}
$offset = isset($_SESSION['console_offset']) && $_SESSION['console_offset'] ? $_SESSION['console_offset'] : 0;
$q = $modx->newQuery('modResource');
$q->where(array(
'class_key' => 'msProduct',
View variable.panel.js
Ext.override(Ext.Component, {
findParentByType: function(type){
if (Ext.isFunction(type)){
return this.findParentBy(function(p){
return p instanceof type;
});
} else {
return (Ext.isFunction(Ext.ComponentMgr.types[type]))?
this.findParentByType(Ext.ComponentMgr.types[type]):
null;
View gist:d731c7888e51ace0baa833de0f56e6fe
<?php
/** @var modX $modx */
/** @var array $scriptProperties */
switch ($modx->event->name) {
// расчет стоимости события
case "UserEventsOnBeforeGetOrderCost":
/** @var UserEventsOrderInterface $orderHandler */
$orderHandler = $modx->getOption("order", $scriptProperties);
View transfer.php
<?php
ini_set('display_errors', 1);
ini_set('error_reporting', -1);
define('MODX_API_MODE', true);
$productionConfig = (dirname(dirname(__FILE__))) . '/index.php';
if (file_exists($productionConfig)) {
/** @noinspection PhpIncludeInspection */
require_once $productionConfig;
View mscZone.order.tpl
{var $pls = $_modx->getPlaceholders()}
<form id="msOrder" class="form-horizontal ms2_form msczone-order" method="post">
{var $tmp = ['city','country']}
{foreach $tmp as $field}
<input type="hidden" id="{$field}" name="{$field}" value="{$form[$field]}">
{/foreach}
<input type="hidden" name="msczone_process_blocks" value="{$pls.msczone_processBlocks | htmlentities}">
<input type="hidden" name="msczone_settlement" value="{$order.msczone_settlement}">
View tmp.php
<?php
public function getProductOptions($options = array())
{
$this->modx->lexicon->load('minishop2:product');
if (is_array($options)) {
unset($options['modification']);
unset($options['modifications']);
unset($options['msal']);
View product.set.price.php
<?php
switch ($modx->event->name) {
case 'msopOnModificationSave':
$modification = $modx->getOption('modification', $scriptProperties);
if (!$modification) {
return;
}
/** @var msProduct $product */
View OnDocFormSave.php
<?php
/** @var modX $modx */
/** @var array $scriptProperties */
switch ($modx->event->name) {
case 'OnDocFormSave':
/*
id ресурса откуда копируем
View quickview.methodActions.js
jQuery(document).ready(function ($) {
if (typeof $.fn.quickview.methodActions == 'object') {
$.fn.quickview.methodActions = $.extend(true,
$.fn.quickview.methodActions,
{show: {'custom.callbacks': function () {
$(".slides").responsiveSlides({
auto: true,
pause:true,
You can’t perform that action at this time.