Custom description of setup charge?

I'd like to save a custom description for the setup charge related to my subscription plans, for the purpose of better explanation of the line item in the invoice the customer will receive. Is this possible, or easy to implement?

  1. This functionality can be achieved by building a custom invoice layout for the "Payment Receipt" and "Payment Declined" email templates.

  2. Marc Guyer closed this discussion on 14 Oct, 2009 02:56 PM.

  3. david.ells re-opened this discussion on 14 Oct, 2009 03:48 PM

  4. Can you give me the current smarty template code used for the default invoice layout? Really the whole purpose we're using the setup charge for is for charging the subscription fee up front each month, and we want our setup charge line item to read "First month's service". Is this up front charging a future feature of CG? What is the timeline for it if so?

  5. The default invoice layout is a simple smarty variable that contains the default layout produced by CG. In other words, there isn't any smarty syntax other than the convenience variable {$invoice.asciiLayout}.

    We do have plans to write one in the context of a KB article as an example.

    We have considered providing a facility for charging the recurring charge at the beginning of the first billing period but we do not have an estimated arrival of this functionality at this time.

  6. Marc Guyer closed this discussion on 14 Oct, 2009 04:03 PM.

  7. david.ells re-opened this discussion on 14 Oct, 2009 10:47 PM

  8. I need some help recreating the default ascii layout invoice using a smarty template. So far I have

    ************************************************************
    INVOICE #{$invoice.invoiceNumber} {$invoice.billingDatetime|date_format:"%m/%d/%Y"|string_format:"%46s"}
    ************************************************************
    
    Billed To: {$customer.firstName|string_format:"%13s"} {$customer.lastName}
    Payment Method:{$subscription.ccType|upper|string_format:"%7s"}  ***{$subscription.ccLastFour}
    Amount Billed:    ${$transaction.amount}
    
    Quantity    Description                               Amount
    ````````````````````````````````````````````````````````````
    

    Which works just fine, but I can't loop over the charges at all. I'm admittedly annoyed that setup charges can't just have descriptions that are shown automatically on the invoice like everything else, but I am trying to make due. Unfortunately I'm having a tough time doing that. When I try to loop over the charges using syntax like this:

    {foreach from=$charges item=charge}
        {$charge.quantity} {$charge.code} {$charge.type}
    {foreach}
    

    I get syntax errors saying: (foreach: missing 'from' attribute), and (unclosed tag {foreach}.
    Apparently this otherwise valid smarty syntax is not valid. How do I loop over the charges for the invoice?

  9. Yeah -- I can see that this is a major hassle as a workaround. Here's a fix for your foreach:

    {foreach from=$charges item=charge}
    {$charge.quantity}@{$charge.eachAmount} each -- {$charge.quantity*$charge.eachAmount|string_format:"%01.2f"}
    {$charge.code}
    {if $charge.description}
    {$charge.description}
    {elseif $charge.type == "setup"}
    First month's service
    {/if}
    
    {/foreach}
    

    You were just missing a / in the foreach close tag.

    I see that there is a significant need for this description as well as the ability to charge a recurring charge upon signup. We're in the midst of a major upgrade that is in testing right now and should be rolled out early next week. Once that's done we'll be evaluating which feature improvements are most valuable and beginning work on them. I'm hoping that this will be one.

  10. Oh duh! Never noticed the forward slash to close the smarty tag. Oi. Thanks Marc.

  11. No prob. Always happy to help.

    "It's always some mundane detail..."
    
  12. Marc Guyer closed this discussion on 15 Oct, 2009 11:04 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