Jump to content

Isb

Members
  • Posts

    38
  • Joined

  • Last visited

Everything posted by Isb

  1. I did this in the getLastInvoiceNumber() function in Order Class: return Db::getInstance()->getValue(' SELECT MAX(`number`) FROM `ps_order_invoice` WHERE `date_add` > MAKEDATE( EXTRACT( YEAR FROM CURDATE() ) , 1 ) '); and it works. Hovewer I'm not sure this is the best way to reset.
  2. Ok it was the table "ps_cms" that didn't have the column "indentation" :S i added that column and now it works. You can mark this thread as "Solved"
  3. I'm sorry if i'm replying here in english but i don't speak spanish, so i'll try to help you in english. So it seems that CMS.php has "indexation" in its fieldlist. So i overrided the CMS class by just commenting out the line "indexation" ( Line 50 ). Now it works. This seems to be a bug of the ps_cms table, who doesn't have the "indexation" column ( for SEO ). [EDIT] Or you can just add the column "indexation" into the ps_cms table without override.
  4. After a theme installation, I am unable to add or update cms pages. PS tells me, after pressing "save", that everything has been saved, when it is not true! This is the italian translation of the default "delivery" page: http://gyazo.com/1c5b990face3c7e4a69a8ea1f6754c70 After saving... http://gyazo.com/50382f7d2558e5619bec786baa4cdf1c The italian translation remains as the english version. Adding a page, instead, returns me empty fields and no page created. I have no sql cache enabled and the PS version is 1.5.6.1
  5. I have the same problem too, but i don't want to hide the "free shipping" label. Please PS staff, tell us what to do for this
  6. Hi guys, i can't understand why my module is not listed into the translation table. The code below is the same code of the other post: <?php if ( ! defined( '_PS_VERSION_' ) ) exit; class Skema extends Module{ public function __construct(){ $this->name = 'skema'; $this->tab = 'front_office_features'; $this->version = '1.0'; $this->author = 'Ivano Mercuri'; $this->need_instance = 0; $this->ps_versions_compliancy = array( 'min' => '1.5.4.1' , 'max' => '1.6'); parent::__construct(); $this->displayName = $this->l( 'Modulo Skema' ); $this->description = $this->l( 'Apporta modifiche al Front End' ); $this->confirmUninstall = $this->l( 'Lo vuoi disinstallare?' ); } public function install(){ if( Shop::isFeatureActive() ){ Shop::setContext( Shop::CONTEXT_ALL ); } if ( parent::install() && $this->registerHook( 'displayFooter' ) && $this->registerHook( 'top' )){ return true; }else{ return false; } } public function uninstall(){ return parent::uninstall(); } public function hookDisplayFooter( $params ){ $link = '<a class="reg" target="_blank" href="http://www.enuage.it/corner/">'; $testo_popup = sprintf( $this->l( 'Questo sito è dedicato esclusivamente ai rivenditori. Per essere abilitato e consultare i prezzi, registrati %s qui %s.' ) , $link , '</a>' ); if( ! $this->context->customer->isLogged() && $this->context->controller->php_self == 'index' ){ $this->context->smarty->assign( 'testo_popup' ,$testo_popup ); return $this->display( __FILE__ , 'skema.tpl' ); } } public function hookTop( $params ){ if( ! $this->context->customer->isLogged() && $this->context->controller->php_self == 'index' ){ $this->context->controller->addCSS( $this->_path . 'css/skema.css' , 'all' ); $this->context->controller->addJS( $this->_path . 'js/skema.js' , 'all' ); } } } Selecting "Installed modules translations" in BO, both "Core" or theme do not recognize my module strings to be translated. I tried ( by reading this ) to create the folder "/modules/name_of_the_module/translations/iso_code.php"... nothing. I tried with "/themes/name_of_the_theme/modules/name_of_the_module/translations/iso_code.php"... still nothing. I also tried to uninstall, install, reset, deactivate, activate, delete, upload the module zip, install it once uploaded... for the transtalation table, my module does not exists or it does not have any string to translate Could it be a permission problem? I'll attach my little module if someone want to test it skema.zip
  7. Actually, it worked... but it is the same algorithm, is it?
  8. Are you suggesting me to implement this way to see what will happen? public function install(){ /* if( Shop::isFeatureActive() ){ Shop::setContext( Shop::CONTEXT_ALL ); } return parent::install() && $this->registerHook( 'displayFooter' ) && $this->registerHook( 'top' ); */ return true; }
  9. Hi guys, this is the code of my module: <?php if ( ! defined( '_PS_VERSION_' ) ) exit; class Skema extends Module{ public function __construct(){ $this->name = 'skema'; $this->tab = 'front_office_features'; $this->version = '1.0'; $this->author = 'Ivano Mercuri'; $this->need_instance = 0; $this->ps_versions_compliancy = array( 'min' => '1.5.4.1' , 'max' => '1.6'); parent::__construct(); $this->displayName = $this->l('Modulo: Skema'); $this->description = $this->l('Apporta modifiche al Front End'); $this->confirmUninstall = $this->l('Lo vuoi disinstallare?'); } public function install(){ if( Shop::isFeatureActive() ){ Shop::setContext( Shop::CONTEXT_ALL ); } return parent::install() && $this->registerHook( 'displayFooter' ) && $this->registerHook( 'top' ); } public function uninstall(){ return parent::uninstall(); } public function hookDisplayFooter( $params ){ if( $_COOKIE['popup_isw'] != 'yes' ){ return $this->display( __FILE__ , 'skema.tpl' ); } } public function hookTop( $params ){ $this->context->controller->addCSS( $this->_path . 'css/skema.css' , 'all' ); $this->context->controller->addJS( $this->_path . 'js/skema.js' , 'all' ); } } It's a poorly code i edited from the documentation about the development of a module. If I install the module by clicking install, the BO shows me the successful installation of the module, without any errors... But the module itself is still uninstalled. These are two screenshots about this problem: 1) At the module line, it is installed, but the label next to the module title says it is not 2) At the top of Admin it says the module has been installed with no other warnings There are no php errors or other errors for PS. Any help to resolve this problem?
  10. Hi all, i can't change the prices of the products when i edit the id_tax_rules_group column in ps_products. Also the Tax rule in the product edit page does not change to the new rule i created before. I'm using the 1.5.4.1. I hope you can help me
  11. Buongiorno a tutti, sto cercando di comprendere il codice del core, e ho notato che le classi principali hanno la parola "Core" alla fine dei nomi. Però io se creo un nuovo oggetto, come new Product o new Category, non ho bisogno della parola Core. Mi potete spiegare come funziona? Grazie
  12. Hi all, I'm trying to comprehend the code, and i can't understand why the main classes have the word "Core" at the end of the class name itself. Actually i don't use the word "Core" while creating a new Object, like new Product or new Category etc. Can someone explain how this works? Thank you
  13. Oh God, thank you. I made a fool of myself
  14. Hi all, Is it possible to edit the meta tags in page "prices drop" ? I didn't find any help or function in BO to achieve this, so i ask if you can help me to resolve this issue. Thanks
  15. Buongiorno a tutti. E' possibile modificare i meta-tag nella pagina "riduzioni prezzi"? Non ho trovato nel BO nessuna impostazione che mi aiuti a riguardo e vi chiedo a voi se potete darmi una mano. Grazie
  16. I can't go further 512 MB ( Host limit ). Hovewer look at the first post, where there is an image of all categories
  17. Hi Karthik, like i said the actual memory limit is 512mb, not 64 or 32mb. I find very absurd that a third level menù require more than 512mb of memory to be rendered.
  18. Hi all, I have a problem with a menu module. I have this complex structure: and so on. The main problem is the frontend rendering: it prints me Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 9263430 bytes) in /home/wwwsite/isaytest.com/htdocs/stereomuch/modules/wdblocktopmenu/wdblocktopmenu.php on line 573 Now, is it possible that 512mb isn't enough to render a third-level menù? The function getCategory() of this module is almost the same as the getCategory() in the blocktopmenu module. This is the code: private function getCategory($id_category, $id_lang = false, $id_shop = false) { $id_lang = $id_lang ? (int) $id_lang : (int) Context::getContext()->language->id; $category = new Category((int) $id_category, (int) $id_lang); if ($category->level_depth > 1) $category_link = $category->getLink(); else $category_link = $this->context->link->getPageLink('index'); if (is_null($category->id)) return; $children = Category::getChildren((int) $id_category, (int) $id_lang, true, (int) $id_shop); $selected = ($this->page_name == 'category' && ((int) Tools::getValue('id_category') == $id_category)) ? ' class="sfHoverForce"' : ''; $is_intersected = array_intersect($category->getGroups(), $this->user_groups); // filter the categories that the user is allowed to see and browse if (!empty($is_intersected)) { if (count($children)) { $this->_menu .= '<li ' . $selected . ' class="parent">'; } else { $this->_menu .= '<li ' . $selected . '>'; } $this->_menu .= '<a href="' . $category_link . '">' . $category->name . '</a>'; $parent = 'parent'; if (count($children)) { $this->_menu .= '<ul>'; foreach ($children as $child) $this->getCategory((int) $child['id_category'], (int) $id_lang, (int) $child['id_shop']); $this->_menu .= '</ul>'; } $this->_menu .= '</li>'; } }
  19. Ok now everything is working! Thank you vekia!!!
  20. Ok now there is another problem: when i'm going to install the module ( via upload form ), it triggers the error "module not found", and if i try to uninstall the module, it triggers a fatal error: Fatal error: Call to a member function uninstall() on a non-object in /home/wwwsite/isaytest.com/htdocs/stereomuch/controllers/admin/AdminModulesController.php on line 574 I'm using the same zip i sent to you.
  21. Sure, here the download link.
  22. I found on the guide for module developing this text: hookDisplayLeftColumn(): will hook code into the left column – in our case, it will fetch the MYMODULE_NAME module setting and display the module's template file, mymodule.tpl, which must be located in the /views/templates/hook/ folder. So i did this in the first time, but it didn't work. Then i tried to put the tpl file into the root of the module folder and still no results At the moment the file is located in the module root.
  23. This is my module structure and inside the tpl, there is just a string : "THIS IS A TEST". I added the " / " sign, but in the front end the string isn't displayed
  24. You are right: the theme has the module folder inside. ( yes i am a dumb sorry ^^" but i am new to ps ) By the way i have another question about my module tpl file: this is my install code return parent::install() && $this->registerHook( 'top' ) && $this->registerHook( 'header' ); and this is my function for the tpl file public function hookTop( $params ){ return $this->display( __FILE__ , 'blockinfo.tpl' ); } Am i wrong in something?
×
×
  • Create New...