Add Subscription/Product Title to Member Emails

Discussion in 'Templates customization' started by jschemmel, Oct 15, 2006.

  1. jschemmel

    jschemmel New Member

    Joined:
    Sep 16, 2006
    Messages:
    15
    I do not see in the aMember CP where the Title of a subscription or product can be added to an email template. I only see that the Product Number ({$payment.product_id} - Payment/Subscription Product#) can be added.

    Does anyone know what the variable name and syntax are in order to add the subscription/product title to a email template?

    Thanks for the help.
  2. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    There is no such variable available, because customer may have several subscriptions.
  3. jschemmel

    jschemmel New Member

    Joined:
    Sep 16, 2006
    Messages:
    15
    Since the Product ID is available I thought the corresponding Product Title would also be available. May I suggest that this capability be considered as an addition to a future version.
  4. terriz

    terriz Member

    Joined:
    Nov 17, 2003
    Messages:
    37
    Alex,

    I would find this very helpful also.

    Peace,
    Terri Z
  5. tgobuzas

    tgobuzas aMember Pro Customer

    Joined:
    Aug 22, 2006
    Messages:
    11
    Alex,

    So in Admincp -> Setup -> Email when you enable Send Payment Email for Plain Text default, the following code does not do what the user is asking? When trying to do it in HTML format the code breaks and the user receives an error in the email.

    It appears this is used for multi product and lists each purchase with price. The code I left out subtotals the product purchase, adds tax if applicable, coupon if applicable, and then displays the total. Why not in html emails?

    Providing a Product ID# means nothing to anyone (user) in an email. Also, on the Thankyou page after completing signup, the user is presented with a receipt with Product title and not an ID#.

    These variables would be useful in HTML emails

    Code:
    {"Product/Subscription Title"|string_format:"%-50s"} Price
    -----------------------------------------------------------
    {foreach from=$products item=p}
    {$p.title|string_format:"%-50s"} {$config.currency|default:"$"}{$p.price}
    {/foreach}
    
    Regards,

    Tom
  6. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    Tom, it is of course can be used in Payment E-Mail.
    But it cannot be used for example in "Remember Password" email, because script does not know which payment/product are you talking about.
  7. tgobuzas

    tgobuzas aMember Pro Customer

    Joined:
    Aug 22, 2006
    Messages:
    11
    Alex,

    I will try the code above again ($p.title), but it did not seem to work. Either the email came blank to my test subscriber with an error or an error generated on the payment screen when trying to process and send the email.

    Will open a ticket if I cannot figure out how to get a product title (multiple product titles subscribed with costs) listed on a payment email.

    Thanks,

    Tom
  8. tgobuzas

    tgobuzas aMember Pro Customer

    Joined:
    Aug 22, 2006
    Messages:
    11
    Alex,

    Ok. I got some of the code above to work, but it appears smarty blows up when I use

    Code:
    
    ...|string_format:"%-50s"}
    
    I am trying to put spaces after the title and then display the cost.

    I also tried variation of "printf" but that blew up also with a message such as:

    Wonder if this has to do with the smarty plugins or a version of PHP I may be using. Opening a ticket at /support.

    Thanks,

    Tom
  9. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    Lets resolve it via helpdesk.

Share This Page