Account for null when no more cart items are present
This commit is contained in:
1 parent
b818e56954
commit
50757a2832
1 file changed
+4
-3
@@ -121,10 +121,11 @@ after delete
|
||||
on cart_item for each row
|
||||
begin
|
||||
update cart
|
||||
set price_total = (
|
||||
select sum(price_subtotal)
|
||||
set price_total = ifnull(
|
||||
(select sum(price_subtotal)
|
||||
from cart_item
|
||||
where cart_id = old.cart_id
|
||||
where cart_id = old.cart_id),
|
||||
0.00
|
||||
)
|
||||
where id = old.cart_id;
|
||||
end;
|
||||
|
||||
Reference in new issue
Block a user