Missing discount and currency from ajax set_quantity for cart

Create issue
Issue #1250 resolved
Irfan Ahmad created an issue

File: satchmo/apps/satchmo_store/shop/views/cart.py

Line 291:


if request.is_ajax(): if errors: return json_response({'errors': errors, 'results': ("Error")}, True) else: return _json_response({ 'item_id': cartitem.id, 'item_qty': str(cartitem.quantity) or "0", 'item_price': str(cartitem.line_total) or "0.00", 'cart_total': str(cart.total) or "0.00", 'cart_count': str(cart.numItems) or '0', })


We see that no discount is being applied here. Neither currency is available (both of these are applied as filters in non-ajax views). As there is no template involved in Ajax view, the discount and currency should be applied in view.

Comments (3)

  1. Log in to comment