Cart Bugs Fixes
This commit is contained in:
parent
34833ff995
commit
f69b000052
|
|
@ -332,8 +332,9 @@ class Cart {
|
|||
}
|
||||
} else if($data['is_configurable'] == "true") {
|
||||
if($cartItem->type == "configurable") {
|
||||
if($cartItem->child->product_id == $data['selected_configurable_option']) {
|
||||
$child = $cartItem->child;
|
||||
$temp = $this->cartItem->findOneByField('parent_id', $cartItem->id);
|
||||
if($temp->product_id == $data['selected_configurable_option']) {
|
||||
$child = $temp->child;
|
||||
|
||||
$parent = $cartItem;
|
||||
$parentPrice = $parent->price;
|
||||
|
|
@ -368,12 +369,12 @@ class Cart {
|
|||
}
|
||||
|
||||
if($data['is_configurable'] == "true") {
|
||||
$this->canAddOrUpdate($parent->child->id, $parent->quantity);
|
||||
|
||||
$parent = $cart->items()->create($itemData['parent']);
|
||||
|
||||
$itemData['child']['parent_id'] = $parent->id;
|
||||
|
||||
// $this->canAddOrUpdate($parent->child->id, $parent->quantity);
|
||||
|
||||
$cart->items()->create($itemData['child']);
|
||||
} else if($data['is_configurable'] == "false"){
|
||||
// $this->canAddOrUpdate($parent->id, $parent->quantity);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Webkul\\Cart\\Providers\\ShippingServiceProvider"
|
||||
"Webkul\\Shipping\\Providers\\ShippingServiceProvider"
|
||||
],
|
||||
"aliases": {}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue