Getting a specific charge or item on invoice template

nathan's Avatar

nathan

30 Mar, 2011 03:22 AM

We have a tracked item that is not charged (it is unlimited and free) which we use to track ad impressions. I want to include the quantity (number of impression) on the invoice. I'm currently looping through the charges ({foreach from=$charges item="charge"}), but it doesn't seem to be included as a "charge." Is this because there is not real $ associated with it? If so, how can I access an item and it's associated quantity? Essentially, the idea is to show the quantity of clicks, the associated charge and the number of impressions (which are unlimited and free).

  1. Support Staff 1 Posted by Marc Guyer on 30 Mar, 2011 02:28 PM

    Marc Guyer's Avatar

    Charges only reflect what was charged on the invoice, as you suspected. Unfortunately I don't think it's possible to do what you're looking for natively. You can, using the items array, show the current quantity of an item but that will be close to zero on a Payment Receipt because a new billing period has just begun.

    There is a workaround, however. You could use the customer meta data feature to keep a running record of the customer's quantity of an item in the previous billing period. This doesn't sound very elegant to me but it is possible.

  2. 2 Posted by nathan on 30 Mar, 2011 04:50 PM

    nathan's Avatar

    OK, what about this workaround: I associate a cost (0.0001) with the impressions tracked item and then create an additional tracked item with a negative cost (-0.0001). Then I set them both the same value which should make one offset the other but still allow a charge to come through on the invoice. So, the impressions would have a charge of a few cents, while the impressions_workaround item woud have a charge of negative few cents. In my invoice template, I'll just handle those charges specially to show the impressions quantity but not the cost and hide the workaround tracked item.

  3. 3 Posted by nathan on 30 Mar, 2011 05:12 PM

    nathan's Avatar

    I'm testing this work around now, but one thing I'm seeing right off is that it doesn't seem to be calculating these charges--I just manually added 1000 impressions but it includes no value in the amount column. Are unlimited items not calculated until invoice closing?

  4. 4 Posted by nathan on 31 Mar, 2011 03:20 PM

    nathan's Avatar

    This does not appear to work. Those charges didn't appear on the invoice when processed. Why are these calculations not working? A tracked item that has a quantity of 10,000 and a overage price of 0.0001 should produce a $1 charge should it not?

  5. Support Staff 5 Posted by Marc Guyer on 31 Mar, 2011 08:47 PM

    Marc Guyer's Avatar

    I'd like to take a look at that. Which product code?

  6. 6 Posted by nathan on 31 Mar, 2011 08:59 PM

    nathan's Avatar

    PATIENT_REFERRAL. Thanks!

  7. Support Staff 7 Posted by Marc Guyer on 31 Mar, 2011 09:08 PM

    Marc Guyer's Avatar

    Ah. I think there's just a slight bit of confusion. The overage amount is just for overage. The quantity over the included quantity would be charged at .0001 each. However, if you intend for the item to be unlimited, the overage amount must be set to zero.

    This workaround doesn't really appeal to me anyway. It would have an effect on your revenue numbers in CG. You would show inflated revenue and also show a concession to offset it. Just a bit messy in my opinion.

    You could simply provide a link to your own site to a page which shows the customer the impressions they had in a period. I'm guessing you already have that anyway...

  8. 8 Posted by nathan on 31 Mar, 2011 09:20 PM

    nathan's Avatar

    Ahhh, that was dumb of me on the quantity included.... I knew that, but wasn't thinking I guess. As to your distaste for the work around, can you explain more about the effect on revenue numbers? I mean, we're just taking about to independent items that offset one another so that as far as the gateway or the client is concerned its moot I would think--it's all just one charge anyway.

  9. Support Staff 9 Posted by Marc Guyer on 31 Mar, 2011 10:08 PM

    Marc Guyer's Avatar

    It's just inaccurate. If you can deal with the inaccuracy, then I don't see a problem with it.

  10. Dean closed this discussion on 16 Jan, 2013 04:22 PM.

Discussions are closed to public comments.
If you need help with Cheddar please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

28 Mar, 2024 10:45 PM
24 Jan, 2024 08:33 AM
11 Jan, 2024 07:13 AM
30 Nov, 2023 02:07 AM
22 Nov, 2023 08:41 AM