Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jun 2006
    Thanked 3 Times in 3 Posts

    Question Magento: Removing <p> tags from the payment_html variable


    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
    tags from the payment_html variable?

    Many thanks

  • #2
    New Coder
    Join Date
    Jun 2012
    Thanked 0 Times in 0 Posts
    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.

  • #3
    Senior Coder
    Join Date
    Jun 2008
    New Jersey
    Thanked 259 Times in 256 Posts
    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.


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts