Marcell Posted August 1, 2017 Share Posted August 1, 2017 (edited) Hello! I need a bit help with email templates. Is it possible to get somehow the following details about order? (Order Confirmation email) product id (for url like this clientarea.php?action=productdetails&id=518) - // ex:. id=518 product name product price order status order id order notes maybe? order date Thank you! Edited August 1, 2017 by sqpp 0 Quote Link to comment Share on other sites More sharing options...
AffordableDomainsCanada Posted August 1, 2017 Share Posted August 1, 2017 Certain merge fields are only available with certain templates. To see what the available merge fields are, in the templates section of your administration area Setup >> Email Templates >> Select Template near the bottom of the page you will see the available merge fields. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 1, 2017 Share Posted August 1, 2017 or as it's a Smarty template, add {debug} into it and you should get a popup window when you view the email in WHMCS (not your mail program)... ultimately, you might need to use a emailpresend hook to query the db if variables you want aren't present (they won't be)... if you're unfamiliar with hooks and db, you might need a developer for that. 0 Quote Link to comment Share on other sites More sharing options...
Marcell Posted August 1, 2017 Author Share Posted August 1, 2017 Not even the basic merge fields works for me, which supposed to be. My friend business uses the next template, but for him it's work fine. <p>Dear <strong>{$client_name}</strong>,</p> We have received your order and will be processing it shortly. The details of the order are below: <p><strong>Order Number</strong>: {$order_number}</p> <p>{$order_details}</p> <p>You will receive an email from us shortly once your account has been setup. Please quote your order reference number if you wish to contact us about this order.</p> 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 2, 2017 Share Posted August 2, 2017 Not even the basic merge fields works for me, which supposed to be.My friend business uses the next template, but for him it's work fine. that's just the default order confirmation email and should work fine for all users... but what you can't necessarily do is take variables (mergefields) from one type of template (e.g product) and use them in a "general" type email template (e.g order confirmation). 0 Quote Link to comment Share on other sites More sharing options...
Marcell Posted August 3, 2017 Author Share Posted August 3, 2017 Do you have any idea how to sort out Product Name & Description or pricing? with Array? (Not in Order Confirmation Template) Of course in the invoice example. I have a very advanced email-template just works very well but would be great to put these variables into different rows. Is it also possible to put each product into different rows (when client do multiple orders like hosting plus domain) 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 3, 2017 Share Posted August 3, 2017 if you're talking about doing this in the invoice email template, e.g invoice created, take a look at the {$invoice_items} array and try foreach looping through it and tweaking the output to your needs... https://forum.whmcs.com/showthread.php?95831-invoice_items-does-not-show-the-first-item-in-email-templates&p=401795#post401795 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.