In my application ,i have a order page which contains products which we can order.If i order a product the CartTotal becomes changed(nothing but the amount is assigned to the span element).If i am not ordering any products the CartTotal will be nothing(span content is nothing) as follows,
Cart Total:
but when i open the order page Cart total will be nothing as shown above.But i need it as ”
“Cart is Empty” as follow.
Cart Total: Cart is Empty
So my requirement is untill i order atleast one product the cart total is showing that the cart is empty.
So how to do it.my cart total view coding is as follows,
Cart Total:
here if i order the product the amount is assigned to span element as
$(‘#cart-total’).text(‘$’ + data.CartTotal.toFixed(2))
and then when someone adds a product: