The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Discount information in JSONP cart

charlie_mezakcharlie_mezak Member
in Help edited April 2012
I'm using JSONP to build my own cart interface, which is working well so far. However, I need to display information about the discounts being applied to the items in the cart.

The cart includes a total_discount field, but this is always 0, even when discounts are applied to items in the cart. The cart's total price reflects the discounts, as do the prices of the line items themselves, but it is as if those were the original prices of the products. The only indication of a discount is that the discount's name and amount appear as a key-value pair in each of the products' options. However, this doesn't give me access to the original prices.

Am I missing something here? Or do I have to hack together a way to recover the original prices of the products in my cart?
Tagged:
Comments
  • fc_adamfc_adam FoxyCart Team
    @charlie_mezak,

    Could you link us to your store mate?
  • lukeluke FoxyCart Team
    Hey Chralie, thanks for posting. This has come up before and we've thought about including an original_price and/or a line item discount in the JSON. As it stands right now, unfortunately, you'd have to hack something together. The discount item for the whole cart is for coupon discounts, not line item discounts. We'll add a ticket to discuss this for a future version.
  • @luke Thanks. Handling it on my end wasn't that hard because we're only dealing with a single discounted category. Just wanted to make sure I wasn't missing anything.
Sign In or Register to comment.