
Creativus Comunico
Members-
Posts
17 -
Joined
-
Last visited
Profile Information
-
First Name
Alexandre
-
Last Name
Massoutier
Creativus Comunico's Achievements
Newbie (1/14)
1
Reputation
-
Bonjour, Je reviens sur ce sujet car je bloque depuis plusieurs jours, et plusieurs jours c'est long.... J'ai bien suivi la procédure pour rapatrier mon site depuis OVH en local sur WAMP 3.0.6 64Bits PS v = 1.6.1.1. J'ai accès au backoffice sans problème ; j'ai désactivé le SSL et fais les modif dans la BDD. Mon problème : sur le frontend j'ai une page blanche et le navigateur tourne sans cesse ; côté serveur httpd.exe (apache de wamp) grimpe, grimpe consommant toujours plus de mémoire et de processeur... Je ne vois pas comment sortir de là... Une idée ? Est-ce arrivé à qqun ? Merci ! Alexandre
-
Bonjour, Je sais que ce sujet a déjà été traité mais les messages concernaient une version antérieure de PS donc je préfère recréer en précisant la version : 1.6.1.1 J'espère que quelqu'un pourra m'aiguiller... PROBLEME : Pour une adresse donnée localisée dans un pays créé France (Corse), aucun transporteur n'est reconnu. OR : Pays créé France (Corse) associé à une zone créée Corse Dans le transporteur créé je précise que les frais de port ne sont pas offerts, que les tranches sont calculées en €. J'indique une seule tranche de >= 0.000 à < 1000.00 pour la seule zone Corse (je souhaite que ce transporteur ne gère que cette zone). Option sélectionnée : Pour les prix hors tranches prendre la tranche la plus haute Je sauvegarde tout çà et tente de passer commande. J'ai bien vérifié que mon produit n'était associé à aucun transporteur afin d'appeler TOUS les ytransporteurs existants et que la sélection se fasse sur le lieu de résidence (ou pays). Mais là..... J'ai l'erreur : aucun transporteur trouvé... J'ai dû inventer un code Pays ISO pour la Corse... Le problème viendrait-il de là ? SOLUTION : ??? Quelqu'un a-t-il été confronté au problème ? Voili voilou ! Merci d'avance pour vos apports. Alexandre
-
Bonjour à tous, J'ai eu ce problème et il n'était pas causé par Prestashop. J'avais ajouté un formulaire de connexion / inscription dans ma NAV. De fait, sur la page ($page_name = "authentication") j'avais deux champs #email_create et le clic levait le premier champ vide de ma NAV et AuthController renvoyait donc false dans la procédure processSubmitCreate. Pour résoudre le problème j'ai simplement supprimé sur la page AUTHENTICATION mon formulaire d'inscription avec un {if} sur le page_name. A toutes fins utiles pour qqun qui aurait suivi le même chemin que moi. Alexandre
-
Missing css in my new admin controller
Creativus Comunico replied to elham_K's topic in Addons, modules and themes developers
Hello, I actually have the same problem. In my moduleAdminController I set $this->bootstrap = true; I also resgistered new hook to my module - hookActionAdminControllerSetMedia - and the adequate function to add JS & CSS resources. I uninstalled and reinstalled and both files are loaded. But template loaded is still noboostrap...? Has someone an idea please ? I of course managed to do it through JS by changing class of div #content but it doesn't appear to me as a 'clean' solution... Alexandre -
Controller Not Found
Creativus Comunico replied to Miqueloco's topic in Addons, modules and themes developers
Hello, I come back following info received from Roja45 on the forum. My problem came from the fact that I declared my class like AdminAnimalControllerCore extends ModuleAdminController. Core must be deleted because the dispatcher takes it out when building available classnames. Thanks Roja45. Alexandre- 5 replies
-
- 1
-
-
- controller
- module
-
(and 2 more)
Tagged with:
-
Thanks very very much Roja45 ! You saved me! As I felt it that was a naming problem... I let the 'Core'. So for readers, AdminControllers may be declared in your module directory/controllers/admin/ with class AdminMyNameController extends ModuleAdminController. My mistake was to add the Core at the end of my classname. Thanks again !
- 4 replies
-
- new module
- adminController
-
(and 2 more)
Tagged with:
-
Controller Not Found
Creativus Comunico replied to Miqueloco's topic in Addons, modules and themes developers
Hello everyone ! I am glad some had the same problem than me... of course not because I like when developers have problems but simply because I may find then a solution to mine... So basically I have the same problem ; my adminController is not found. My customized module is called myanimal. Problem description Module works fine when installing (creation of tables, insertion of resources in architecture...). This module has 2 front controllers that work fine too (creating animals). Now I want to add a tab in backoffice so that administrator can see animals created. I plan to use helpers, I just want a basic table list as we have plenty in PS. So I created an AdminAnimalController extending ModuleAdminController and set it in modules/myanimal/controllers/admin/AdminAnimalController.php When installing the module I create the new tab in backoffice right menu, under 'customers'. But when clicking on it I get 'Class 'AdminAnimalController' not found in BASE_DIR/classes/controller/Controller.php on line 134 I checked Controller.php ; it is logically about getController method and in my case the controller is not found. What I tried : Delete index_cache in BASE_DIR/cache Scrutinize database see if I had to save my controller in a routing table... I thought it could very well be a naming convention problem but when I look at other AdminControllers like AdminCarriersController it seems I am going fine...?? But ??? Quid ? Can someone help please ? See below my AdminController file. Alexandre <?php class AdminAnimalControllerCore extends ModuleAdminController { public function __construct() { // INCLUDE NEW OBJECT MODEL FROM MODULE DIRECTORY include_once(__DIR__.'../../../classes/MyAnimal.php'); $this->table = 'my_animal'; $this->className = 'MyAnimal'; $this->lang = false; $this->deleted = false; $this->colorOnBackground = false; $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); $this->context = Context::getContext(); // définition de l'upload, chemin par défaut _PS_IMG_DIR_ $this->fieldImageSettings = array('name' => 'image', 'dir' => 'example'); // This adds a multiple deletion button $this->bulk_actions = array( 'delete' => array( 'text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?') ) ); parent::__construct(); } // This method generates the list of results public function renderList() { // Adds a Delete button for each result $this->addRowAction('delete'); $this->bulk_actions = array( 'delete' => array( 'text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?') ) ); // Building the list of records stored within the "test" table $this->fields_list = array( 'id' => array( 'title' => $this->l('ID'), 'align' => 'center', 'width' => 20 ), 'id_customer' => array( 'title' => $this->l('CLIENT'), 'align' => 'left', 'width' => 25 ), 'name' => array( 'title' => $this->l('Name'), 'align' => 'left', 'width' => 'auto' ), 'date_birth' => array( 'title' => $this->l('Date de naissance'), 'align' => 'left', 'width' => 20 ), 'type' => array( 'title' => $this->l('Espèce'), 'align' => 'left', 'width' => 10 ), 'age_slice' => array( 'title' => $this->l('Tranche d\'âge'), 'align' => 'left', 'width' => 20 ), 'description' => array( 'title' => $this->l('Description'), 'align' => 'left', 'width' => 150 ), 'img_url' => array( 'title' => $this->l('Image'), 'align' => 'left', 'width' => 'auto' ) ); $lists = parent::renderList(); parent::initToolbar(); return $lists; } // This method generates the Add/Edit form public function renderForm() { return parent::renderForm(); } }- 5 replies
-
- controller
- module
-
(and 2 more)
Tagged with:
-
Yes of course. Heredown below is my module main file. Just a remark ; I tried in a template to display URL of my adminController with Context::getContext()->link->getAdminLink('AdminAnimal'). I notice that url created has a different token than the one attached to the tab. I don't really know if this is relevant for my problem but well it worthes mention it. Ok the code myanimal.php - installTab and uninstallTab // TAB PANEL FUNCTIONS private function installTab($tabClass, $tabName, $idTabParent) { $tab = new Tab(); foreach (Language::getLanguages(false) as $language) $tab->name[$language['id_lang']] = $tabName; $tab->class_name = $tabClass; $tab->active = 1; $tab->module = $this->name; $tab->id_parent = $idTabParent; return $tab->save(); } private function uninstallTab($tabClass) { $idTab = Tab::getIdFromClassName($tabClass); if ($idTab != 0) { $tab = new Tab($idTab); $tab->delete(); return true; } return false; } installTab is then called within module's install() method with $this->installTab('AdminAnimal', $this->l('Animaux'), Tab::getIdFromClassName('AdminParentCustomer'). Thanks for your help. Alexandre
- 4 replies
-
- new module
- adminController
-
(and 2 more)
Tagged with:
-
Hello, PS version 1.6.1.1 I need some help ; cannot figure out how to solve my problem. Here it is : I have a new customized module called myanimal. Problem description Module works fine when installing (creation of tables, insertion of resources in architecture...). This module has 2 front controllers that work fine too (creating animals). Now I want to add a tab in backoffice so that administrator can see animals created. I plan to use helpers, I just want a basic table list as we have plenty in PS. So I created an AdminAnimalController extending ModuleAdminController and set it in modules/myanimal/controllers/admin/AdminAnimalController.php When installing the module I create the new tab in backoffice right menu, under 'customers'. But when clicking on it I get 'Class 'AdminAnimalController' not found in BASE_DIR/classes/controller/Controller.php on line 134 I checked Controller.php ; it is logically about getController method and in my case the controller is not found. What I tried : Delete index_cache in BASE_DIR/cache Scrutinize database see if I had to save my controller in a routing table... I thought it could very well be a naming convention problem but when I look at other AdminControllers like AdminCarriersController it seems I am going fine...?? But ??? Quid ? Can someone help please ? See below my AdminController file. Alexandre <?php class AdminAnimalControllerCore extends ModuleAdminController { public function __construct() { // INCLUDE NEW OBJECT MODEL FROM MODULE DIRECTORY include_once(__DIR__.'../../../classes/MyAnimal.php'); $this->table = 'my_animal'; $this->className = 'MyAnimal'; $this->lang = false; $this->deleted = false; $this->colorOnBackground = false; $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); $this->context = Context::getContext(); // définition de l'upload, chemin par défaut _PS_IMG_DIR_ $this->fieldImageSettings = array('name' => 'image', 'dir' => 'example'); // This adds a multiple deletion button $this->bulk_actions = array( 'delete' => array( 'text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?') ) ); parent::__construct(); } // This method generates the list of results public function renderList() { // Adds a Delete button for each result $this->addRowAction('delete'); $this->bulk_actions = array( 'delete' => array( 'text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?') ) ); // Building the list of records stored within the "test" table $this->fields_list = array( 'id' => array( 'title' => $this->l('ID'), 'align' => 'center', 'width' => 20 ), 'id_customer' => array( 'title' => $this->l('CLIENT'), 'align' => 'left', 'width' => 25 ), 'name' => array( 'title' => $this->l('Name'), 'align' => 'left', 'width' => 'auto' ), 'date_birth' => array( 'title' => $this->l('Date de naissance'), 'align' => 'left', 'width' => 20 ), 'type' => array( 'title' => $this->l('Espèce'), 'align' => 'left', 'width' => 10 ), 'age_slice' => array( 'title' => $this->l('Tranche d\'âge'), 'align' => 'left', 'width' => 20 ), 'description' => array( 'title' => $this->l('Description'), 'align' => 'left', 'width' => 150 ), 'img_url' => array( 'title' => $this->l('Image'), 'align' => 'left', 'width' => 'auto' ) ); $lists = parent::renderList(); parent::initToolbar(); return $lists; } // This method generates the Add/Edit form public function renderForm() { return parent::renderForm(); } }
- 4 replies
-
- new module
- adminController
-
(and 2 more)
Tagged with:
-
Bonjour, Pour PS v1.6.1.1 Je donne la solution à un problème identique : pouvoir insérer des valeurs supérieures à 255 caractères pour les caractéristiques personnalisées. Le AdminControllerProducts dans sa fonction checkFeatures utilise un tableau $rules dans lequel il charge des valeurs via 'getValidationRules' qui je suppose est un appel dynamique à une fonction par son nom. Donc le object model doit être modifié - dans mon cas - FeatureValue dans sa $definition qui est un tableau des propriétés de l'objet. J'ai mis 500 pour l'attribut size au champ value des langues. Attention utilisez l'overide et effacer dans le dossier cache le fichier class_index.php qui charge les classes. Voir documentation. Par ailleurs pour que cela ne coince pas niveau DB il faut via PhpMyAdmin par ex. modifier la structure de la table feature_value_lang de varchar(255) à TEXT pour le champ value. J'espère que cela aidera qqun. Alexandre
-
Hello ! I have been looking for 2 days now in vain. I would like to change the number of thumbnails displayed on product page. Until now here is my understanding : JS is initializing serialScroll and Fancybox objects. Some global variables seem to be of interest like : serialScrollNbImagesDisplayed combinationImage Then we have two functions that appear relevant : serialScrollSetNbImages() which acts on var serialScrollNbImagesDisplayed ; it displays a number of thumbnails displayed of 4 as a maximum and based on resolution it is decremented. I tried fixing max to 3 and put some alerts in product.js file. Variable is changed but still I have 4 thumbnails. Then we have serialScrollFixLock() but I am not sure about what that latter really does. My guess is that it sets navigation buttons around thumbnails depending on what was clicked by user. So i did modifications but still I have those 3 thumbnails.... Has someone ever worked on that problem? Thanks ! Alex
-
Thank you so much Diurne ! You helped a lot ! I am getting slowly familiar with PS architecture and basics routines. I have still a long way to go but I am doing fine ! Just as a curiosity I didn't find configurationSave method in module parent class (perhaps your recommendation was to create one to store all messages in one shot...). But anyway I tried <return parent::display(basename(__FILE__), '/views/templates/admin/infos.tpl');> as the return of my extra info function and it worked well ! I have almost ended my first module. Terrifically efficient as a tool to build upon. Thanks Diurne for your help ! Alex
- 5 replies
-
- PS16
- COMMUNICATION
-
(and 3 more)
Tagged with:
-
Hello Diurne, I thank you very much for the time you took to replay to my trivial question. I will dig into information you provided and I may come back with some other questions. However 2 questions : 1) I wonder what you mean by a tab. For now I am doing fine with my very simple module (I let aside for now the question of moving some logics in a controller) and I am concentrating on getContent method to display a form in the "Configure' option you get in the button right after the module's name. I split the getContent into others (postValidation, postProcess) to make it more readable. So is a tab an option you can add in the button/list with 'Configure', 'Uninstall', 'Deactivate' and so on ? 2) If I wish to display customized message to my user above the form triggered by getContent -> DisplayForm, how can I simply do that ? I tried in a function located in mymodule to add to my html output the content of a template : return parent::display(__FILE__, 'infos.tpl') and added my tpl in /mymodule/views/template/admin; it doesn't work because it seems parent::display function is looking for a php file and not a tpl one... Can you clarify that ? Thanks again. Hope I am not annoying you with my questions... Alex
- 5 replies
-
- PS16
- COMMUNICATION
-
(and 3 more)
Tagged with: