View Full Version : Magento: Removing <p> tags from the payment_html variable

07-31-2012, 06:47 AM

When the order mail is sent to the customers, there is a gap in the height in the \"Payment Method\" box (as shown in teh screenshot below)

I inspected the html and found that the variable
{{var payment_html}} is wrapped with a <p> tag.

Can someone please tell me from whre do i remove the
<p></p> tags from the payment_html variable?


Many thanks

07-31-2012, 04:10 PM
First of all this isn't a PHP-problem. Next time post it in the HTML or CSS forum.

But as far as i can see you have 2 options:
1. Just remove the <p> and </p> tag that are around the variable; or
2. If the <p> tag has an id or class then play with the margins defined in the CSS.

Otherwise repost it in the other forums, with more code.

07-31-2012, 04:25 PM
lampie1978, this isn't a PHP problem persay, but its not really an HTML one either, its a Magento problem. Its solution is best found through PHP though I think, and either way, as Magento is a PHP application, I think its probably best fit here.

First, as I remember (though I don't really do much in Magento), you can modify those variables through one of the template files. As Magento has a billion theme files (I might be rounding up a bit), I don't remember which one. But strictly through PHP, you can use regex or substring. You'd have to find the actual template code that's in being run in and strip the tags there. You can also use a Javascript solution to select the content within it, prepend that content before it, and remove the actual tagged content.