Jump to content

amaneuz

Members
  • Posts

    18
  • Joined

  • Last visited

1 Follower

Profile Information

  • First Name
    dev
  • Last Name
    web

Recent Profile Visitors

221 profile views

amaneuz's Achievements

Newbie

Newbie (1/14)

2

Reputation

  1. thank's, i use the 1.7 version. ... public function displayProductListReviews($params) { $this->smarty->assign(array( 'note' => '3.8', 'nbParticipant' => '15245' )); return $this->hookDisplayFooterProduct(); } public function hookDisplayFooterProduct(){ return $this->display(__FILE__, '/views/templates/hook/blockproductminiature.tpl'); } ... and in my tpl file (blockproductminiature.tpl) : La participation est de {$nbParticipant}: La note: {$note}/5 <br/> {debug} but this not work.
  2. Hello everyone, I am creating a module, and I would like to add a text inside this block but I do not know how to do it: I do not know if to use a hook, and which one! Thank's!
  3. Yeaaaaaaaah thanks !! It's that !
  4. Hi, I have an error, when activate debug, i have this error: Whoops, looks like something went wrong. 1/1ContextErrorException in CartPresenter.php line 83:Notice: Undefined offset: 1 in /data/serveurweb/www.prestashop.monsite.com/htdocs/src/Adapter/Cart/CartPresenter.php line 83 at ErrorHandler->handleError('8', 'Undefined offset: 1', '/data/serveurweb/www.prestashop. I have not touched the file CartPresenter.php .. can u help me please?
  5. u want to say : echo $this->setTemplate(); or echo $this->template?
  6. I want to create a page on PrestaShop, so I create a file in the folder controller:/contollers/front/MapageController.php Then in this file I insert this code: class MapageControllerCore extends FrontController { public $php_self = 'mapage'; public $page_name = 'ma-page'; public $ssl = true; /** * Initialize Ma Page controller. * * @see FrontController::initContent() */ public function initContent() { parent::initContent(); $this->context->smarty->assign('content_only', 0); $this->setTemplate('costumer/mapage'); } } And I create a mapage.tpl file in the costum folder: /Themes/classic/templates/customer When I view the map in the browser, I get this error: [PrestaShopException] No template found for costumer/mapage at line 68 in file classes/Smarty/TemplateFinder.php 63. return $tpl; 64. } 65. } 66. } 67. 68. throw new PrestaShopException('No template found for '.$template); 69. } 70. 71. private function getTemplateHierarchy($template, $entity, $id) 72. { 73. $entity = basename($entity); TemplateFinderCore->getTemplate - [line 1340 - classes/controller/FrontController.php] - [4 Arguments] FrontControllerCore->getTemplateFile - [line 1236 - classes/controller/FrontController.php] - [3 Arguments] FrontControllerCore->setTemplate - [line 50 - controllers/front/SportsHiverController.php] - [1 Arguments] SportsHiverControllerCore->initContent - [line 201 - classes/controller/Controller.php] ControllerCore->run - [line 366 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 28 - index.php] someone can help me? Thank's
  7. Hello, I wanted to update my prestashop shop, and I installed the 1-click upgrade module. My update failed. My installed modules no longer appear on my site .. today I see that the domain name is missing in my URL (when I click on a link). I saw in my SEO page that it lacks the name of my shop. thank's for help! My prestashop version is: 1.7.0.2 Theme: Classic
  8. Bonjour à vous, Je suis entrain de créer un module prestashop et je bloque sur son installation, et ça m'affiche une erreur qui est dans la capture d'écran en piece jointe: if (!defined('_PS_VERSION_')) { exit; } class AvisNote extends Module { public function __construct() { $this->name = 'AvisNote'; $this->tab = 'front_office_features'; $this->version = '2.0'; $this->author = 'Nico DUPONT'; $this->need_instance = 0; $this->bootstrap = true; parent::__construct(); $this->displayName = $this->l('Note et avis'); $this->description = $this->l('Affiche la note ainsi que le nombre d'avis des clients'); $this->confirmUninstall = $this->l('Êtes-vous sûre de vouloir supprimer ce module?'); $this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_); } public function install() { if (!parent::install() || !$this->registerHook(array('header', 'footer', 'actionCustomerAccountAdd'))) return false; return parent::install() && $this->installDB(); } public function installBD() { return Db::getInstance()->Execute(' CREATE TABLE IF NOT EXISTS ``.`'._DB_PREFIX_.'avisnote` ( `id_avisnote` int(11) NOT NULL AUTO_INCREMENT , `url` VARCHAR(250) NOT NULL , `etat` int(2) NOT NULL , PRIMARY KEY (`id_avisnote`) ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8 ;'); } public function uninstall() { Configuration::deleteByName('AVISNOTE_LIVE_MODE'); Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'avisnote`'); return parent::uninstall(); } ... et Dans le back office, je n'ai ni les informations "auteur, version, description..." de mon module ni la fonction pour l'installer. je travaille sur la version 1.7.0.6 Dans la pièces jointe, la capture d'écran (j'ai placé le module manuellement dans le répertoire "module" pour ceux qui me demanderont comment il apparait dans le backoffice). Merci d'avance
  9. oui mais quand je l'insère dans {foreach form=filter item=filter}, ça m'affiche l'erreur Notice: Undefined index: mavariable alors que quand je fais juste {filter.mavariable}, ça m'affiche bien le contenu de mavariable
  10. Bonjour, J'ai inclus ce bout de code dans un fichier .tpl {literal} <script type="text/javascript"> $(function() { $( "#slider-range" ).slider({ range: true, min: {/literal}{$filter.mavariable}{literal}, max: 2000, values: [ 200, 1200 ], slide: function( event, ui ) { $( "#amount" ).html( ui.values[ 0 ] + " € - " + ui.values[ 1 ]+ " € " ); $( "#amount1" ).val(ui.values[ 0 ]); $( "#amount2" ).val(ui.values[ 1 ]); } }); $( "#amount" ).html( $( "#slider-range" ).slider( "values", 0 ) + " € - " + $( "#slider-range" ).slider( "values", 1 ) + " € " ); }); </script> {/literal} et j'ai droit à ce message d'erreur dans le debugger : 1/1 ContextErrorException in smarty_internal_templatebase.php(171) : eval()'d code line 63: Notice: Undefined index: filter Merci de votre aide !
  11. Bonjour, Je viens vers vous pour savoir comment on fait pour intercepter les variables smarty: exemple product['prix_min'] et product['prix_max']: foreach ($product_collection as $key => $product) { if (isset($filter_value) && $filter_value && isset($product['price_min']) && isset($product['id_product']) && (($product['price_min'] < (int) $filter_value[0] && $product['price_max'] > (int) $filter_value[0]) || ($product['price_max'] > (int) $filter_value[1] && $product['price_min'] < (int) $filter_value[1]))) { $price = Product::getPriceStatic($product['id_product'], $ps_layered_filter_price_usetax); if ($ps_layered_filter_price_rounding) { $price = (int) $price; } if ($price < $filter_value[0] || $price > $filter_value[1]) { unset($product_collection[$key]); } } } $smarty->assign(array('produits',$product)); // j'ai ajouté ces deux lignes $smarty->display(__PS_THEME_DIR__, 'templates/catalog/_partials/facets.tpl'); return $product_collection; je veux afficher dans le .tpl les variable prix_min et prix_max, du coup quand je mets : {$produits} dans le fichier facets.tpl, ça m'affiche rien. merci d'avance.
  12. j'ai tout fait pour résoudre le soucis ( en envoyant les fichiers d'origines sur le serveurs) mais rien ! j'ai tout réinstallé, pour résoudre le soucis ! :/ prestashop ne tiens vraiment qu'à un fil !
  13. Bonjour, j'ai téléchargé un module (menu), sauf que ce module ne m'affiche pas les sous-sous menu: voilà ce que je veux afficher: rubrique : menu 1: menu 1.1 menu 1.2 menu 1.3 menu 1.4 menu 2: menu 2.1 menu 2.2: menu 2.2.1 menu 2.2.2 ... dans le menu par défaut, l'affichage est normal mais avec ce menu, jai pas le " menu 2.2.1 et menu 2.2.2". Je vous poste la partie qui "tpl" qui gère les sous menu pour me dire ce que je dois a jouter ou modifier: {if $node.children|@count > 0} <ul> {foreach from=$node.children item=child name=categoryTreeBranch} {if isset($smarty.foreach.categoryTreeBranch) && $smarty.foreach.categoryTreeBranch.last} {include file="$branche_tpl_path" node=$child last='true'} {else} {include file="$branche_tpl_path" node=$child last='false'} {/if} {/foreach} </ul> {/if} merci d'avance !
×
×
  • Create New...