]> _ Git - pmi.git/commitdiff
fix #3091 @0:10
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 30 Sep 2019 16:26:26 +0000 (18:26 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 30 Sep 2019 16:26:26 +0000 (18:26 +0200)
app/Models/Product.php
app/Models/Specification.php

index 1db343e2051292ede65c13983f489698f7cd2abd..2bf747b4cce82c063e2a7776e4d4d8aee028ed04 100644 (file)
@@ -278,9 +278,9 @@ class Product extends CubistMagicPageModel
             }
 
             $specValue = ' - ';
-            if ($specEntity->type == 'numeric' || $specEntity->type == 'numeric_list') {
+            if ($specEntity->type === 'numeric' || $specEntity->type === 'numeric_list') {
                 $specValue = $specEntity->prefix;
-                if ($specEntity->type == 'numeric_list' && is_array($val)) {
+                if ($specEntity->type === 'numeric_list' && is_array($val)) {
                     $specValue .= ' ' . implode(' ' . $specEntity->separator . ' ', $val);
                 } else {
                     if (is_array($val)) {
@@ -289,14 +289,14 @@ class Product extends CubistMagicPageModel
                     $specValue = $val;
                 }
                 $specValue .= ' ' . $specEntity->unit;
-            } else if ($specEntity->type == 'text') {
+            } else if ($specEntity->type === 'text') {
                 $specValue = trim($val);
-            } else if ($specEntity->type == 'range') {
+            } else if ($specEntity->type === 'range') {
                 if (!isset($val['first']) || !isset($val['second']) || (!$val['first'] && !$val['second'])) {
                     continue;
                 }
                 $specValue = $val['first'] . ' ' . __('à') . ' ' . $val['second'] . ' ' . $specEntity->unit;
-            } else if ($specEntity->type == 'list') {
+            } else if ($specEntity->type === 'list') {
                 if (is_array($val)) {
                     continue;
                 }
index 0ba3d1635f7415c58357cad27fae847f479efc13..bca4d59a5cc85a2b9fcfa6c02c2f79c0ae214161 100644 (file)
@@ -3,9 +3,9 @@
 
 namespace App\Models;
 
-use Cubist\Backpack\app\Magic\Models\CubistMagicAbstractModel;
+use Cubist\Backpack\app\Magic\Models\CubistMagicTranslatableModel;
 
-class Specification extends CubistMagicAbstractModel
+class Specification extends CubistMagicTranslatableModel
 {
     protected $table = 'catalog_specifications';