@@ 121-129 (lines=9) @@ | ||
118 | $item->save(); |
|
119 | } |
|
120 | } |
|
121 | if (!empty($request['options']['option'])) { |
|
122 | foreach ($request['options']['option'] as $key => $option_id) { |
|
123 | $param = new Item\Param(); |
|
124 | $param->item_id = $item->id; |
|
125 | $param->value = $request['options']['value'][$key]; |
|
126 | $param->item_option_id = $option_id; |
|
127 | $param->save(); |
|
128 | } |
|
129 | } |
|
130 | $offer = new Item\Offer(); |
|
131 | $offer->item_id = $item->id; |
|
132 | $offer->save(); |
|
@@ 133-141 (lines=9) @@ | ||
130 | $offer = new Item\Offer(); |
|
131 | $offer->item_id = $item->id; |
|
132 | $offer->save(); |
|
133 | if (!empty($request['offerOptions']['option'])) { |
|
134 | foreach ($request['offerOptions']['option'] as $key => $option_id) { |
|
135 | $param = new Item\Offer\Param(); |
|
136 | $param->item_offer_id = $offer->id; |
|
137 | $param->value = $request['offerOptions']['value'][$key]; |
|
138 | $param->item_offer_option_id = $option_id; |
|
139 | $param->save(); |
|
140 | } |
|
141 | } |
|
142 | $price = new Item\Offer\Price(); |
|
143 | $price->price = $request['price']; |
|
144 | $price->item_offer_id = $offer->id; |