Powerful and easy to use cms to build websites, blogs or ecommerce stores.
HTML backendblogblog-engineblog-platformbloggingcmscontent-managementcontent-management-systemecommerceecommerce-platformno-codepage-builderphpphp-cmsphp7php8self-hostedshopping-cartweb-applicationwebsite-builder
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.phpindex 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);