Jump to content

Cawet

Members
  • Posts

    28
  • Joined

  • Last visited

Profile Information

  • First Name
    Anty
  • Last Name
    tata

Cawet's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. Bon c'est ce qui me semblais. Je vais arrêter de perdre du temps la dessus alors =D Vivement la 1.8 x)
  2. Bonjour, Quand on vient des frameworks comme Symfony ou Zend Framework, ou encore de CMS tel que Drupal, le concept d'override de Prestashop est assez déroutant. J'ai fini par m'y faire avec PS 1.6. Avec la 1.7, quand on parcours les documentations, on constate qu'il décourage au maximum l'override à la 1.6, ce que je trouve très bien (personnellement je trouve la 1.7 bien meilleur que les précédente version, contrairement à de nombreuse mauvaise langue ) . Cependant l'utilisation des hooks sont très vite limité et je ne trouve pas d'exemple concret sur les autre possibilité. Par exemple pour ajouter un champ a un formulaire du backoffice, tout les tuto que trouve utilise des override. Je voudrais par exemple ajouter un champs au formulaire d'ajout d'article du module PrestaPress. Je voudrais en suite filtré les listes d'articles en fonction de la valeur de ce champs. Je sais très bien faire avec un override, mais je ne vois pas du tout comment faire sans. Ce qui m'amène a ma questions: la volonté de Prestashop de nous faire abandonné le dossier override est il réaliste? Autrement dit est-il vraiment possible de développer un site sous PS 1.7 sans jamais utiliser le dossier override ?
  3. Hi, I can't make the "module_to_hook" config work properly : in themes/goninTheme/config/themes.ytml hooks: custom_hooks: #... modules_to_hook: displayNav: - ps_customersignin - ps_shoppingcart displayTop: - g_megamenu displayHomeTop: - ps_imageslider - ps_featuredproducts - ps_banner displayCategoryBottomDescription: - gonincommon then I remove the config/themes/.../shop1.json file, I click on the reset button in the theme configuration page of my theme in the back office. It's working for the "displayNav" and displayTop hook, but not for my custom hook "displayHomeTop". Anymore, some module are added at some hook that I don't want. How this configuration work, and how to not manually set module position every time the theme is reseted ?
  4. Hi, I need a solution for that to. Is there any other module to do that for prestashop 1.6? (we don't need you'r agile multiple seller module 'cause we already have a marketplace module
  5. Hello, In prestashop version 1.6.1.13 : When you duplicate a product from the catalogue, it copy all images and all resized images type, but not the high resolution images (x2). You have to regenerate ALL images every time. I found this : http://forge.prestashop.com/browse/PSCSX-9307 "This is how it work "? For me this is not a expected behaviour: In a shop i need all of a afternoon for each product duplication if i have to regenerate all images(thousands of products many images types), so the easiest and less expensive way a found is to copy images manually by ftp or ssh. Why is this not possible to copy also HD image if they are created and Configuration::get('PS_HIGHT_DPI') = true?
  6. In prestashop : Simple quote in translation is not escaped for javascript var, making all js on page proken. exemple : Media::addJsDef([ 'selectstate' => $this->module->l('Select State', 'sellerrequest'), ]); french translation : "Sélectionner l'État" resulting inline code : var selectstate = 'Sélectionner l'État '; Trying to replace tranlsation by "Sélectionner l\'État", but the escape is remove after saving. Prestashop version 1.6.1.13. It is the same for you ?
  7. Hi, what do you mean? The problem isn't that i don't know how to set the language id, i've got the same problem with this: $context = Context::getContext(); myId = 45654 ; $obj = new myObject($myId, $context->language->id); $obj->force_id = true; $obj->add(); I don't mean about the language id, i mean for the table id, for the language table =)
  8. hi, If a objectModel has the multilang options set to true in his definition, this code: $obj = new myObject($myId, $mylang); $obj->force_id = true; $obj->add(); while use 0 has id for the language table. i think is because of this line in the add method of the ObjectModelCore class: (491) // Get object id in database $this->id = Db::getInstance()->Insert_ID(); juste before the insertion in the lang table. change it to // Get object id in database if (isset($this->id) && !$this->force_id) { $this->id = Db::getInstance()->Insert_ID(); } make it work for me. Am I doing wrong, have got a miss configuration, or could we say that this is a core bug and i found a improvement ?
  9. has say in my first post, the error is throw from the Product Class. It occure because a full lazy loading is call for a product (in the formatCartArray), when at this time the cart context isn't setted yet (see the code piece i posted). And the cart context isn't setted yet, because the syncCarts method is call by the hookActionObjectCartUpdateAfter, and this last, in your and my shop, is triggered before the FrontController:initContent() method, witch set the cart Context. 1 all day to anderstood all of that, i hop this is clearest here than in my first post x) I temporaly solved this like this: private function syncCarts() { $context = Context::getContext(); if($context->cart ==null) return; } But what i don't anderstand, is what is this crapy result cause by this "die(Tools::displayError());" line, in the Product Class ? "Fatal error" string, no line, no file, nothing, and a ugly dumped data array when the dev mod is enabled. A classical Try catch with a classical throwed error class can show all the backtrace in one time, and it could save 1day investigation... The other thing i whant to know, is why the hookActionObjectCartUpdateAfter is call before the context is inited, in yours and mine shop, when it's not for the other shop magority. (meabe a module?)
  10. If i anderstand bbgun91, you've got mailchimpimplementation installed to ? But on you'r prod version there is also this module but everything is working without fatal error message ? What do you mean "since ou Prestashop has been modified ? " See the step 4 i describe in my previous post, the trigger is there, if i andesrtoud properly your question.
  11. hi, After installed the mailchimpintegration module, we got some white page with a "fatal error" message, when customer is conected with stuff in his cart. Code 200 , juste "fatal error" displayed, nothing else. If DEV mode , a huge array with customer data is displayed. event with xDebug activated, no backtrace, no line, nothing... After a long investigation time, i found that this is throw in the core class Product ObjectModel : public static function getPriceStatic(.....){ //... if (!$context) { $context = Context::getContext(); } $cur_cart = $context->cart; //..line 2806 if (!is_object($cur_cart) || (Validate::isUnsignedInt($id_cart) && $id_cart && $cur_cart->id != $id_cart)) { /* * When a user (e.g., guest, customer, Google...) is on PrestaShop, he has already its cart as the global (see /init.php) * When a non-user calls directly this method (e.g., payment module...) is on PrestaShop, he does not have already it BUT knows the cart ID * When called from the back office, cart ID can be inexistant */ if (!$id_cart && !isset($context->employee)) { //-> here is the throwed error: die(Tools::displayError()); // ligne 2814 } $cur_cart = new Cart($id_cart); // Store cart in context to avoid multiple instantiations in BO if (!Validate::isLoadedObject($context->cart)) { $context->cart = $cur_cart; } } For now, here is the state of my investigation : 1 - this method is call when you load product with the $full parameters. ex: new Product(456, true); 2 - if there is no cart data in context, and the method is call without a cart_id in parameters, and there is no employee logged : die(Tools::displayError()); 3 - i found that the cart data are set in the context instance in : FrontController:initContent() method. 4 - i found that mailchimp register the hook "hookActionObjectCartUpdateAfter" . this registre method load a product with the $full parameter (see 1). 5 My conclusion: there is somewere something that throw the ActionObjectCartUpdateAfte (so a saved cart object), before theFrontController:initContent() method. So now, here is my questions: a: why not a more explicite error message? b: how to go further? Thank's!
  12. Hi, I'd like to customize the form page rendered by the renderForm function of a AdminController in a module. For now i'm trying to put the tpl file here: modules/[mymodule]/views/templates/admin/[myctonrollername]/form/form.tpl myModule = Lilmquotingrequest (folder name (lilmquotingrequest) mycontrollername = lilmquotingrequestLandingpageModuleFrontController (file name: landingpage.php) I'want to do same as in the core, for exemple for AdminProcutController, but i don't andesrstand how it work. thank's!
  13. Bonjour, Dans un module j'ai un AdminController : AdminLilmQuotingController J'aimerai customizez la vue rendu par la fonction renderForm. public function renderForm() { $this->fields_form = array( // ... ) return parent::renderForm(); } A ma grande surprise je ne trouve rien dans la doc ou sur le web pour me permettre de faire sa simplement! j'ai essayer de mettre mon tpl ici : modules/[monmodule]/views/templates/admin/lilmquoting/form/form.tpl mais sa ne marche pas. J'ai essayer d'autre chemin, rien n'y fait. Comment s'y prendre? Merci d'avance!
  14. je pense que nous ferrons le poins d'ici 6mois, mais en gardant en tête 1 ans et 1/2, nous ferons donc la refonte graphique avant a mon avis, mais pas plus, car la 1.6 ne serra plus supporté a partir de fin octobre 2018.
  15. ok la réponse est clair. Votre expérience permettrait-elle de donnée un durée moyen ou le passage d'une version a l'autre devient acceptable, en se basant sur les fois précédente ? (6mois, 1ans?) Je pense quoi qu'il en sois que nous allons attendre que la 1.7 sois envisageable. Que pensez vous de la refonte graphique ? les différences sont-elle suffisamment énorme pour que l'on puisse parler d'un double travail ?
×
×
  • Create New...