diff --git a/packages/Webkul/Checkout/src/Cart.php b/packages/Webkul/Checkout/src/Cart.php index ec1c41953..67f4a1f54 100644 --- a/packages/Webkul/Checkout/src/Cart.php +++ b/packages/Webkul/Checkout/src/Cart.php @@ -368,10 +368,10 @@ class Cart { } if($data['is_configurable'] == "true") { - $this->canAddOrUpdate($parent->child->id, $parent->quantity); - $parent = $cart->items()->create($itemData['parent']); + $this->canAddOrUpdate($parent->child->id, $parent->quantity); + $itemData['child']['parent_id'] = $parent->id; $cart->items()->create($itemData['child']); @@ -503,7 +503,10 @@ class Cart { $data = []; foreach($item->product->super_attributes as $attribute) { + dd($item->child); + dd($attribute->options); $option = $attribute->options()->where('id', $item->child->{$attribute->code})->first(); + $data['attributes'][$attribute->code] = [ 'attribute_name' => $attribute->name, 'option_label' => $option->label, diff --git a/packages/Webkul/Shipping/composer.json b/packages/Webkul/Shipping/composer.json index 7e3676e4f..f894797bb 100644 --- a/packages/Webkul/Shipping/composer.json +++ b/packages/Webkul/Shipping/composer.json @@ -17,7 +17,7 @@ "extra": { "laravel": { "providers": [ - "Webkul\\Cart\\Providers\\ShippingServiceProvider" + "Webkul\\Shipping\\Providers\\ShippingServiceProvider" ], "aliases": {} } diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/cart/index.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/cart/index.blade.php index 18ae5c9e1..d1b9239d9 100644 --- a/packages/Webkul/Shop/src/Resources/views/checkout/cart/index.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/cart/index.blade.php @@ -49,11 +49,11 @@ @if ($product->type == 'configurable')