Jump to content

Search the Community

Showing results for tags '.tpl'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Community Help and Support
    • PrestaShop Download
    • PrestaShop Addons
  • News and Announcements
    • PrestaShop news and releases
    • PrestaShop Beta
    • PrestaShop Blogs
    • PrestaShop Meetups
  • International community (English)
    • General topics
    • PrestaShop Merchants
    • PrestaShop Developers
    • Taxes, Translations & Laws
    • Community Modules and Themes
  • Forum francophone
    • Discussion générale
    • Aide et support communautaire
    • PrestaShop pour les marchands
    • PrestaShop pour les développeurs
    • Adaptation aux lois Québécoises
    • Modules et thèmes gratuits
    • Modules et thèmes payants
  • Foro en Español
    • Discusión general
    • Soporte de la comunidad y ayuda
    • Comerciantes PrestaShop
    • Desarrolladores PrestaShop
    • Módulos y plantillas gratuitas
  • Forum italiano
    • Forum generale
    • Aiuto e supporto della Community
    • Commercianti PrestaShop
    • Sviluppatori PrestaShop
    • Aspetti legali sull'eCommerce
    • Moduli e template gratuiti
  • Deutsches Forum
    • Generelle Fragen
    • Support und Hilfe aus der Community
    • e-Commerce/Versand-Handel mit Prestashop
    • Prestashop-Entwickler
    • Anpassung an deutsches Recht
    • Kostenlose Module und Templates
    • Generelle Fragen Copy
  • Nederlandstalig forum
    • Algemeen
    • Hulp en ondersteuning, van en voor de community
    • PrestaShop-winkeliers
    • PrestaShop-ontwikkelaars
    • Het aanpassen van PrestaShop
    • Gratis modules en templates
  • Fórum em Português
    • Fórum Geral
    • Ajuda e Suporte da Comunidade
    • Lojistas que utilizam o PrestaShop
    • Desenvolvedores PrestaShop
    • Legislação específica
    • Módulos e temas gratuitos
  • Polskie forum
    • Forum ogólne
    • Wsparcie i pomoc użytkowników
    • Oferty twórców PrestaShop
    • Deweloperzy PrestaShop
    • Darmowe Moduły i Szablony
  • Dansk forum
    • Generelt forum
    • Hjælp og support fra fællesskabet
    • PrestaShop for købmænd
    • PrestaShop for udviklere
    • Love og regler
    • Gratis moduler og temaer
  • České fórum
    • Instalasi, Konfigurasi dan upgrade
    • Obecná diskuze
    • Bezplatné moduly a šablony
    • PrestaShop vývojáři
    • PrestaShop obchodníci
  • Bahasa Indonesia
    • Diskusi Umum
    • Podpora a pomoc komunity
    • Laporan Bug
    • Jasa, Promosi & Lowongan Kerja
  • Svenskt forum
    • Allmän diskussion
    • Installation, konfigurering och uppdatering
  • Forumul românesc
    • Discuţii generale
    • Instalare, configurare şi upgrade
  • Pусский язык
    • Обсуждение скрипта
    • Установка, Настройка, Обновление
    • Прием багов
  • Slovenské fórum
    • Všeobecná diskusia
    • Podpora a pomoc komunity
    • PrestaShop obchodníci
    • PrestaShop vývojári
    • Bezplatné moduly a šablóny
  • Türkçe Topluluğu
    • Genel Konular
    • Topluluk desteği ve yardım
    • PrestaShop Tüccarları
    • Prestashop Geliştiricileri
    • Ücretsiz Modül ve Temalar
  • Diễn đàn tiếng Việt
    • Thảo luận chung
    • Hỗ trợ từ cộng đồng
    • Dành cho chủ doanh nghiệp / cửa hàng
    • Dành cho lập trình viên
  • PrestaShop Communities
    • اللغه العربيه [Arabic]
    • Ελληνικά [Greek]
    • עִבְרִית [Hebrew]
    • 中文
    • Magyar [Hungarian]
    • 日本語 [Japanese]
    • Lietuviškai [Lithuanian]
    • انجمن فارسی [Persian]
    • ไทย [Thai]
    • Malaysia [Malaysian]
    • Eesti [Estonian]
    • Slovenščina [Slovenian]
    • Српски [Serbian]
  • IP. Board Forum
    • IP. Board Forum Questions and Issues
  • Archive
    • Zapłać Moduły i Szablony [ARCHIVE]
    • Moduly, upravy a dizajn [ARCHIVE]
    • Phát triển và các mô-đun [ARCHIVE]
    • Yazılım, Modül ve Tema [ARCHIVE]
    • Модули, Шаблоны [ARCHIVE]
    • Module şi teme [ARCHIVE]
    • Pengembangan dan Modul [ARCHIVE]
    • Moduler och teman [ARCHIVE]
    • Ecommerce x PrestaShop [ARCHIVE BOARD]
    • Vývoj a moduly [ARCHIVE]
    • Kostenpflichtige Module, Templates [ARCHIVE]
    • Módulos y temas pagos [ARCHIVE]
    • Módulos e temas pagos [ARCHIVE]
    • Servizi commerciali [ARCHIVE]
    • Forum - Feedback Contributor
    • PrestaShop Cloud

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


  1. Bonjour à tous ! Je rencontre un petit souci lors de l’écriture de mon code sur mon site internet. Voilà, je cherche à intégrer une checkbox mais seulement pour un certain groupe de client, mais je n’arrive pas à trouver la solution pour mettre le code dans une fonction « if : condition ». C’est donc pourquoi j’ai besoin de votre aide Pour créer ces boutons, je me suis donc rendu dans le fichier « order-carrier.tpl » de mon thème afin de trouver ce que je cherchais. Et c’est donc au bout d’un peu de recherches que finalement, j’ai trouvé la ligne correspondante avec le premier bouton déjà créé. J’ai donc créé tout d’abord le second bouton, puis le troisième : <p class="checkbox"> <input type="checkbox" name="cgv" id="cgv" value="1" {if $checkedTOS}checked="checked"{/if} /> <label for="cgv">{l s='I agree to the terms of service and will adhere to them unconditionally.'}</label> <a href="{$link_conditions|escape:'html':'UTF-8'}" class="iframe" rel="nofollow">{l s='(Read the Terms of Service)'}</a> </p> </br> <p class="checkbox"> <input type="checkbox" name="retractation" id="retractation" value="1" {if $checkedTOS}checked="checked"{/if} /> <label for="retractation">{l s='En validant ma commande, je reconnais avoir pris connaissance de mes droits de retractation'}</label> </p> </br> <p class="checkbox"> <input type="checkbox" name="pro" id="pro" value="1" {if $checkedTOS}checked="checked"{/if} /> <label for="pro">{l s='J'accepte les CGV spécifiques aux professionnels'}</label> </p> Mais, mon problème se situe donc au niveau du dernier bouton ! Comme dit plus haut, j’aimerais que celui-ci soit attribué seulement à un groupe de client, et non à tous comme les deux premiers boutons. Vous avez des idées ? Merci d’avance pour vos réponses
  2. Bonjour, comment fait on pour overrider un fichier tpl svp ? Personnellement je n'en ai absolument aucune idée. J'ai mon fichier product.tpl que je dois modifier pour que le bouton d'ajout au panier soit juste en dessous du prix, j'y connais rien mais j'ai compris qu'il fallait déplacer les div qui sont dans les div. Avec une mise a jour ça va erase mes modifs. Je doit overrider, mais j'ai rien trouvé sur ce forum ni ailleurs qui décrit la démarche a faire, juste des explications globales sur le dossier override et un exemple d'override du .httacess avec des lignes de commande en début de fichier, j'ai rien compris je pense qu'ils devaient parler d'autre chose... Je n'ai donc pas trouvé une source d'explication viable mais j'ai fait de longue recherche. J'imagine que ça doit être tout simple, si quelqu'un pourrait me dire svp ce serait sympa. Merci.
  3. Hello there, First of all, I must congratulate this community because I have learned a lot here with all of you. I'm having a problem with my website (Prestashop 1.6.1.17) with Template Theme1421 (TemplateMonster) after changing a tpl or css file, the deconfigured my 5 steps bars in the cart. You can check my situation in the link: 'http://teste.centroortopedicodosul.com/index.php?controller=order' I'v enoticed that my correct code should be: <!-- Steps --> <ul class="step clearfix" id="order_step"> <li class="step_current first"> <span><em>01.</em> Resumo</span> </li> <li class="step_todo second"> <span><em>02.</em> Entrar</span> </li> <li class="step_todo third"> <span><em>03.</em> Morada</span> </li> <li class="step_todo four"> <span><em>04.</em> Expedição</span> </li> <li id="step_end" class="step_todo last"> <span><em>05.</em> Pagamento</span> </li> </ul> <!-- /Steps --> and actually it is <!--Steps--> <div class="row"> ::before <div class="mystep mystepflat"> <a class="active " href="http://teste.centroortopedicodosul.com/index.php?controller=order"> Summary </a> <a class=" " href="http://teste.centroortopedicodosul.com/index.php?controller=order&amp;step=1&amp;multi-shipping="> Sign in </a> <a class=" " href="http://teste.centroortopedicodosul.com/index.php?controller=order&amp;step=1&amp;multi-shipping="> Address </a> <a class=" " href="http://teste.centroortopedicodosul.com/index.php?controller=order&amp;step=2&amp;multi-shipping="> Shipping </a> <span class="last_step">Payment</span> </div> ::after </div> <!--/steps--> It seems to me that I made some chenge somewhere that changed my code here, but I con't find the path of the file that I need to change to correct the thing. Or is it from some setup in the bakoffice? I confess this is a mess for me now... Thanks in advance for reading me. Kind regards, Luís
  4. Bonjour, voilà j'ai un souci avec un code de tracking qui visiblement ne remonte pas les infos... 🤔 jai mis 3 variables dynamiques : $total_paid_tax_incl $total_shipping_tax_incl $product_id mais visiblement je ne doit pas avoir la bonne syntaxe, malgré plusieurs tentatives.... et là je commence à perdre pieds je vous inscrit mon code ci-dessous : <script type="text/javascript"> var _mo = _mo || []; _mo.push(['_key','000000000']); _mo.push(['_ca','$total_paid_tax_incl','']); _mo.push(['_livraison','$total_shipping_tax_incl','']); _mo.push(['_articles','$product_id','']); (function() { var mo = document.createElement('script'); mo.type = 'text/javascript'; mo.async = true; mo.src = 'https://fichier.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(mo, s);})(); </script> quelqu'un pourrais m'éclairer sur ce sujet ? Pour précision ce script est insérer sur mon fichier orderconfirmation.tpl" Sur Prestashop 1.6 merci par avance pour vos réponses
  5. Hello everyone, I have been trying to send a variable from the indexcontroller to a .tpl file. I am editing the product module presented on the home page to change the prices it shows, the problem is that this module loads the view products-list.tpl and this is where I should receive the variables, but I can not send the variable . Look at the module code, but I do not understand where you assign the variables. In trying to understand the indexcontroller, I realize that the hooks are responsible for bringing the information from the view and that these are loaded in the index.tpl view, so if I'm not mistaken, the variable I need should be assigned before receive the down payment, but I have no idea where to assign it. Please, you can guide me with this thing that is already driving me crazy. I'm starting to develop in Prestashop and the version I'm using is 1.6.1.1
  6. Dear prestashop developers, A few days ago i tryed making my first prestashop module, and to be honest it's kind of a pain in the ass. but its a new challenge so i like it. but there is a problem is can not get my head arround. and that is the setTemplate() function. here is my code for my controller of the module : <?php class WorkplaceAllController extends ModuleAdminController { public function __construct() { parent::__construct(); } public function init() { parent::init(); } public function initContent() { $this->setTemplate('all.tpl'); return parent::initContent(); } } it isn't much, but i can not load the template 'all' it gets the template from : ../admin646hq9/themes/default/template/ i would like it to get it from : ../module/My_module_name/views/templates/admin/ when i read the doc's online and watch tutorials this is the directory they use withoud a problem. how can i change it to the directory i want? becouse in this way i can not install the template with the module. idk if it is needed but here is my module : <?php if (!defined('_PS_VERSION_')) exit; class workplace extends Module { public function __construct() { $this->name = 'workplace'; $this->version = '1.0'; $this->author = 'Gavin'; $this->tab = 'administration'; //$this->controllers = ['all']; parent::__construct(); $this->displayName = 'Workplace Lite'; $this->description = $this->l('Easy to use workplace manager'); $this->ps_versions_compliancy = [ 'min' => '1.7.2.0', 'max' => _PS_VERSION_ ]; $this->confirmUninstall = $this->l('Are you sure you want to uninstall? Uninstalling this module will result in the lost of saved information in this module! the whole database needed for this module will be removed. if you ever want to use the module again please consider deactivating it!'); if (!Configuration::get('workplace')) { $this->warning = $this->l('No name provided'); } } public function install() { return parent::install() && $this->createTABLE() && $this->installModuleTab('WorkPlaceLite', array(1=>'Workplace Lite'), 0); } public function uninstall() { $this->dropTABLE(); $this->uninstallModuleTab('WorkPlaceLite'); if (!parent::uninstall()) { return false; } return true; } public function dropTABLE() { $sql= "DROP TABLE `"._DB_PREFIX_."module_workplace`"; if(!$result=Db::getInstance()->Execute($sql)) { return false; } return true; } public function createTABLE() { $sql= "CREATE TABLE IF NOT EXISTS `"._DB_PREFIX_."module_workplace`( `id_tablename` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY , `title` VARCHAR(256) NOT NULL )"; if(!$result=Db::getInstance()->Execute($sql)) { return false; } return true; } private function installModuleTab($tabClass, $tabName, $idTabParent) { // Install Tabs $parent_tab = new Tab(); // Need a foreach for the language $parent_tab->name[$this->context->language->id] = $this->l('WorkPlace Lite'); $parent_tab->class_name = 'AdminWorkPlace'; $parent_tab->id_parent = 0; // Home tab $parent_tab->module = $this->name; $parent_tab->add(); $tabs = [['Workplace','WorkplaceAll'],['New Workplace','WorkplaceNew',]]; foreach ($tabs as &$value) { $tab = new Tab(); $tab->name[$this->context->language->id] = $this->l($value[0]); $tab->class_name = $value[1]; $tab->id_parent = $parent_tab->id; $tab->module = $this->name; $tab->add(); } return true; } private function uninstallModuleTab($tabClass) { $moduleTabs = Tab::getCollectionFromModule($this->name); if (!empty($moduleTabs)) { foreach ($moduleTabs as $moduleTab) { $moduleTab->delete(); } } } } greating, Gavin
  7. necesito ayuda urgente, alguien que me pueda ayudar para poder cambiar “Contact Us” por “Contáctanos”, que se encuentran en la parte superior derecha, al lado de las redes sociales, ya seguí la ruta de acceso de themes/boutique/modules/blocksocial/blocksocial.tpl y no está la palabra para cambiarlo, necesito ayuda porfavorrrrr,, adjunto imagen, graciassaludos
  8. I have a need to show the blockcategory module on a cms page we have created. I have used the following include and it shows the word categories but no images. {include file='themes/warehouse/modules/blockcategories/blockcategories.tpl' id_category=84} I am wanting to have something similar to this page http://www.theherbsplace.com/84-Male_Products_page_1_c_74 take the place of the existing image grid that is there now. As it is now, I have to keep track that the images don't get changed by the manufacturer or a product gets discontinued. Using the cart derived categories page will eliminate both of those issues. Thanks, Randal Server informationServer information: Linux #1 SMP Wed May 13 20:33:05 UTC 2015 x86_64 Server software version: Apache/2.2.29 (Amazon) PHP version: 5.3.29 Memory limit: 256M Max execution time: 30 Database informationMySQL version: 5.5.42 MySQL engine: InnoDB Tables prefix: ps_ Store informationPrestaShop version: 1.5.6.1 Shop URL: https://www.theherbsplace.com/ Current theme in use: warehouse
  9. HI am new with Prestashop and PHP, i need to create a module that upload some videos related to products. So i search in Google and i find a project (Ajax, JQuery) that make the whole work (uploading selected files), and there is many JS, CSS and PHP files but i don't know how to integrate them into my project ! i already prepare the module and relate it to the product page. maybe i deedn't express my needs well but any ideas or suggestion well be grateful and sorry for my bed English.
  10. Bonjour, Je débute dans la programmation donc je vous prie d'être indulgent dans vos propos Merci par avance. J'essaie actuellement de coder un petit module pour le site d'un camarade. J'ai inséré plusieurs scripts dans mon .tpl à l'aide de cette syntaxe Ex : <script type="text/javascript" src="js/jquery.js"></script> Or ils n'ont pas l'air de fonctionner... Pourriez vous me dire quelle syntaxe est à utiliser ?? Merci pour vos réponses ! Cordialement
  11. Hey, so I'm a complete beginner to prestashop, I saw the presta shop coding a theme page, but it didn't seem to help...I downloaded the default bootstrapper and now I want to create a theme...I want to know where the main file is where all the .tpl files are imported to create the site that you actually see...I want to customize my site so that there isn' the manufacturer or supplier tab. Thanks!
  12. HI evrybody!!. Using PS 1.6.0.5. I´m having some trouble passing a query result from my hand-made module, using th .tpl... I´ll put the example and you´ll understand better. This is the PHP on the "mymodule.php" public function hookProductFooter($params) { global $smarty; $libroID = Tools::getvalue('id_product'); switch ($libroID) { case 476: $libroarray = array(307,303,302,306); break; // MY INTENTION IS TO KEEP ADDING CASES } foreach ($libroarray as $librorow) { $sql = 'SELECT * FROM '._DB_PREFIX_.'image WHERE `id_product` = '.$librorow; $results = Db::getInstance()->ExecuteS($sql) ; foreach ($results as $row) { $var = $row['id_image'].' :: '.$row['id_product'].'<br />'; } } $this->smarty->assign('libros', $var); return $this->display(__FILE__, 'mymodule.tpl'); } And this is the code on "mymodule.tpl" {foreach $libros as $item} {$item} {/foreach} This displays on the products page at the bottom: 322 :: 306 This are the last result of the array. where '306' is the last number of the first array($libroarray), and '322' is the result of the query that should run for eah of the numbes of that first array ($row['id_image'])... I need to display all of the combination of that first array... here is the result I´m looking for: 389 :: 307 255 :: 303 560 :: 302 322 :: 306 Do I explain myself? I know it has to be something really simple but I cant figure it out... Please a little help?
  13. My Problem is that I am not able fetch the address data after including address.tpl file into my-account.tpl file. Please help me with this problem.
  14. How can i apply target="_blank" in .tpl My code is here: <a href="http://www.test.com" target="_blank">USA/INTERNATIONAL</a> But http://validator.w3.org given Error: Line 223, Column 61: there is no attribute "target" How can i solved help me. Thank you
  15. Hola Prestashoperos, estoy intentando modificar los archivos .tpl para cambiar cosas de sitio, pero no consigo entrar al texto de programacion, me sale esto: {* * 2007-2014 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/afl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <[email protected]> * @copyright 2007-2014 PrestaShop SA * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} {if !$content_only} </div><!-- #center_column --> {if isset($right_column_size) && !empty($right_column_size)} <div id="right_column" class="col-xs-12 col-sm-{$right_column_size|intval} column">{$HOOK_RIGHT_COLUMN}</div> {/if} </div><!-- .row --> </div><!-- #columns --> </div><!-- .columns-container --> <!-- Footer --> <div class="footer-container"> <footer id="footer" class="container"> <div class="row">{$HOOK_FOOTER}</div> </footer> </div><!-- #footer --> </div><!-- #page --> {/if} {include file="$tpl_dir./global.tpl"} </body> </html> Esto es en el footer. tpl, dentro de themes-->default-bootstrap, y no se que hacer para poder programar. He buscado por internet el problema y he encontrado lo de forzar compilación en Parametros avanzado-->Rendimiento en el back de prestahsop, pero no consigo entrar para modificar el tpl. Alguien tiene la llave? Un saludo y gracias!
  16. Hello; I'm new to prestashop i'm trying to replace an error alert with popup window the error alert exist on category.php page when i add a product to basket without login i get this alert from CartController (the code if (Tools::getValue('ajax') === 'true' && Tools::getValue('add') === '1') { // ajax cart die('{"hasError" : true, "errors" : ["' . Tools::displayError('Please login first .', false) . '"]}'); } so I was trying to create the popup on category.tpl and put visibility:hidden; But how can I manage the popup visibility from CartController !!
  17. Bonjour, Après avoir longuement travaillé mon site en local, avec MAMP, je suis enfin passé online! Quelques difficultés au départ mais aujourd'hui tout fonctionne. Par contre j'ai quelques soucis concernant la modification des pages .php .tpl and co, je vous explique... En local je modifiais directement le code des pages pour personnaliser mon site, mais dorénavant (en ligne) si je modifie mes pages codé ne serait-ce que d'une virgule, j'obtient une page 'Internal Server Error' qui remplace ma page modifié... Je fait des modifications très succincte, j'utilise correctement mon logiciel FTP, et je place les pages aux bons endroits... Voila si vous pouviez m'éclairer ce serait super !!
  18. Hey everyone, I am having a bit of an issue that I am trying to sort out. On our "Contact Us" section of the website we wanted to input a small bit in Spanish for our Spanish speaking customers. I have hard coded the Spanish accent codes in the past using the entity codes for the characters (ie: &oacute and &ntilde). For some reason when I am trying to code it in the "contact-form.tpl" it is either showing up wrong or not at all. I have made sure that the file itself states Unicode UTF-8. Here is the code I am working with: Original attempt: <p class="bold">Para español, marque la extensión # 233</p> Adjusting the code: <p lang="es" xml:lang="es">Para español, marque la extensión # 233</p> I have imported the Spanish localization pack in the back office, as well as enabled Spanish under the Languages tab with success. I am just having a difficult time getting the code to show and display properly. It has been a good long while since I have done any language switching code so I am very rusty (probably missed something super simple). I should also point out that when I test the code it seems to be working, just is not displaying properly. Thanks in advance, J Dub
  19. Hi, I use prestashop version 1.5.4.1. I read hundred of posts and manual, but still didn't find how to assign and exchange a variable between the overriding Product.php file and product-list.tpl file. I wish to create a custom function to truncate the $product.description_short to say 100 chars but keeping the html tags. I found some examples of solution, but don't succeed to pass the result to the template file product-list.tpl! After many tests to search for right syntax, I succeed to see with debug console, that my function is called and executed in my overriding Product.php file but dying after maximum execution time because of deadend loop in my function. So I just succeed to assign a variable in template file and display it this way {assign var=my_var value='test'} then display it with {$my_var} Now to just test passing a variable, I tried these ways, always using {$my_var} in template product-list.tpl: <?php class Product extends ProductCore { //public $my_var; //public static $my_var = 'test'; //$smarty->assign('my_var', function1($args)); //assign($my_var, value='test'); //$smarty->assign('my_var', 'test'); public function get_position($content, $position, $chars = 100) { ... return $var1; } public function function1($content, $chars = 50) { $position = 0; $data=array(); while(...){ ...$next_position = $this->get_position($content, $position, $chars ); $data[] = substr($content, $position, $next_position); } ... return $data; } public function __construct($id_product = null, $full = false, $id_lang = null, $id_shop = null, Context $context = null) { parent::__construct($id_product, $full, $id_lang); //$this->my_var= 'test' ; //$this->my_var= $smarty->get_template_vars('my_var');; //$this->context->smarty->assign('my_var', $this->my_var); //$this->assign('my_var', $this->my_var); //$this->my_var = $this->function1('testtesttesttest',10); //self::$smarty->assign('my_var',function1('testtesttesttest',10)); //self::$smarty->assign('my_var','test); } } ?> (In the code above, I comment all syntax tests, of course I uncomment one at a time to test it.) In the debug console I see that $content and $chars take right value, this means functions are called. But I don't find the right syntax to assign my_var in product.php so it is readable in product-list.tpl. Most of the tests give syntax error or "Notice: Undefined index:my_var in..." if I don't assign my_var in product-list.tpl Of course, I also need in Product.php file to read arguments coming from product-list.tpl call.. Thanks in advance for any help Meanwhile I look for custom function using plugin... but I read that custom plugin should be placed in a "plugins" directory but documentation is not clear about where to install this directory. By default it is said that smarty will look in default smarty "plugins" directory in smarty_dir, but I don't know where is this default directory. I noticed in debug console that it is rootdir\tools\smarty\plugins\ is it right? Thanks again
  20. If PrestaShop is based on a 3-tier architecture (MVC), what is the name of the controller that renders the .tpl files inside a theme? e.g myProject/themes/default("Default theme in Prestashop")/(.tpl files) or maybe where I can find the location of the controller that renders the .tpl files? So that I can add more smarty tags //Assume this file is the controller that renders the .tpl files in a theme //I got this code for converting a php value to a smarty tag in creating a module http://doc.prestashop.com/display/PS15/Creating+a+PrestaShop+module $this->context->smarty->assign(array( 'Hello' => "Hello", 'World' => "World", 'another_smarty_tag' => "Im another smarty tag" ));
  21. Olá, trago um manual em Português sobre o motor de template Smarty, usada pelo Prestashop e outros sistemas na internet, os famosos arquivos .tpl. O manual traz fundamentos básicos, um glossário de suas propriedades, e também uma listagem variada de exemplos. Bem útil para quem quer aprender a usar estruturas condicionais, associativas, indices e objetos do Smarty vinculadas a módulos instalados ou próprios. Aconselho a estudar a estrutura modular do Prestashop, os principais métodos de um módulo e o fluxo de dados até chegar na definição(assign) das variaveis smarty. Manual Smarty 2.6 PT-BR manual-pt_BR-2.6.pdf obs: os créditos foram mantidos no arquivo Para mais informações: http://www.smarty.net/ Espero ter ajudado.
  22. Zdravím, potřeboval bych poradit jak udělat, aby se soubor blockreinsurance.tpl zobrazil v každém jazyce jiný? Pouze CZ, EN. Snažil jsem se to vyřešit takto, že jsem do souboru blockreinsurance.tpl umístil tento kód: {if $language.iso_code == "cs"}{include file="/modules/blockreinsurance/blockreinsurance.tpl"} {elseif $language.iso_code == "en"}{include file="/modules/blockreinsurance/blockreinsurance_{$lang_iso}.tpl"} {else}{include file="/modules/blockreinsurance/blockreinsurance.tpl"} {/if} Ale to se nenačetlo vůbec. Prosím o rady. Díky
  23. Ciao, sto cercando un modo di cambiare i titoli <h4> di alcuni blocchi nel footer del mio negozio in modo che cambino a seconda della lingua del negozio. Sto lavorando nel file fotter_cms.tpl e ho notato che le stringhe dei titoli sono scritti così: <h4>{l s="Follow Us"}</h4> c'è un modo per aggiungere i titoli per le altre lingue del negozio in questa stringa? Grazie, a presto!
  24. Hola, tengo un problema quería cambiar un texto del modulo blockcontact que indicaba el horario de atención al cliente. Lo primero que hice es buscar el modulo para configurarlo y me di cuenta que desde hay solo podía añadir un teléfono y un E-mail, y empecé a buscar en el foro, encontré este post http://www.prestasho...e-con-nosotros/ .De esta manera supe que era un problema de traducción y me dirigí a Localización>Traducciones y mi sorpresa fue que blockcontact no estaba para traducir. Fui a la ruta del modulo y me di cuenta que no tenia archivo .tpl para la plantilla que estoy utilizando pero en la ruta de la plantilla default si que tiene su archivo .tpl La pregunta es ¿a que se puede deber esto? ¿es normal que algún modulo no tenga .tpl? ¿reinstalando el modulo se solucionaría? Muchas gracias.
  25. Hello, how can you edit a prestashop theme directly in coding editor? My footer.tpl looks like this {if !$content_only} </div> <!-- Right --> <div id="right_column" class="column"> {$HOOK_RIGHT_COLUMN} </div> </div> <!-- Footer --> <div id="footer">{$HOOK_FOOTER}</div> </div> {/if} </body> </html> when I edit the file to this {if !$content_only} </div> <!-- Right --> <div id="right_column" class="column"> {$HOOK_RIGHT_COLUMN} </div> </div> <!-- Footer --> <div id="footer">{$HOOK_FOOTER} TEST </div> <div> TEST ></div> </div> {/if} </body> </html> No change takes place (checked the souce code). If some of you are familiar with WP themes, WP would take the code I typed and place it where it is supposed to be. Thanks for anwsers
×
×
  • Create New...