Skip to content
Advertisement

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 template render this string as pure HTML? Answer Answer is… Also, you

WHMCS: How to get the current client in addon module clientarea page?

Given that I have a WHMCS addon that I call ‘my_addon’. I created the main addon file ‘my_addon.php’ which does contain nothing than: This does basically work. It does give me my template file, everything is passed through. My question is: How do I get the currently logged in client from within that function? I didn’t find any API method

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 {_(‘test’)} for displaying the translation, Poedit don’t detect it. Is there a way to make Smarty detect

{$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:

Advertisement