Skip to content

Commit

Permalink
Не выводить tplOuter, если все опции пропускаются при hideEmpty=1
Browse files Browse the repository at this point in the history
  • Loading branch information
argnist committed Jul 6, 2015
1 parent a76579b commit dc0c613
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion _build/build.config.php
Expand Up @@ -5,7 +5,7 @@
define('PKG_NAME_LOWER', strtolower(PKG_NAME));

define('PKG_VERSION', '2.2.0');
define('PKG_RELEASE', 'beta3');
define('PKG_RELEASE', 'beta4');
define('PKG_AUTO_INSTALL', true);

/* define paths */
Expand Down
6 changes: 6 additions & 0 deletions core/components/minishop2/docs/changelog.txt
@@ -1,5 +1,11 @@
Changelog for miniShop2.

2.2.0 beta4
==============
- Category pagination fix.
- Fixed bug removal options when modifying and generating images of products
- Don't display tplOuter when all options are empty with hideEmpty=1

2.2.0 beta3
==============
- Measure units for options.
Expand Down
Expand Up @@ -31,8 +31,8 @@
$groups = array(0);
}

if(count($optionKeys) > 0){
$rows = array();
$rows = array();
if(count($optionKeys) > 0) {
foreach ($optionKeys as $key) {
if (in_array($key, $ignoreOptions)) continue;
$productOption = array();
Expand Down Expand Up @@ -63,8 +63,10 @@

$rows[] = $pdoFetch->getChunk($tplRow, array_merge($productData, $productOption));
}
$rows = implode($outputSeparator, $rows);
}

if (count($rows) > 0) {
$rows = implode($outputSeparator, $rows);
$output = empty($tplOuter)
? $pdoFetch->getChunk('', array_merge($productData, array('rows' => $rows)))
: $pdoFetch->getChunk($tplOuter, array_merge($scriptProperties, $productData, array('rows' => $rows)));
Expand Down

0 comments on commit dc0c613

Please sign in to comment.