From 31fa264144f46073327312c87337708dcdd0c20d Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Wed, 30 Nov 2016 19:49:31 +0200 Subject: [PATCH] add variantSku --- models/Product.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/models/Product.php b/models/Product.php index 5a8817d..de8bf22 100755 --- a/models/Product.php +++ b/models/Product.php @@ -371,7 +371,12 @@ public function getFullName():string { $name = ''; - $groupName = $this->category->getTaxGroups()->where(['use_in_name'=>1])->joinWith('lang')->one()->lang->title; + $groupName = $this->category->getTaxGroups()->where(['use_in_name'=>1])->joinWith('lang')->one(); + + if($groupName != null ){ + $groupName->lang->title; + } + if (!empty( $this->category->lang->category_synonym )) { $name = $name . ($groupName ? $groupName : $this->category->lang->category_synonym) . ' '; -- libgit2 0.21.4