Skip to main content

Posts

Showing posts from April, 2016

Different payment methods for different stores

Create a custom module.  Let’s call it Ankur_Pay.  Create these files:  app/etc/module/Custom_Pay.xml with this content  <?xml version = "1.0" ?> < config >     < modules >         < Ankur_Pay >             < active > true </ active >             < codePool > local </ codePool >             < depend >< Mage_Payment  />< Mage_Paypal  /></ depend > <!-- add here all the payment modules you have so this module will be loaded last -->         </ Ankur_Pay >     </ modules > </ config > app/code/local/Custom/Pay/etc/config.xml  <?xml version = "1.0" ?> < config >     < modules >         < Ankur_Pay >             < version > 0.1.0 </ version >         </ Ankur_Pay >     </ modules > </ config > app/code/local/Custom/Pay/etc/system.xml  <?xml version = "1.0" ?> < config >     < sections >

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