HarryWales Posted July 23, 2015 Share Posted July 23, 2015 After the update from 6.0 to 6.0.1 (which blanked ALL my email templates) I have been trying to rebuild each one from scratch. However, in the Domain related section of Setup/Email Templates there are NO domain related merge fields listed whatsoever. How can I get a list of the merge fields available in WHMCS, and which category they can be used in, so I can rebuild my email templates? Checking through other email templates which are also now blank - I see there are no invoice related merge fields available in any of the Invoice related email either. In fact, no matter which email template you open there re only "client related" and "other" merge fields available. So for EVERY template the only fields available are: Client Related ID {$client_id} Client Name {$client_name} First Name {$client_first_name} Last Name {$client_last_name} Company Name {$client_company_name} Email Address {$client_email} Address 1 {$client_address1} Address 2 {$client_address2} City {$client_city} State/Region {$client_state} Postcode {$client_postcode} Country {$client_country} Phone Number {$client_phonenumber} Password {$client_password} Signup Date {$client_signup_date} Credit Balance {$client_credit} Card Type {$client_cc_type} Card Last 4 {$client_cc_number} Expiry Date {$client_cc_expiry} Remote Gateway Token {$client_gateway_id} Client Group ID {$client_group_id} Client Group Name {$client_group_name} Total Due Invoices Balance {$client_due_invoices_balance} Custom Fields (Array) {$client_custom_fields.1} Status {$client_status} Other Company Name {$company_name} Domain {$company_domain} Logo URL {$company_logo_url} WHMCS URL {$whmcs_url} WHMCS Link {$whmcs_link} Marketing Unsubscribe URL {$unsubscribe_url} Signature {$signature} 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 23, 2015 Share Posted July 23, 2015 After the update from 6.0 to 6.0.1 (which blanked ALL my email templates) I have been trying to rebuild each one from scratch. strangely, none of my email templates weren't blanked - did you use the incremental patch or the full ? However, in the Domain related section of Setup/Email Templates there are NO domain related merge fields listed whatsoever. How can I get a list of the merge fields available in WHMCS, and which category they can be used in, so I can rebuild my email templates? Checking through other email templates which are also now blank - I see there are no invoice related merge fields available in any of the Invoice related email either. In fact, no matter which email template you open there re only "client related" and "other" merge fields available. now, that I am seeing - can't remember if it was like that v6 (or the betas)... i'm assuming the merge fields exist and work, just that they're not listed. there is an action hook you can use to add merge fields to the available merge field box - EmailTplMergeFields - plus a link to some code I wrote previously... http://docs.whmcs.com/Hooks:EmailTplMergeFields http://forum.whmcs.com/showthread.php?98066-Hooks-and-or-email-merge-fields-for-custom-urls - though I assume WHMCS are working on a fix for this in v6.0.2, so it's probably not necessary to temporarily fix this with a hook. from v5.3, the available merge fields are... Invoice Related Invoice ID {$invoice_id} Invoice # {$invoice_num} Date Created {$invoice_date_created} Due Date {$invoice_date_due} Date Paid {$invoice_date_paid} Invoice Items (Array) {$invoice_items} Invoice Items HTML {$invoice_html_contents} Sub Total {$invoice_subtotal} Tax {$invoice_tax} Tax Rate {$invoice_tax_rate} Credit {$invoice_credit} Total {$invoice_total} Amount Paid {$invoice_amount_paid} Balance {$invoice_balance} Last Payment Amount {$invoice_last_payment_amount} Last Payment Trans ID {$invoice_last_payment_transid} Payment Method {$invoice_payment_method} Payment Link {$invoice_payment_link} Subscription ID {$invoice_subscription_id} Status {$invoice_status} Invoice Link {$invoice_link} Previous Balance {$invoice_previous_balance} Total Due Invoices Balance {$invoice_total_balance_due} Notes {$invoice_notes} Support Ticket Related ID {$ticket_id} Department {$ticket_department} Date Opened {$ticket_date_opened} Subject {$ticket_subject} Message {$ticket_message} Status {$ticket_status} Priority {$ticket_priority} Ticket URL {$ticket_url} Ticket Link {$ticket_link} Auto Close Time {$ticket_auto_close_time} Knowledgebase Auto Suggestions {$ticket_kb_auto_suggestions} Product/Service Related Order ID {$service_order_id} ID {$service_id} Signup Date {$service_reg_date} Product Name {$service_product_name} Product Description {$service_product_description} Domain {$service_domain} Config. Options {$service_config_options} Server Name {$service_server_name} Server Hostname {$service_server_hostname} Server IP {$service_server_ip} Dedicated IP {$service_dedicated_ip} Assigned IPs {$service_assigned_ips} Nameserver 1 {$service_ns1} Nameserver 2 {$service_ns2} Nameserver 3 {$service_ns3} Nameserver 4 {$service_ns4} Nameserver 1 IP {$service_ns1_ip} Nameserver 2 IP {$service_ns2_ip} Nameserver 3 IP {$service_ns3_ip} Nameserver 4 IP {$service_ns4_ip} Payment Method {$service_payment_method} First Payment Amount {$service_first_payment_amount} Recurring Payment {$service_recurring_amount} Billing Cycle {$service_billing_cycle} Next Due Date {$service_next_due_date} Status {$service_status} Suspend Reason {$service_suspension_reason} Cancellation Type {$service_cancellation_type} Username {$service_username} Password {$service_password} Custom Fields (Array) {$service_custom_fields.1} Domain Related Order ID {$domain_order_id} Signup Date {$domain_reg_date} Domain {$domain_name} SLD (yourdomain) {$domain_sld} TLD (com) {$domain_tld} Reg Period {$domain_reg_period} First Payment Amount {$domain_first_payment_amount} Recurring Amount {$domain_recurring_amount} Next Due Date {$domain_next_due_date} Expiry Date {$domain_expiry_date} Registrar {$domain_registrar} 'Days Until Expiry' and 'Days Until Next Due' will show 0 if the date has passed. 'Days After Expiry' and 'Days After Next Due' should be used if the date has passed. Days Until Expiry {$domain_days_until_expiry} Days Until Next Due {$domain_days_until_nextdue} 'Days After Expiry' and 'Days After Next Due' will only be defined if the date has passed. Days After Expiry {$domain_days_after_expiry} Days After Next Due {$domain_days_after_nextdue} Status {$domain_status} DNS Management {$domain_dns_management} Email Forwarding {$domain_email_forwarding} ID Protection {$domain_id_protection} Auto Renew Disabled {$domain_do_not_renew} Affiliate Related No. of Referrals {$affiliate_total_visits} Earning Balance {$affiliate_balance} Withdrawn Amount {$affiliate_withdrawn} Referrals Details {$affiliate_referrals_table} Referral URL {$affiliate_referral_url} 0 Quote Link to comment Share on other sites More sharing options...
HarryWales Posted July 23, 2015 Author Share Posted July 23, 2015 I tried both the full 6.0.1 upgrade (from 6.0) which messed everything up - then rolled back to 6.0 Then tried (a few days later) the incremental patch 6.0 to 6.0.1 and the results were the same - ALL template blanked and nNO product/Service/Domain merge fields listed. I have spent over 40 hours since upgrading from my last 5 version trying to sort this out - and so far have had zero help from whmcs team on either issue... Don't get me wrong, upgrading from 5.x to 6.0 was a great upgrade - I was very happy with that - it was only when upgrading from 6.0 to 6.0.1 that everything went terribly wrong and now my whmcs is unusable, so now have had to resort to using SAGE Accounts to post my invoices out... - - - Updated - - - PS - thank you for posting the merge fields - I now may be able to recreate all my email templates from the info you provided - which I had already asked whmcs teams for but got zero response - which is what lets whmcs down - lack of response from the team... 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 23, 2015 Share Posted July 23, 2015 PS - thank you for posting the merge fields - I now may be able to recreate all my email templates from the info you provided - which I had already asked whmcs teams for but got zero response - which is what lets whmcs down - lack of response from the team... you can say that, I couldn't possibly comment! have you got a copy of your old v5.3 or v6 database ? if so, you might be able to pull the content of the email templates from the tblemailtemplates table. failing that, you should be able to copy some/most of them from the full version zip - install/sql/emailtemplates.sql 0 Quote Link to comment Share on other sites More sharing options...
HarryWales Posted July 24, 2015 Author Share Posted July 24, 2015 Thanks for the info you provide Brian - very helpful indeed. So far I have managed to repopulate about 40% of the templates using your info - and your pointer to using my 6.0 Database which luckily I still have a backup copy of. My provider finally opened a ticket with WHMCS yesterday and they "looked into it" - but they only opened a few email templates (ironically those I had repopulated) and reported back they could not find any issues... They completely missed the point that the important merge fields are missing... But fortunately the merge fields I need are in the 6.0 database so I expect to have my 6.0.1 fully running again by the end of today... Thanks again for you help. 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.