Okaeli_CategoryCode extension for Magento 1
@category Okaeli @package Okaeli_CategoryCode @author Julien Loizelet <julienloizelet@okaeli.com> @copyright Copyright (c) 2017 Julien Loizelet @license GNU GENERAL PUBLIC LICENSE Version 3
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), (*1)
This extension can be installed with modman
or composer
., (*2)
Run modman link /path/to/your/clone/of/this/repo
at root of your Magento Project., (*3)
In your composer.json
file, add, (*4)
{ "type": "vcs", "url": "https://github.com/julienloizelet/magento1-categorycode" }
in the repositories
part and, (*5)
"okaeli/magento1-categorycode":"dev-master"
in the require
part., (*6)
Mage::getModel('catalog/category')->loadByAttribute('okaeli_category_code','here-the-code-of-the-category');
catalog_category_code_HERE-THE-CODE-OF-THE-CATEGORY
okaeli_category_code_generate.php
that can generate okaeli_category_code
attribute
for each category.This module comes with some configurations :, (*7)
System Config > Okaeli > Okaeli Category Code
, (*8)
Backend, (*9)
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.), (*10)
Frontend, (*11)
Enable / Disable frontend layout update., (*12)
, (*13)
This extension is 0 rewrite guaranteed. The following events are listened:, (*14)
controller_action_layout_load_before
: used to add custom handle.adminhtml_catalog_category_edit_prepare_form
: used to disable okaeli_category_code
edition in admin.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., (*15)
If you encounter any problems or bugs, please create an issue on GitHub., (*16)
Any contribution is highly welcome. The best possibility to provide any code is to open a pull request on GitHub., (*17)