|
...
|
...
|
@@ -529,17 +529,17 @@ class UpdateRoute extends Command |
|
|
|
public function updateSeo($project_id){
|
|
|
|
$seoModel = new WebSettingSeo();
|
|
|
|
$seo_info = $seoModel->read(['project_id'=>$project_id]);
|
|
|
|
$prefix = $seo_info['product_category_prefix'] ?? [];
|
|
|
|
$suffix = $seo_info['product_category_suffix'] ?? [];
|
|
|
|
if(!empty($seo_info)){
|
|
|
|
if($seo_info !== false){
|
|
|
|
$prefix = $seo_info['product_category_prefix'] ?? [];
|
|
|
|
$suffix = $seo_info['product_category_suffix'] ?? [];
|
|
|
|
if(!empty($seo_info['product_cate_prefix'])){
|
|
|
|
$prefix[] = ['name'=>$seo_info['product_cate_prefix']];
|
|
|
|
}
|
|
|
|
if(!empty($seo_info['product_cate_suffix'])){
|
|
|
|
$suffix[] = ['name'=>$seo_info['product_cate_suffix']];
|
|
|
|
}
|
|
|
|
$seoModel->edit(['product_category_prefix'=>json_encode($prefix,true),'product_category_suffix'=>json_encode($suffix,true)],['project_id'=>$project_id]);
|
|
|
|
}
|
|
|
|
$seoModel->edit(['product_category_prefix'=>json_encode($prefix,true),'product_category_suffix'=>json_encode($suffix,true)],['project_id'=>$project_id]);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|