PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, October 27, 2022

[FIXED] How to remove the comments blocks from module front office output

 October 27, 2022     prestashop, prestashop-1.7     No comments   

Issue

Modules in PS 1.7 that renders something in the front office displays like this:

    <!-- begin modules/jemaa//views/templates/widget/url.tpl --> 
Rendered string here 
    <!-- end modules/jemaa//views/templates/widget/url.tpl -->

How to get rid of these comments and get only the "rendred string"?

In fact I need to display a url string in the src attribule of an img html tag.

Thanks in advance for your usual help


Solution

My bad, it is happening only in debug mode. The corresponding code is in classes/Smarty/SmartyResourceModule, in the fetch method:

        if (_PS_MODE_DEV_) {
            $source = implode('', array(
                '<!-- begin ' . $file . ' -->',
                file_get_contents($file),
                '<!-- end ' . $file . ' -->',
            ));
        } else {
            $source = file_get_contents($file);
        }

Thank you for your time anyways.



Answered By - Adib Aroui
Answer Checked By - Marilyn (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing