Jump to content


New Members
  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Rybaris's Achievements


Newbie (1/14)

  • One Month Later Rare
  • Week One Done Rare
  • Conversation Starter Rare

Recent Badges



  1. So guys big thanks to you, both approaches works well. Using {debug} i found out $module_dir variable, so i created this: <img src="{$module_dir}views/img/ig_icon.png" alt="icon" /> This gave me Forbidden 403 error, which was better than exception. Forbidden was because of Ubuntu and its permissions. I added permissions to all PS folders, files and bang, instagram icon showed up :]
  2. Hello guys. I am starting with module development and i found first problem which gives me headaches PS I have followed directory structure from tutorial https://devdocs.prestashop.com/1.7/modules/creation/module-file-structure/ aniinstagram ├── aniinstagram.php ├── logo.png └── views ├── css │ └── aniinstagram.css ├── img │ └── ig_icon.png ├── js │ └── aniinstagram.js └── templates ├── admin ├── front └── hook └── aniinstagram.tpl To reproduce problem, i want to source image views/img/ig_icon.png inside aniinstagram.tpl: <!-- Block aniinstagram --> <section id="aniinstagram_block_home" class="block"> <div> <img src="ig_icon.png" alt="icon"> </div> </section> <!-- /Block aniinstagram --> I discovered that this is not that simple i thought. I tried src with ../ with ../../ but nothing worked well and also i think that there must exists something more elegant, something Smarty. So i started to try like this: <img src="{$modules_dir}aniinstagram/views/img/ig_icon.png" alt="icon" /> I tried many global variables from here https://www.choosepizzi.net/prestashop-1-7-1-smarty-commands/ which i found on internet but ended with exception errors. Then i found that it may not work in 1.7 anymore? What is the right approach for this? How can i link my image to tpl file? Thanks in advance, Rybaris
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More