management integration start
This commit is contained in:
parent
308548c265
commit
4643e4e31f
|
|
@ -32,8 +32,8 @@ class CartItemResource extends JsonResource
|
|||
'additional' => is_array($this->resource->additional)
|
||||
? $this->resource->additional
|
||||
: json_decode($this->resource->additional, true),
|
||||
'child' => new self($this->child),
|
||||
'product' => $this->when($this->product_id, new CartItemProduct($this->product)),
|
||||
// 'child' => new self($this->child),
|
||||
'product' => $this->when($this->product_id, new CartItemProduct($this->child->product ?? $this->product)),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -597,7 +597,6 @@ class Configurable extends AbstractType
|
|||
*/
|
||||
public function prepareForCart($data)
|
||||
{
|
||||
Log::info($data);
|
||||
if (! isset($data['selected_configurable_option']) || ! $data['selected_configurable_option']) {
|
||||
if ($this->getDefaultVariantId()) {
|
||||
$data['selected_configurable_option'] = $this->getDefaultVariantId();
|
||||
|
|
|
|||
Loading…
Reference in New Issue