lvhao 2 дней назад
Родитель
Сommit
6f33d801ec
1 измененных файлов с 21 добавлено и 4 удалено
  1. 21 4
      core/CoreApp/controllers/Beihuogl.php

+ 21 - 4
core/CoreApp/controllers/Beihuogl.php

@@ -1771,10 +1771,27 @@ class Beihuogl extends Start_Controller {
                     $tmp_features = '';
                     $tmp_features = '';
                     $tmp_number='';
                     $tmp_number='';
                     if(!empty($good_info)){
                     if(!empty($good_info)){
-                        $tmp_sku = $good_info['sku'];
-                        $tmp_title = $good_info['title'];
-                        $tmp_features = $good_info['features'];
-                        $tmp_number = str_replace("-","", $good_info['features']);
+                        
+                        if(strpos($tmp_features, "-127-") !== false){
+                                $tmp_features = $good_info['features'];
+                                $tmp_features = str_replace('-195-','-', $tmp_features);
+                                $tmp_features = str_replace('-197-', '-', $tmp_features);
+                                $tmp_features = str_replace('-72-', '-', $tmp_features);
+                                $good_info = $this->goods->find("features' = '".$tmp_features."' ");
+                                if(empty($good_info)){
+                                    $tmp_features = "";
+                                }else{
+                                    $tmp_sku = $good_info['sku'];
+                                    $tmp_title = $good_info['title'];
+                                    $tmp_features = $good_info['features'];
+                                    $tmp_number = str_replace("-","", $good_info['features']);
+                                }
+                        }else{
+                            $tmp_sku = $good_info['sku'];
+                            $tmp_title = $good_info['title'];
+                            $tmp_features = $good_info['features'];
+                            $tmp_number = str_replace("-","", $good_info['features']);
+                        }
                     }
                     }
                     $final_list[] = [
                     $final_list[] = [
                         'sku'=>$tmp_sku,
                         'sku'=>$tmp_sku,