How To Use Static Methods In Prestashop Theme Files

Sep 24, 2013104Alex Simonchik
How To Use Static Methods In Prestashop Theme Files

Once again I am posting a quick tip, based on rather frequently asked question on Prestashop forums. I feel like it will be helpful to a lot of people.

Today’s topic: static methods usage in Prestashop theme files.

The question goes like this –

Is it possible to use {php} tags in Prestashop template files?

As you know {php} tags are excluded from Smarty and therefore you cannot use Smarty {php} for Prestashop.

In such cases, if you want to use a static method you can call it the same way as in PHP but using {} to separate common HTML from Smarty, e.g.:

Partner With Us Looking for a partner that will help you to grow your business? We are the right company to develop your webstore. Feel free to get in touch with us. We will be happy to discuss your business opportunities and provide you with a Free Quote. Talk to Andrey

Post a new comment

BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *