In BrilliantRetail we get the shipping rates and payment methods via an ajax call to an ACT url.
Any thoughts where the new ra:asdfdasf stuff came from? Do I need to run that through the parser to remove it before returning it?
Best, David
yes, for example we store the shipping option ‘layout’ in a snippet to give developers control over the returned value. We parse the variables to insert the available rate data and then run it through the parser to handle conditionals / etc.
$tmp = $this->EE->TMPL->parse_variables($snippetdata, $vars);
$this->EE->TMPL->parse($tmp);
$output .= $tmp;If you’re intending that these “layouts” are fully parsed by the template engine, you’ll need to add a step:
$tmp = ee()->TMPL->parse_globals($tmp);That will parse global variables as well as remove any stray EE comments (the ones you are seeing are for runtime template annotation).
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.