June 5, 20242 yr Hello, I did add a short_description field for each category in class and controller admin, it works instantly. Then I moved the code to do an override, after several hours it never worked.. I don't understand what is going on, as for products it works good with same technique overriding. The mystery remains 😞 TB version 1.5.1, on php 8 on a fresh install. Best regards.
June 5, 20242 yr Author 16 minutes ago, yaniv14 said: did you delete the cache/class_index file? Yes indeed. I am used to make overrides and usually it works.. but here on this 1.5.1 version it's a real mystery.. as it does nothing different thant the core code except error if the code or syntax is wrong. Thank you for your interrest @yaniv14 Edited June 5, 20242 yr by zen
June 5, 20242 yr that will be php8 issue, most likely this fix:https://github.com/thirtybees/thirtybees/commit/5de5f96760f01e5addbb5c045608c7dc5e863799 Update to 1.6
June 5, 20242 yr Author 17 minutes ago, datakick said: that will be php8 issue, most likely this fix:https://github.com/thirtybees/thirtybees/commit/5de5f96760f01e5addbb5c045608c7dc5e863799 Update to 1.6 I was suspecting something like this, but as the code is for PHP8 I didn't even try to change php version. Now I did update with coreupdater to bleeding edge 1.6.0 version and I create proper overrides.. and nothing happen, super strange 😞 😞 BUT for this case I don't need override anymore, as you did insert the additional_description for category as it has been done on Presta 8.x, well DONE !!
June 5, 20242 yr Author Now on this version, like on many other website with different TB and PHP version I got this warning in Core Updater : Changed files config/smarty.config.inc.php modified Edited June 5, 20242 yr by zen
June 5, 20242 yr 1 hour ago, zen said: ....as you did insert the additional_description for category as it has been done on Presta 8.x, well DONE !! Do you have an picture about this, please? I really want to see this details, as it is interesting for us since a long time and we did not get managed an solution.
June 5, 20242 yr Author 2 hours ago, DRMasterChief said: Do you have an picture about this, please? I really want to see this details, as it is interesting for us since a long time and we did not get managed an solution. Simply try TB 1.6.0 version and create or edit a category, you will find a new field for additional_description that can be used in front page, to have 2 descriptions on category page, like a short and long one.. then you can manage that in your theme to suits your needs for SEO and design.
June 5, 20242 yr ok, maybe i have to set up a new test ecosphere with tb 1.6 🙂 - i thought a short screenshot of this will help us all.
June 6, 20242 yr 15 hours ago, zen said: Now I did update with coreupdater to bleeding edge 1.6.0 version and I create proper overrides.. and nothing happen, super strange 😞 😞 Could you please share your override, so I can test? It should be still possible to override object model metadata 10 hours ago, DRMasterChief said: ok, maybe i have to set up a new test ecosphere with tb 1.6 🙂 - i thought a short screenshot of this will help us all. It's a simple change, new html field in back office: You will probably have to modify your theme to display this new field. Simply edit category.tpl file and include this new field at the place you want. You can take an inspiration from niara support commit: https://github.com/thirtybees/niara/commit/beedd63032237293b2be1d5fe1463144d2f82e12
June 6, 20242 yr Author Here is the file override/controllers/admin/AdminCategoriesController.php with a new filed 'short_description' before 'description'. AdminCategoriesController.php Edited June 6, 20242 yr by zen
June 6, 20242 yr 22 minutes ago, zen said: Here is the file override/controllers/admin/AdminCategoriesController.php with a new filed 'short_description' before 'description'. AdminCategoriesController.php 16.54 kB · 0 downloads It didn't work because your changes were overwritten by core. For example, in constructor, you assigned some data to fields_list variable, and THEN you called paren constuctor. Parent constructor assign it's own data to fields_list variable public function __construct() { $this->fields_list = [ // you changes to fields_list ]; parent::__construct(); // this call overwrites the fields_list } You should have called the constructor first, and then merge your changes: public function __construct() { parent::__construct(); $this->fields_list = array_merge($this->fields_list, [ // you changes to fields_list ]); }
June 6, 20242 yr Author Thank you Datakick, I learned something, it's the first time that an override does not work, now I know how to handle it.
June 7, 20242 yr Author I make an override of Category class and it works fine, the parent::__construct() was in first position like you show on core file already. Now I noticed something : when on back office on a category edit page, you can upload images for MENU only if the module block categories is activated, it seems strange, is there any reason for that ?
Create an account or sign in to comment