1
template : It means path of the .html template of the particular type of field to generate field.
elementTmpl : It means path of .html template of the particular type of field (select,text,textarea etc.)
Reference
1
document.getElementById('poboxmessage').style.display='block';
document.getElementById('poboxmessage').innerHTML=$.mage.__(document.getElementById('poboxmessage').innerHTML);
I was misinterpreting that my div returns a string in block inside mage functionality rather it needs to be converted to block first and then into plain text. $.mage returns ...
1
Please add this to the PHP file.
$giftcods = ['VFDFRVXSW43VF', 'FFRFRFVSW43VF', 'VFDFGFGFXSW43VF'];
$templateVars = [
'store' => $this->storeManager->getStore(),
'customer_name' => $name,
'giftcods' => implode("<br>",$giftcods)
];
And set in template as ->setTemplateVars($templateVars)
Use variable in HTML as,
<div ...
Only top voted, non community-wiki answers of a minimum length are eligible
Related Tags
html × 371php × 91
magento-1.9 × 90
magento2 × 86
css × 72
javascript × 65
template × 25
layout × 23
phtml × 21
magento-2.1 × 19
jquery × 19
ce-1.8.1.0 × 19
email-templates × 16
knockoutjs × 16
product-attribute × 11
theme × 11
checkout × 10
product × 9
blocks × 9
email × 9
xml × 9
frontend × 9
magento2.3 × 7
overrides × 7
magento-1.7 × 6