Hello
There is a Joomla 3 + Acymailing 5 + VM3 + Awocoupon site, where a mail template uses this:
{awocoupon:cart[key]21|139|14|[na]|[na]|[na]|[na]}
There is a custom script which fetches the mail data from the database, and runs this:
$class = acymailing_get('class.template');
JPluginHelper::importPlugin('acymailing');
$dispatcher = JDispatcher::getInstance();
$dispatcher->trigger('acymailing_replaceusertags', array(&$mail, &$receiver, true));
JPluginHelper::importPlugin('acymailing');
$dispatcher = JDispatcher::getInstance();
$dispatcher->trigger('acymailing_replaceusertags', array(&$mail, &$receiver, true));
This generates the coupon code, and the custom script can handle it (we don't send the mail directly, but passes it to an external manager)
Also we're migrating this site to Joomla 5 + Acymailing 9 + VM4 + Awocopon. I purchased the AwoCoupon plugin for AcyMailing, but something might changed. I've already changed the trigger in the custom script to this:
acym_trigger('replaceUserInformation', [&$mail, &$receiver, true]);
Could you help me how should I change the {awocoupon:cart[key]21|139|14|[na]|[na]|[na]|[na]} part to get the same result?