Get Free Audit

How To Use Static Methods In Prestashop Theme Files

Sep 24, 2013

348 Alex 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.:

Andrey Dubina
Partner With Us Looking for a partner to grow your business? We are the right company to bring your webstore to success. 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 *