Utilizing debug_backtrace() function for Magento debugging

Introduction As promised, back with the 2nd utility function for Magento (printDebugBacktrace). This function will help you to print the backtrace. As you know that Magento has so many classes and flow/interlinking of those classes’ methods are really vague. So this function will help you to debug/trace in such cases. printDebugBacktrace function looks like: public …

Read more

Playing with Dates in Magento

Playing with Dates in Magento

Introduction Being a PHP developer, you are no way hiding from PHP’s date() function. In case of Magento, it makes use of timezone which is configured from the backend (System > Configuration > General > Locale Options > Timezone) for formatting/displaying date/time. And this makes the results obtained with the PHP’s date() function and the …

Read more

Updating product qty in Magento in an easier & faster way

Updating product qty/stock in Magento

Introduction Product Qty can be updated via default import profile though but this is very slow and requires lots of CSV fields(besides SKU & qty) for updating. Today I am going to talk about updating product qty just by using CSV with two fields: SKU & qty(new) which is very fast enough even for thousands …

Read more

Using Magento header/footer outside of Magento

If you want to include the header and footer of Magento outside of it, say for example for third-party cms/application then you can use the following trick. Step 1: Using Magento Code outside of Magento <?php /** * @author MagePsycho <[email protected]> * @website https://www.magepsycho.com * @category using Header / Footer outside of Magento */ $mageFilename …

Read more