Skip to content

Commit

Permalink
Несколько правок к #742
Browse files Browse the repository at this point in the history
  • Loading branch information
biz87 committed Dec 18, 2022
1 parent ecbf8ac commit 90d9594
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
$rows = $pdoFetch->run();

// Process rows
$output = array();
$output = $additionalPlaceholders = array();
if (!empty($rows) && is_array($rows)) {
$c = $modx->newQuery('modPluginEvent', array('event:IN' => array('msOnGetProductPrice', 'msOnGetProductWeight', 'msOnGetProductFields')));
$c->innerJoin('modPlugin', 'modPlugin', 'modPlugin.id = modPluginEvent.pluginid');
Expand All @@ -206,11 +206,10 @@

// Adding extra parameters into special place so we can put them in a results
/** @var modSnippet $snippet */
$additionalPlaceholders = $properties = [];
$properties = [];
if (isset($this) && $this instanceof modSnippet && $this->get('properties')) {
$properties = $this->get('properties');
}
elseif ($snippet = $modx->getObject('modSnippet', ['name' => 'msProduct'])) {
} elseif ($snippet = $modx->getObject('modSnippet', ['name' => 'msProduct'])) {
$properties = $snippet->get('properties');
}
if (!empty($properties)) {
Expand All @@ -220,8 +219,6 @@
}
}
}


$opt_time = 0;
foreach ($rows as $k => $row) {
if ($modifications) {
Expand Down

0 comments on commit 90d9594

Please sign in to comment.