|
@@ -76,7 +76,12 @@ class Manage extends Auth
|
|
|
$option = array();
|
|
|
foreach ($sku as $k2 => $v2) {
|
|
|
if ($v2['key'] != -1) {
|
|
|
-
|
|
|
+ $spec = Dever::db('info_spec_value', 'goods')->find(array('id' => array('in', $v2['key'])), array('col' => 'id,info_id,group_concat(value) as name', 'group' => 'info_id'));
|
|
|
+ if ($spec) {
|
|
|
+ $spec['id'] = $v2['id'];
|
|
|
+ $option[] = $spec;
|
|
|
+ }
|
|
|
+
|
|
|
$spec = Dever::db('info_spec_value', 'goods')->select(array('id' => array('in', $v2['key'])));
|
|
|
|
|
|
if ($spec) {
|
|
@@ -88,11 +93,6 @@ class Manage extends Auth
|
|
|
$spec_value['name'] = implode(',', $spec_name);
|
|
|
$spec_value['id'] = $v2['id'];
|
|
|
$option[] = $spec_value;
|
|
|
- }
|
|
|
-
|
|
|
- if ($spec) {
|
|
|
- $spec['id'] = $v2['id'];
|
|
|
- $option[] = $spec;
|
|
|
}*/
|
|
|
} else {
|
|
|
$option = array();
|
|
@@ -140,8 +140,12 @@ class Manage extends Auth
|
|
|
if ($sku_id) {
|
|
|
$sku = Dever::db('info_sku', 'goods')->find($sku_id);
|
|
|
if ($sku['key'] != -1) {
|
|
|
-
|
|
|
-
|
|
|
+ $spec = Dever::db('info_spec_value', 'goods')->find(array('id' => array('in', $sku['key'])), array('col' => 'id,info_id,group_concat(value) as name', 'group' => 'info_id'));
|
|
|
+ if ($spec) {
|
|
|
+ $spec_name = $spec['name'];
|
|
|
+ $result .= '-' . $spec_name;
|
|
|
+ }
|
|
|
+
|
|
|
$spec = Dever::db('info_spec_value', 'goods')->select(array('id' => array('in', $sku['key'])));
|
|
|
|
|
|
if ($spec) {
|
|
@@ -151,7 +155,7 @@ class Manage extends Auth
|
|
|
}
|
|
|
$spec_name = implode(',', $spec_name);
|
|
|
$result .= '-' . $spec_name;
|
|
|
- }
|
|
|
+ }*/
|
|
|
}
|
|
|
}
|
|
|
return $result;
|