Download the PHP package okaeli/magento1-categorycode without Composer
On this page you can find all versions of the php package okaeli/magento1-categorycode. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package magento1-categorycode
Okaeli_CategoryCode
Description
Okaeli_CategoryCode is a Magento extension that will add a "code" attribute to categories.
The main purpose of this is to have a better unique identifier to manage categories (better than Id that could be dependent of the environment)
Installation
This extension can be installed with modman or composer.
Requirements
- Magento >= 1.6 (probably much earlier, but I didn't test)
Modman
Run modman link /path/to/your/clone/of/this/repo at root of your Magento Project.
Composer
In your composer.json file, add
in the repositories part and
in the require part.
Usage
Features
- If you have to update datas of a category in a data upgrade script for example, you should use :
Mage::getModel('catalog/category')->loadByAttribute('okaeli_category_code','here-the-code-of-the-category'); - If you need to update layout of a category and do not want to do it in the database, you should use the handle
catalog_category_code_HERE-THE-CODE-OF-THE-CATEGORY - You will find a shell script
okaeli_category_code_generate.phpthat can generateokaeli_category_codeattribute for each category.
Configurations
This module comes with some configurations :
-
System Config > Okaeli > Okaeli Category CodeBackend
-
Disable / Enable admin category code edition. (As the code should be used for design in layout, modifying it can break your design. So, it is strongly suggested to disable admin edition.)
Frontend
-
Enable / Disable frontend layout update.
Technical Notes
No rewrite. Events driven development.
This extension is 0 rewrite guaranteed. The following events are listened:
controller_action_layout_load_before: used to add custom handle.adminhtml_catalog_category_edit_prepare_form: used to disableokaeli_category_codeedition in admin.
Coding Standards
This extension has been checked with the Magento Extension Quality Program Coding Standard.
You can find the output of the command phpcs /path/to/Okaeli/CategoryCode/sources --standard=MEQP1 in this file.
Support
If you encounter any problems or bugs, please create an issue on GitHub.
Contribution
Any contribution is highly welcome. The best possibility to provide any code is to open a pull request on GitHub.