Commit 31fa264144f46073327312c87337708dcdd0c20d
1 parent
a1e889f7
add variantSku
Showing
1 changed file
with
6 additions
and
1 deletions
Show diff stats
models/Product.php
@@ -371,7 +371,12 @@ | @@ -371,7 +371,12 @@ | ||
371 | public function getFullName():string | 371 | public function getFullName():string |
372 | { | 372 | { |
373 | $name = ''; | 373 | $name = ''; |
374 | - $groupName = $this->category->getTaxGroups()->where(['use_in_name'=>1])->joinWith('lang')->one()->lang->title; | 374 | + $groupName = $this->category->getTaxGroups()->where(['use_in_name'=>1])->joinWith('lang')->one(); |
375 | + | ||
376 | + if($groupName != null ){ | ||
377 | + $groupName->lang->title; | ||
378 | + } | ||
379 | + | ||
375 | 380 | ||
376 | if (!empty( $this->category->lang->category_synonym )) { | 381 | if (!empty( $this->category->lang->category_synonym )) { |
377 | $name = $name . ($groupName ? $groupName : $this->category->lang->category_synonym) . ' '; | 382 | $name = $name . ($groupName ? $groupName : $this->category->lang->category_synonym) . ' '; |