Skip to content

Tag: smarty

Get data from a form using post

I have three dropdowns and I can’t get data from two of them using POST, here is my code: I can get the categoryID but not from the supplier or order status Answer All three select has same name attribute please change the values name=”category_id”

How to render Html with smarty

I’m trying to render my raw HTML with smarty. The original text contains spaces and text returns, but when displayed, HTML is shown as plain text. Also, I tried to add {$brand.description|strip_tags:’UTF-8′} as a filter for my string. But it’s only deleting my HTML. How can my smarty t…

How to use Poedit with smarty templates?

I’m using PoEdit on smarty templates (phtml and tpl files) with the following Poedit configuration for PHP parser : Extensions: Parser command : If i’m using gettext inside PHP tags <?php _(‘test’); ?> Poedit detect that translation as expected. But i’m using Smarty {_(&#82…

{$foo|@print_r} prints ‘{$foo|@print_r}’ on the screen

I want to print array variable $foo. So I have done {$foo|@print_r} this but its prints like “{$foo|@print_r}” on the front page. I’m using the Oxied eshop and its use smarty as a template engine. Answer Try at least: that the array print for php in common Else try something like: