Nullified Posted April 29, 2015 Share Posted April 29, 2015 I am trying to pass an array to mergefield data. Is this possible? My Script: $postfields["username"] = 'username'; $postfields["password"] = md5('password'); $postfields["action"] = "SendAdminEmail"; $postfields["messagename"] = "Domain Synchronization Report"; $postfields["mergefields[dtg]"] = date("j F Y @ G:i:s"); $postfields["mergefields[exemptions]"] = $exemptions; $exemptions is either blank or an array of data. My messagename Admin Template: Domain Pricing Synchronization Cron Report for {$dtg} {if is_array($exemptions)}Domain Pricing Exemptions: {foreach from=$exemptions key=k item=v} {if $k.register} - $k registrations have been exempted from auto update.{/if} {if $k.transfer} - $k transfers have been exempted from auto update.{/if} {if $k.renew} - $k renewals have been exempted from auto update.{/if} {/foreach} {/if} Domain Pricing Synchronization Complete $dtg sends the date through the email just fine, but the array data for $exemptions (and the other arrays) is gone. I have tested the $postfields[mergefields[*]] variables for valid array data and they are fine in the script. They are however lost once sent to the WHMCS API. 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.