Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

Fixed product attributes component - only one attribute from each group is displayed

givanz79aba6c7c732
diff --git a/app/component/product/attributes.php b/app/component/product/attributes.php
index 69f222e..b0f0c45 100644
--- a/app/component/product/attributes.php
+++ b/app/component/product/attributes.php
@@ -29,7 +29,7 @@ use Vvveb\System\Event;
class Attributes extends ComponentBase {
public static $defaultOptions = [
'start' => 0,
- 'limit' => 7,
+ 'limit' => 100,
'site_id' => NULL,
'language_id' => NULL,
'product_id' => 'url',
@@ -43,17 +43,7 @@ class Attributes extends ComponentBase {
$attributes = [];
$group = false;
- if ($results['attribute']) {
- foreach ($results['attribute'] as $data) {
- if ($group != $data['group']) {
- $group = $data['group'];
- }
-
- $attributes[$group] = $data;
- }
- }
-
- $results['attribute'] = $attributes;
+ $results['attribute'] = $results['attribute'] ?? [];
list($results) = Event :: trigger(__CLASS__,__FUNCTION__, $results);