smarty

Override Prestashop Module Changes not Visible

青春壹個敷衍的年華 提交于 2019-12-25 11:52:03
问题 I am attempting to override a module in Prestashop but the changes are just not appearing. I have overridden a template file and a controller so I have added the following files: \override\modules\blockwishlist\views\templates\front\mywishlist.tpl \override\modules\blockwishlist\controllers\front\mywishlist.php These are very simple changes where I add another column to a table that contains a button. When the button is clicked the controller generates a CSV file. Any idea why these changes

Smarty multidimensional Array

旧时模样 提交于 2019-12-25 10:01:14
问题 I have a multidimensional array like this : $products Smarty_Variable Object (3) ->value = Array (2) 0 => Array (73) id_product => "1" id_supplier => "1" id_manufacturer => "1" id_tax_rules_group => "1" id_category_default => "2" id_color_default => "2" on_sale => "0" online_only => "0" ean13 => "0" upc => null ecotax => "0.000000" quantity => "50" minimal_quantity => "1" price => 189.05 wholesale_price => "70.000000" unity => null unit_price_ratio => "0.000000" additional_shipping_cost => "0

codeigniter + hmvc + smarty or using common libraries within modules

荒凉一梦 提交于 2019-12-25 07:47:51
问题 I'm building a website using CI, HMVC and Smarty. It's my first time using HMVC and I don't understand how I can use common libraries within the modules. I prefer using Smarty on my sites and usually it's a piece of cake: I create a wrapper for smarty, autoload it and use it in controllers where necessary. But now I need to use smarty within the module controller and I don't know how to access it. Any ideas how I can do that? I've been researching the issue for a couple of days, with no luck.

smarty error seen in JS code

匆匆过客 提交于 2019-12-25 06:51:05
问题 I am trying to use tiny mce (JS editor ) in a web page rendered by Smarty 3. But when I use the below code , It throws the following error The specific message was: Syntax Error in template "/home/xxx/xxx/websites/site.local/views/xxx/newnl.html.tpl" on line 564 "m.add({title : "Subject {test}", onclick : function() {" - Unexpected " : ", expected one of: "}" , " " Code : <script language="javascript" type="text/javascript" src="http://127.0.0.1/./js/tinymce/jscripts/tiny_mce/tiny_mce.js"><

Variable from Javascript -> Php -> Smarty… is it possible?

天大地大妈咪最大 提交于 2019-12-25 06:26:29
问题 Example: <script type="text/javascript"> insertVideos({ 'block':'youtubeDiv', 'q':'keyword', 'type':'search', 'results':8, 'order':'most_relevance', 'player':'embed', 'layout':'thumbnails' }); </script> i need that 'results' as a variable to pass, at the end of process i need something like: {if $results != 0} how can i do it? 回答1: There isn't a way to access the PHP/Smarty in your javascript as they are executed in two different worlds. The page is requested from the server. The server

wrap new line variable with <li>

筅森魡賤 提交于 2019-12-25 05:34:05
问题 We are using WHMCS and within the product section I want to wrap the product with <li></li> on every new line. So far I have done the following, which gets me all the items but puts them all in one line, but I haven't been able to work out how to assign these stripped values to a new var to be wrapped with the list tag. {foreach from=$product.features key=feature item=value} {$value|strip_tags} {foreachelse} {$product.description|strip_tags} {/foreach} 回答1: You can use the following code:

Smarty 3: if, mixed conditions & operators

岁酱吖の 提交于 2019-12-25 05:08:38
问题 well... can you tell me why this works: {if !$conta|contains:"word1" && ($product->id_category_default < 388 || $product->id_category_default > 475)} and this not: {if (!$conta|contains:"word1" || !$conta|contains:"word2") && ($product->id_category_default < 388 || $product->id_category_default > 475)} where is the syntax error? 回答1: Try this instead: {if !($conta|contains:"word1" || $conta|contains:"word2") && ($product->id_category_default < 388 || $product->id_category_default > 475)} 来源:

Smarty Templates - Return product info based on topic type

懵懂的女人 提交于 2019-12-25 04:50:47
问题 Im using the following code: {foreach from=$entries key=i item=topic} {if $topic.topic_style == problem} <li> <a href="topic.php?id={$topic.id}">{$topic.title}</a> </li> {/if} {/foreach} Which returns the topics which are all ' problem 's. Its possible to tag a problem with a product, the system uses the Get Satisfaction API. I want to return the product associated with this Topic , if there is a product associated with this Topic. I have the following, which returns all products: {foreach

Repeated in the table Smarty + Php

假如想象 提交于 2019-12-25 03:36:40
问题 I have a problem in in the table The problem is to repeat I want when it reaches 4 rows to the table is transferred to the new line Code PHP : // for : $tr = 1; while($row = mysql_fetch_array($post_tv)){ $show[] = $row; if ($tr == 4){ $tr == 1; } $tr++; $marsosmarty->assign("show",$show); $marsosmarty->assign("tr",$tr); } Code Html smarty : <td width="91"><table width="100" height="100" border="0" cellpadding="1" cellspacing="1" bgcolor="#666666"> <tbody><tr> {section name=table loop=$show}

Smarty Templates with Codeigniter, Cant Load Template when too many directories in hirarichy

微笑、不失礼 提交于 2019-12-25 02:38:47
问题 I'm using CI Smarty https://github.com/Vheissu/Ci-Smarty There are Two issues with this as far as i have noticed. but the issue for which I opened this question is that I cant load a .tpl file if that .tpl file is inside the directory of another directory. e-g this is my current directory structure for SmartyTemplate --Themes --SomeOtherThemeName --Default //Default Theme Directory i am currently using --css --js --images --views --admin (directory) --sitesettings (directory) --site-settings