Unzipping archive files in Linux

Extracting archive file depends on the type. Here goes the list of extracting/unzipping command for various archive types: 1> Unzipping .zip file unzip filename.zip 2> Unzipping .tar file tar -xvf filename.tar 3> Unzipping .tar.gz or .tgz file tar -zxvf filename.tar.gz tar -zxvf filename.tgz 4> Unzipping .gz file gunzip file.gz 5> Unzipping .bz2 file bunzip2 file.bz2 …

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

Playing with Attribute Set in Magento

Introduction An attribute set is a collection of attributes which can be created/edited from Catalog -> Manage Attribute Sets in the backend. Some useful snippets regarding Attribute Set. 1> Getting Attribute Set Details $attributeSetModel = Mage::getModel(‘eav/entity_attribute_set’); $attributeSetId = 9; // or $_product->getAttributeSetId(); if you are using product model $attributeSetModel->load($attributeSetId); print_r($attributeSetModel->getData()); 2> Getting Attribute Set Id …

Read more

Magento utility function: How to easily create a select box for drop-down attributes?

From now onward I will be sharing custom utility functions on a regular basis which will make your programming life easier to some extent at least in case of Magento 🙂 Here I am going to share a utility function which will help you to create a select box for drop-down attributes(manufacturer, color, size, etc.) …

Read more