Smarty. User variable as Object

Smarty
I want to use smarty variable as the object key, but I can not make it working. {$phrases['promote_no_{$type}_public_ready']} $phrases is the array...
3 years ago

Is there a Switch case in smarty?

Smarty
I am working on a website using Smarty. I have searched the web to find out whether or not I can use switch case with Smarty. But i cannot able to fin...
3 years ago

Server displays old version of site

Smarty
Good day to all. I have a site (created with zend framework and smarty) hosted on a virtual machine (vmware) with centOS 5.2. Everything worked fine ...
3 years ago

Alternately reverse div class values in smarty foreach loop

Smarty
I'm trying to make a fancy banner module on my webstite to show alternately banners like this: But the result is like this... The code looks like ...
3 years ago

Smarty template file (.tpl) is not loading PHP code

Smarty
I have a smarty template file and I want to include code from a php file. It simply doesn't work. Here's the sfunc.php in templates folder: func...
3 years ago

Counting preg_match in smarty

Smarty
How to count preg_match matches in smarty? Why is the following not working? {preg_match("/\[PGN.*](.*)\[\/PGN.*\]/", $code, $match)} {$match|@count...
3 years ago

Counter in smarty

Smarty
I would like to assign values to a variable depending on a counter's value inside a FOR EACH loop. So if counter=1, then I assign the value 'a', but i...
3 years ago

How to extend Prestashop ajaxCall function to show tpl file content?

Smarty
I'm facing a problem with extending ajaxCall function located in blocklayered.php $smarty->assign( array( 'myVariable' => 10, 'hom...
3 years ago

Smarty - Display a Div Based on the Presence or Absence of a {CAPTURE} variable

Smarty
I have defined a {CAPTURE} variable in Smarty using: {capture name='websitediv'} //code to generate some output to be captured. {/capture} and as...
2 years ago

Prestashop 1.6. How to check if product isPack in .tpl?

Smarty
I want to check in theme (front) product.tpl file (PS 1.6.1.4) if state if product is Standard product or Pack of existing products {if $product_typ...
3 years ago

Prestashop backend and frontend module display error on some pages

Smarty
On PrestaShop 1.6 on some pages of front end I'm getting the below error and all pages of admin when I'm trying to login I'm getting this error Fa...
3 years ago

Hide display if empty data

Smarty
I'd like to display info when there is info in my description. I need to hide the whole thing when there's no info {if !empty($product.description-sh...
2 years ago

How to get currency name instead number in OXID eShop?

Smarty
I am trying to send a value, from the Datalayer of my website, that has a few conditions. This is the code I currently have for obtaining the value f...
2 years ago

Smarty / How to include PHP function to compress CSS file

Smarty
I do have a PHP function which pretty much compresses specific CSS files. I recently added smarty to this project. Previously, this is what I had: &...
2 years ago

Smarty Undefiend Variable As Array

Smarty
I have a smarty application that was written about 1 year ago , now i migrated to Smarty v3 and i've got some errors in my code that i dont have any ...
2 years ago

How could I, from a table made of checkboxes, find informations about the position about the selected ones?

Smarty
Some contest: I have three tables in my database in MySQL, names are in italian. "Attivita" (activity) "Ambito" (scope) An associative table of the...
2 years ago

Smarty Login with Session - needs page refresh to see in templates

Smarty
I have a small web application with smarty template engine. The login is in the header.tpl. Login & Logout are working fine, but they need a page ...
2 years ago

Interperet english date string to use with date_format

Smarty
In smarty, I have a date string formatted like this: DD/MM/YYYY When I try to use date_format it gets the date wrong. How can I make it understand w...
2 years ago

prestashop 1.7 how to edit the "add product" page in backoffice

Smarty
I am trying without any success, to edit the page in the subject, because I have added 7 more fields in the product table that I would like to manage ...
2 years ago

How to display data in smarty when using PDO with prepared statement and executing inside foreach?

Smarty
$dbh = new PDO($dsn, $user, $password, array( PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true)); $selectNumberTitle = $dbh->prepare("SELECT Advert...
2 years ago