|
|
@@ -1090,7 +1090,6 @@ class ProductRepository extends BaseRepository
|
|
|
$mer_cat = array_column($data['merCateId']->toArray(), 'mer_cate_id');
|
|
|
}
|
|
|
$data['mer_cate_id'] = $mer_cat;
|
|
|
- @file_put_contents('quanju.txt', "-测试3\r\n", 8);
|
|
|
foreach ($data['attr'] as $k => $v) {
|
|
|
$data['attr'][$k] = ['value' => $v['attr_name'], 'detail' => $v['attr_values']];
|
|
|
}
|
|
|
@@ -1099,7 +1098,6 @@ class ProductRepository extends BaseRepository
|
|
|
$arr = [];
|
|
|
if (in_array($data['product_type'], [1, 3])) $value_make = app()->make(ProductAttrValueRepository::class);
|
|
|
$attrValue = json_decode(json_encode($attrValue, true), true);
|
|
|
- @file_put_contents('quanju.txt', "-测试4\r\n", 8);
|
|
|
foreach ($attrValue as $key => $item) {
|
|
|
if ($data['product_type'] == 1) {
|
|
|
$value = $value_make->getSearch(['sku' => $item['sku'], 'product_id' => $data['old_product_id']])->find();
|
|
|
@@ -1126,7 +1124,6 @@ class ProductRepository extends BaseRepository
|
|
|
$sku = explode(',', $item['sku']);
|
|
|
$item['old_stock'] = $old_stock ?? $item['stock'];
|
|
|
if (isset($item['productCdkey']) && count($item['productCdkey'])) {
|
|
|
- @file_put_contents('quanju.txt', "-测试5\r\n", 8);
|
|
|
foreach ($item['productCdkey'] as $hasCdkey) {
|
|
|
if ($hasCdkey['is_type']) {
|
|
|
$cdkey['list'][] = $hasCdkey;
|
|
|
@@ -1138,7 +1135,6 @@ class ProductRepository extends BaseRepository
|
|
|
$item['cdkey'] = $cdkey;
|
|
|
}
|
|
|
unset($item['productCdkey']);
|
|
|
- @file_put_contents('quanju.txt', "-测试6\r\n", 8);
|
|
|
foreach ($sku as $k => $v) {
|
|
|
$item['value' . $k] = $v;
|
|
|
}
|