fenton1000 / mf-portfolio-five-big-boring-shop

0 stars 1 forks source link

BUG: Checkout total shows €10 when no items in cart #32

Closed fenton1000 closed 1 year ago

fenton1000 commented 1 year ago

Description:

When there are no items in the shopping cart the cart total shows as €10. This is the delivery amount showing up because the total value of goods is less than €30. Clearly this is incorrect in the case of an empty basket.

Acceptance Criteria:

When the cart is empty the total amount shown is €0.

Tasks:

Add an if statement to the shopping cart calculation so that if the total (goods only) is equal to €0 the grand total is also €0.