Search the Community
Showing results for tags 'Template'.
-
Buongiorno, non riesco a capire quale template html sta utilizzando il mio sito quando manda la mail di conferma ordine. Ho un tema child dove ci sono dei template, tra cui uno che si chiama "order_conf.html", ma anche modificandolo non vedo il risultato su di esso. Volevo capire quindi come sono gestite le scelte del template. Mi aspetto che per prima cosa Prestashop verifichi la presenza di un template nella cartella del tema child e successivamente nella cartella del tema standard. Mi potete aiutare a chiarirmi le idee? Grazie
- 2 replies
-
- ordine confermato
- stampa
-
(and 1 more)
Tagged with:
-
I recently manually upgraded a site from 1.6 to 1.7. There was a laundry list of complications I dealt with (including that the theme work had all been done in default_bootstrap and was thus essentially lost/had to be redone) but only one, at present, that continues to vex me. Specifically, when I attempt to view product categories on the main shop I am presented with a 500 error. So, if I went to https://<shop-url>/<category-name> I would get a 500 error. Turning debug mode on reveals the full extent of the error as: [PrestaShopException] No template found for [PROJECT_WEB_ROOT]/themes/[PROJECT_THEME_DIRECTORY]/category.tpl at line 73 in file classes/Smarty/TemplateFinder.php 68. return $tpl; 69. } 70. } 71. } 72. 73. throw new PrestaShopException('No template found for ' . $template); 74. } 75. 76. private function getTemplateHierarchy($template, $entity, $id) 77. { 78. $entity = basename($entity); TemplateFinderCore->getTemplate - [line 1403 - classes/controller/FrontController.php] - [4 Arguments] FrontControllerCore->getTemplateFile - [line 1294 - classes/controller/FrontController.php] - [3 Arguments] FrontControllerCore->setTemplate - [line 106 - controllers/front/CategoryController.php] - [1 Arguments] CategoryControllerCore->initContent - [line 281 - classes/controller/Controller.php] ControllerCore->run - [line 511 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 28 - index.php] Now, I went into the Smarty engine and added a few debugging lines to see what's what (hence why the exception isn't being thrown on line 68 as it ordinarily would), and here's where I found out why it can't find the template. It's looking in the following three paths: [PROJECT_WEB_ROOT]/themes/[PROJECT_THEME_DIRECTORY]/templates/en-US/[PROJECT_WEB_ROOT]/themes/[PROJECT_THEME_DIRECTORY]/category.tpl.tpl [PROJECT_WEB_ROOT]/themes/[PROJECT_THEME_DIRECTORY]/templates/[PROJECT_WEB_ROOT]/themes/[PROJECT_THEME_DIRECTORY]/category.tpl.tpl [PROJECT_WEB_ROOT]/public_html/themes/[PROJECT_THEME_DIRECTORY]/templates/[PROJECT_WEB_ROOT]/themes/[PROJECT_THEME_DIRECTORY]/category.tpl Above omitting specific directories in lieu of bracketed placeholders. Essentially, it appears that there's a full superfluous file system path being fed into the template finder. Like, rather than appending something like [templatename].tpl, it appends [full-path-to-template-plus-template-name].tpl, when it ought not. Does anyone know what could cause this and where to look and adjust to correct it? I'm not exactly familiar with Prestashop specifically, so tracing it back and finding a root cause is proving really time-consuming. I hope that someone in this community knows more about the software and can give me pointers as to where to look to find the source of this misbehavior. Additional information if it helps - this only seems to occur (I say "seems" because I haven't done a full accounting, but have definitely found lots of places it doesn't occur) for category view. So Smarty is being fed the correct template file paths under other circumstances.
-
How access 'active' attribute in the product template page // like this $product.active
-
Hi community. I have created this module after a request of @Anns Abz This module is in first steps of development and needs lots of things to do. But at first it can add address of delivery and invoice into the shipped.html template. This addition does not have any overrides and this is totally safe to install. Whenever you think that you do not need the email template edit just disable or delete the module and every thing goes back to normal. Download from github: https://github.com/stifler97/editemailsbeforesend Result Email:
-
Hi, I'm currently trying insert a couple of divs between the price and the add to cart button on the product page (example page below). I'd be fine with adding it before the price block as well. I've tried out using displayProductPriceBlock but it repeats multiple times across the different partials it's called in. Moreover, displayRightColumnProduct and displayLeftColumnProduct do not work as the default template is fullwidth and does not have the right or left columns. I've looked up custom hooks but it seems to need manual installation but that since I'm building a module, it need to be plug and play without client intervention. Anyone got any tips for me ? Thanks, Vaz
-
Hello, I'm trying to modify the layout of the frontpage and have for example two columns (hooks) inside the main container where I could attach modules. On the footer or the header it's easy because there are .tpl files (footer.tpl, product.tpl,...) I can edit and change the layout with bootstrap. But for the main container (where the carrousel and the products are), it's different. I located the "displayHome" hook in a controller and I don't know how to edit this...😬 I've spend hours trying to add new hooks on the homepage organized in multiple columns. The "displayHome" hook would be one of them. Has anybody an idea on how to add hooks on the homepage and change the layout easily (with bootstrap for example) ? 😀 Many thanks in advance for your help
- 5 replies
-
- displayhome
- hooks
-
(and 7 more)
Tagged with:
-
Bonjour, Je travail sur un prestashop version 1.6.1.18. Je souhaiterais ajouter au bon de commande au format pdf l'email du client. Pour cela j'ai regardé 2-3 tutoriel mais ceux-là s'applique généralement pour les factures. J'ai donc refait la même manipulation : dans : classes\pdf\HTMLTemplateOrderSlip.php 'customer_email' => $customer->email, entre les lignes : $this->smarty->assign(array( ... )); Puis dans le fichier : pdf\order-slip.tpl <tr> <td colspan="12"> {$addresses_tab}<br> {$customer_email} </td> </tr> Malheureusement ça n'a pas fonctionné. Avez-vous une autre astuce à me fournir ? Merci d'avance Bonne journée à vous
-
Hi, sorry for my english I'm developping a module who needs to use my custom cart-detailed.tpl when the cart is updated. I overrided the function displayAjaxRefresh in CartController to use the tpl in my module. But I can't use my cart-detailed.tpl file. I tested the full path, path starting with 'module/',... After a great number of test i tried to do the same thing with the original cart-detailed.tpl but only the path 'checkout/_partials/cart-detailed' worked. Is it possible to use my template file in this controller ? And with which path ? Thanks, Alpha4
-
Hi: I'm trying to setup a custom message both in my product page and product list page for product backorders, but I'm having a bit of an issue. In the product page it works as intended. Shows In Stock when theres stock for the combination selected, returns Backorder message when $product.quantity =< 0 and $product.allow_oosp is set, and shows an Out of Stock message when There are no units left and $product.allow_oosp is not set. Search results and various modules (like featured products) work like they're supposed to, returning the original $category.allow_oosp value. However in my product list (Category page) It returns In stock when $product.quantity_all_versions > 0 (as intended) and it ALWAYS defaults to out of stock when quantity for all combinations is 0 or lower, and what's more interesting, {$category.allow_oosp} value is ALWAYS 0. Is it possible the loop isn't returning that variable at all on product list? {if $product.quantity_all_versions > 0} <span class="stocklabel">{l s='In stock' d='Shop.Theme.Product'}</span> {else} {if $product.allow_oosp} <span class="stocklabel backorder">{$product.available_later}</span> {else} <span class="stocklabel oos">{l s='Not available' d='Shop.Theme.Product'}</span> {/if} {/if} All help is appreciated. I'm quite a newb, as you may notice 😕
- 3 replies
-
- product list
- smarty
-
(and 3 more)
Tagged with:
-
Hi, I have just started to fix our Prestashop site, but most fields (Name, Features etc) which is shown on frontend have capital letters (i.e. "My Product Is A Fine Product", instead of "My product is a fine product"). How can I set this? Do I need to set a css override, and how do I do that? Using Prestashop v1.7. With kind regards, - Johan.
-
Hello everyone, I'm having a problem with overriding the file in: src/PrestashopBundle/Resources/views/Admin/Sell/Order/Order/Blocks/View/products.html.twig. I'm currently working with 2 shops, one in version 1.7.7.2 and the other in version 1.7.7.5. I am able to override the template in the version 1.7.7.5. For some reason the file is not getting overridden in 1.7.7.2. I created the override in my module folder: {module}/views/Prestashop/Admin/Sell/Order/Order/Blocks/View. No idea what the problem might be, tried searching but with no success. Thanks to everyone in advance
-
salve a tutti mi trovo a comprare un template o un modulo menu e volevo un consiglio, quale conviene di più, anche ai fini di aggiornamenti e varie cose tecniche. saluti e grazie
-
- 46 replies
-
- breadcrumb
- template
-
(and 2 more)
Tagged with:
-
Je développe en ce moment un module et j'utilise le controller qui hérite du FrameworkBundleAdminController qui rend une vue avec le moteur de template twig mais la vue de mon template avec twig n'herite pas de celle du tableau de bord admin comme celle de la page de configuration de module, vous auriez une piste à me conseillez ?
-
Hallo zusammen, ich versuche mich seit einigen Tagen an der Instalation des Prestashop Advanced Templates auf der Azure Cloud Plattform. Ich habe alle Steps korrekt verfolgt und sämtliche Schnittstellen, VM`s, IP´s und Storages eingerichtet. Letztlich ist es mir auch gelungen auf die Frontend VM über Putty zuzugreifen, kann hier aber keine Prestashop instalation finden. Laut Template sollte ja eigentlich alles automatisch gehen. Muss ich die Shopinstalation noch irgendwie manuel anstossen? Als Anlage aktuelle Ordner auf der Frontend VM.
-
Hi, I have some difficulties to create a module front controller. Everithing seems fine (I used another controller of my module to create this one) but I have a fatal error … Type error: Argument 1 passed to smartyClassnames() must be of the type array, null given, called in /var/www/ps-bruno/classes/Smarty/SmartyLazyRegister.php on line 83 The controller is placed in «xlpos/controllers/front/Ventesc.php»: class XlposVentescModuleFrontController extends ModuleFrontController { public $auth = true; public $guestAllowed = false; /** * @throws PrestaShopException * @throws Exception * @see FrontController::initContent() */ public function initContent() { parent::initContent(); $this->setTemplate('module:xlpos/views/templates/front/1_7_ventesc.tpl'); $this->context->smarty->assign([ 'liste_ventes' => [], 'page' => 1 ]); } } The template is placed in «xlpos/views/templates/front/1_7_ventesc.tpl» : {extends file='customer/page.tpl'} {block name='page_title'} {l s='Purchases' mod='xlpos'} {/block} {block name='page_content'} <h6>{l s='Purchases you have made on the web AND in our shops:' mod='xlpos'}</h6> {if $liste_ventes && count($liste_ventes)} <table class="table table-striped table-bordered hidden-sm-down"> <thead class="thead-default"> <tr> <th>{l s='Purchase' mod='xlpos'}</th> <th>{l s='Date' mod='xlpos'}</th> <th>{l s='Amount' mod='xlpos'}</th> <th>{l s='View purchase' mod='xlpos'}</th> </tr> </thead> <tbody> {foreach from=$liste_ventes item=vente} <tr> <td>{$vente->vcentete_type|capitalize} #{$vente->vcentete_num}</td> <td scope="row">{dateFormat date=$vente->vcentete_date full=0}</td> <td>{Tools::displayPrice($vente->vcentete_totalttc)}</td> <td class="text-sm-center"><a href="#todo"><i class="material-icons"></i></a></td> </tr> {/foreach} </tbody> </table> {else} <aside class="notifications"> <div class="container"> <article class="alert alert-warning" role="alert" data-alert="warning"> <ul> <li>{if $page === 1 } {l s='You don\'t have any purchase!' mod='xlpos'} {else} {l s='No more purchase!' mod='xlpos'} {/if}</li> </ul> </article> </div> </aside> {/if} <nav aria-label="{l s='Purchase navigation' mod='xlpos'}"> <ul class="pagination justify-content-center"> <li class="page-item {if $page === 1 }disabled{/if}"> <a class="page-link" href="{$link->getModuleLink('xlpos', 'VentesCentralisees', ['page' => $page - 1], true)|escape:'htmlall':'UTF-8'}" tabindex="-1" {if $page === 1 }aria-disabled="true"{/if}>{l s='Newer' mod='xlpos'}</a> </li> <li class="page-item">{$page}</li> <li class="page-item {if count($liste_ventes) === 0 }disabled{/if}"> <a class="page-link" href="{$link->getModuleLink('xlpos', 'VentesCentralisees', ['page' => $page + 1], true)|escape:'htmlall':'UTF-8'}" {if count($liste_ventes) === 0 }aria-disabled="true"{/if}>{l s='Older' mod='xlpos'}</a> </li> </ul> </nav> {/block} My module listen the hook «displayCustomerAccount» and add 2 buttons : <!-- Module xlpos loyalty --> <a class="col-lg-4 col-md-6 col-sm-6 col-xs-12" id="xlpos-loyalty-link" href="{$link->getModuleLink('xlpos', 'Loyalty', ['id_externe' => $id_externe, 'identfidelite' => $identfidelite], true)|escape:'htmlall':'UTF-8'}" title="{l s='My loyalty' mod='xlpos'}" rel="nofollow"> <span class="link-item"> <i class="material-icons"></i> {l s='My loyalty' mod='xlpos'} </span> </a> <!-- /Module xlpos loyalty --> <!-- Module xlpos purchases --> <a class="col-lg-4 col-md-6 col-sm-6 col-xs-12" id="xlpos-ventesc-link" href="{$link->getModuleLink('xlpos', 'Ventesc', ['page' => 1, 'id_externe' => $id_externe, 'identfidelite' => $identfidelite], true)|escape:'htmlall':'UTF-8'}" title="{l s='My purchases' mod='xlpos'}" rel="nofollow"> <span class="link-item"> <i class="material-icons"></i> {l s='My purchases' mod='xlpos'} </span> </a> <!-- /Module xlpos purchases --> The «displayCustomerAccount» hook works fine (see ps_cust.jpg). But when I click on «My Purchases» I have an error (see error.jpg). I tried to clean the cache. When I remove the extends part of the template, the page is loaded … But it's ugly (the HTML contains only elements of the template file).
- 1 reply
-
- module
- front controller
-
(and 2 more)
Tagged with:
-
Bonsoir amis développeurs, Je développe actuellement un module pour PrestaShop 1.7.7.0 pour estimer une date de livraison en fonction des stocks des entrepôts. Mon but est actuellement d'afficher la date de livraison dans le mail de confirmation de commande. Ce que j'ai fais : J'ai créé les fichiers suivants dans mon module : Leurs contenus sont identiques à ceux d'origine, dans le dossier /mails à la racine, sauf que j'y ai rajouté : <tr> <td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-size: 0px; padding: 10px 25px; padding-top: 0; word-break: break-word;" align="left"> <div style="font-family: Open sans, arial, sans-serif; font-size: 16px; line-height: 25px; text-align: left; color: #363a41;" align="left">{delivery_date}</div> </td> </tr> pour les fichiers html et : {delivery_date} pour les fichiers texte. Dans le fichier principal de mon module, j'ai souscris aux deux hooks suivants : public function hookActionEmailSendBefore($params) { if ($params['template'] === 'order_conf') { $params['templatePath'] = $this->local_path . 'mails/'; } return true; } public function hookActionGetExtraMailTemplateVars($params) { if ($params['template'] === 'order_conf') { $orderId = $params['template_vars']['{id_order}']; $queryBus = $this->getQueryBus(); $deliveryDate = $queryBus->handle( new GetDeliveryDateForOrder($orderId) ); if ($deliveryDate) { $params['extra_template_vars']['{delivery_date}'] = $this->render( '@Modules/kjpreparationdelays/views/templates/hook/deliverydate.html.twig', [ 'deliveryDate' => $deliveryDate, ] ); } else { $params['extra_template_vars']['{delivery_date}'] = ''; } } } Le premier pour utiliser mon template order_conf à la place de l'original, le deuxième pour ajouter la variable delivery_date qui contient seulement une balise span. Je teste donc en passant une commande et voici ce que j'obtiens : Le tableau des produits est cassé. J'ai essayé de retirer le html que j'ai ajouté mais cela ne change rien : c'est le fait de remplacer le template qui pose problème. Ma question : Est-ce la bonne solution pour remplacer un template de mail ? J'ai bien lu la documentation suivante : https://devdocs.prestashop.com/1.7/modules/concepts/mail-templates/extend-a-layout-from-module/ Mais cette méthode ne me convient pas car le contenu est ajouté à la fin du mail. Ce n'est pas pertinent pour ma date de livraison, qui doit se trouver dans les informations de livraison. Si ma méthode est la seule possible, sauriez-vous donc pourquoi le mail est-il cassé alors que les contenus du template est exactement le même que l'original order_conf ? Merci pour votre aide, Kaudaj.
-
Hallo, ich habe Presta Shop 1.7.7 installiert und mir dazu ein Template gekauft. Und zwar dieses hier: https://addons.prestashop.com/de/themen-heim-garten/31549-modern-furniture.html Nach der Installation konnte ich gerade noch Eigenschaften anlegen. Nachdem ich versucht habe einen Artikel anzulegen, kann ich gar nichts mehr. Ich kann weder ein Foto im Artikel hochladen, noch kann ich die verknüpften Funktionen anklicken. Es passiert einfach nichts. Beim Foto öffnet sich noch nicht mal das Fenster zum hochladen. Auch kann ich die vorinstallierten Artikel nicht löschen. Kann mir jemand helfen? Ich werde die Website sonst löschen müssen. Bin ja ganz am Anfang. Nur kann das ja keine Dauerlösung sein. Würde mich sehr über Hilfe von Euch freuen. LG Maren L.
-
Da poco ho acquistato un template (Bos Medicor di Leotheme) installato correttamente ma alcune funzioni non vanno. Ho contattato lo sviluppatore ma mi chiede che ha bisogno degli accessi FTP e back end, per una maggiore sicurezza vorrei creare degli accessi dedicati (temporanei fin quando non risolve il problema, per poi cancellarlo) ma non so come fare. Qualcuno può aiutarmi.
-
Hello, i have a problem regarding changing the contents of the predefined Emails (order_conf, password_query, etc.) I copy the HTML, import it to Dreamweaver. I change Text and Style i want and then paste the code into Prestashop (Frontend). It looks good before saving.. then all the Formating is broken (see attached files) I use both 1.7 and 1.6 - same result. Also happens when i don't edit the code in an external Program. What am i doing wrong? Is there a css-override somwhere? Maybe someone could help me.
-
When registering a new client, the form's checkboxes do not perform any action when I click with the mouse. But they do work when I get to the checkboxes through Tab and Enter. This happens to me only with one theme, since when using the default theme, this does not happen. I have also tried to see the theme's css, but I can't find or understand how to find the problem with the google chrome inspector. I would greatly appreciate your help! link https://mercadocity.cl/iniciar-sesion?create_account=1
-
Hello! Is it possible to override the modern mail templates in a custom theme? I did not find documentation about it. For previous version of Prestashop, I was adding a mails folder in my custom theme and under a language specific folder, I was adding the mail I wanted to override. I have done the same with the latest version of Prestashop but it does not take into account my modification. Thx for any help
-
Bonjour, Lorsque je veux importer le thème MOVIC de mon ordi vers le backoffice, le message "Le fichier téléchargé est trop grand." s'affiche. C'est le développeur du thème qui me l'a fait parvenir. Ce thème fait partie du Starter Pack Prestashop. Auriez-vous une solution svp ? Merci d'avance Renaud
-
Bonjour, Je suis en train démarrer une boutique en ligne, et j'aimerai acheter un thème plus sympa que celui de base sur Prestashop. (v 1.7.6.8) Hormis la version compatible, quelles sont les choses auxquelles il faut porter attention lors d'achat d'un thème? Je suis intéressé par celui-ci : https://addons.prestashop.com/fr/themes-art-culture/31468-online-book-store.html#specifications Quelqu'un le connaît-il ? Merci par avance pour votre retour. Cordialement, Bertrand