Jump to content

Custom Product Fields Not Working


SwiftModders

Recommended Posts

Actually...

 

Available Merge Fields
Client Related
ID	{$client_id}
Full 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	{$client_state}
Postcode	{$client_postcode}
Country	{$client_country}
Phone Number	{$client_phonenumber}
Password	{$client_password}
Signup Date 	{$client_signup_date}
Credit Balance	{$client_credit}
CC Type	{$client_cc_type}
CC Last 4 Digits	{$client_cc_number}
CC Expiry Date	{$client_cc_expiry}
Language 	{$client_language}
Custom Fields (Array)	{$client_custom_fields.1}
Status	{$client_status}

Other
Company Name	{$company_name}
WHMCS URL	{$whmcs_url}
WHMCS Link	{$whmcs_link}
Signature	{$signature}

 

It does not list {$service_custom_field_fieldname} anywhere...

Link to comment
Share on other sites

  • WHMCS CEO

The reason it doesn't list the service related merge fields in the above list is because you're composing a "General" type email message. You only see the merge fields that you can use in the email you are currently creating (not all of them).

 

Matt

Link to comment
Share on other sites

  • WHMCS CEO

There are 2 ways of referencing the custom fields. The first and easier way is the array method for example {$service_custom_fields.0) or {$service_custom_fields.1} for fields 1 & 2 respectively.

 

Alternatively, you can reference the field by name using syntax such as{$service_custom_field_fieldnamehere}. For fieldnamehere, you need to take your custom field name, convert the name to lowercase and remove anything other than a-z 0-9 chars. For example "How did you find our site?" would become "howdidyoufindoursite" and so would be {$service_custom_field_howdidyoufindoursite} in the email template.

 

Matt

Link to comment
Share on other sites

  • 3 months later...
There are 2 ways of referencing the custom fields. The first and easier way is the array method for example {$service_custom_fields.0) or {$service_custom_fields.1} for fields 1 & 2 respectively.

Just a note: With the new ordering feature in 3.8.1 the field number depends on the order of the custom fields. If you change the order you need to update your templates as well so best to use the name reference.

Link to comment
Share on other sites

Can someone please tell me how/where you pull up a list of these merge fields? I seem to recall there was a button or something from within the email template being worked on, but I don't see it anymore. Where do we go to find the fields? I am using 3.8.1 and I'm wondering if it might have changed anything.

Link to comment
Share on other sites

Can someone please tell me how/where you pull up a list of these merge fields? I seem to recall there was a button or something from within the email template being worked on, but I don't see it anymore. Where do we go to find the fields? I am using 3.8.1 and I'm wondering if it might have changed anything.

 

Theres no button anymore. The fields should show up on the right side as another column.

 

Another note:

 

{$service_custom_field_howdidyoufindoursite}

 

This never worked for me!!! I have only access to the index vlaues, not the named values

Link to comment
Share on other sites

  • 4 weeks later...

Just upgraded my customer's WHM to version 3.8.1. After doing so the email templates custom merge inserts are not working. For instance on an email template there is:

 

IP: [productcustom-ip address]

Port: [productcustom-device port]

Password: [productcustom-device password]

 

Now i see this changed in the new version, so i did the following.

 

IP: {$service_custom_field_ip_address}

Port: {$service_custom_field_device_port}

Password: {$service_custom_field_device_password}

 

And when we send emails we get

 

IP:

Port:

Password:

 

Now these are custom fields for each product/services. Does it matter what merge you have to do for each product? Like {$product1_custom_field_ip_address} and {$product2_custom_field_ip_address}

 

Please help.

Link to comment
Share on other sites

  • 9 months later...
  • 2 years later...

UPDATE i put a whole list of formats in the template and

 

{$service_custom_fields.0} works

 

but {$service_custom_fields.softwareinstallurl} does not work, so i guess ill just have to remember if i ever change the order to change the template as the naming option does not work.

Edited by durangod
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated