Skip to main content

Posts

CodeIgniter Disallowed Key Characters

Open libraries/Input.php (system/core/Input.php in CI version 2.0+) and locate function _clean_input_keys($str){, The whole block should look like so: function _clean_input_keys($str) {     if ( ! preg_match("/^[a-z0-9:_\/-]+$/i", $str))     {         exit('Disallowed Key Characters.');     }     return $str; } Modify the PCRE sot that it allows the new chars. Please not that the char thats missing is the .(dot) and you should always escape the .(dot) in Regular Expressions as they will otherwise allow any single char. /^[a-z0-9:_\/-\.]+$/i

create category using code

require_once 'app/Mage.php' ; Mage ::app( 'default' ); // Default or your store view name. //get a new category object $category = Mage::getModel( 'catalog/category' ); $category ->setStoreId(0); // 0 = default/all store view. If you want to save data for a specific store view, replace 0 by Mage::app()->getStore()->getId(). //if update if ( $id ) {    $category ->load( $id ); } $general [ 'name' ] = "My Category" ; $general [ 'path' ] = "1/2/23" ; // catalog path $general [ 'description' ] = "Great My Category" ; $general [ 'meta_title' ] = "My Category" ; //Page title $general [ 'meta_keywords' ] = "My , Category" ; $general [ 'meta_description' ] = "Some description to be found by meta search robots. 2" ; $general [ 'landing_page' ] = "" ; //has to be created in advance, here comes id