May 22, 2012

Get store id and website id in magento

echo Mage::app()->getStore().’ ‘; /*Store Id*/ echo Mage::app()->getStore()->getStoreId().’ ‘; echo Mage::app()->getStore()->getName().’ ‘; /*Store code*/ echo Mage::app()->getStore()->getCode().’ ‘; /*Website Id*/ echo Mage::app()->getStore()->getWebsiteId().’ ‘; /*Store Name*/ echo Mage::app()->getStore()->getName().’ ‘; […]
May 22, 2012

magento get orders

//to get orders based on date range   $period_date_from = $this->getRequest()->getParam(‘report_from’); $from_date = strtotime($period_date_from); // begin date $period_date_to = $this->getRequest()->getParam(‘report_to’); $to_date = strtotime($period_date_to); // begin date […]
May 22, 2012

magento get attribute from products

//get attribute from a product based on name Mage::getModel(‘catalog/product’)->load($_product->getId())->getAttributeText(‘style’);
May 22, 2012

magento test credit card details

//magento test credit card details below:- Visa: 4111111111111111 MasterCard: 5555555555554444 American Express: 378282246310005 Use any expiration date in the future and as the CVV/CVC/verification code use […]
May 22, 2012

magento filter products

//filter for products whose orig_price is greater than (gt) 100 $collection->addFieldToFilter(array( array(‘attribute’=>’orig_price’,’gt’=>’100′), )); //AND filter for products whose orig_price is greater than (lt) 130 $collection->addFieldToFilter(array( array(‘attribute’=>’orig_price’,’lt’=>’130′), […]
May 22, 2012

linux search for a file

You can search for text within a directory with the below command. Please note that . refers to the current directory grep -r “search text” . […]
May 22, 2012

Magento fix for Fatal error: Method Varien_Object::__tostring() cannot take arguments

when you have installed the latest php 5.3 and magento 1.3 and you may get an error like: “Fatal error: Method Varien_Object::__tostring() cannot take arguments ” […]
May 15, 2012

Tips to Creating Magento Products by Scripts

<?php require_once ‘app/Mage.php’; $app = Mage::app(); ?> <?php $product = Mage::getModel(‘catalog/product’); $product->setSku(“ABC123hhsgfsgg”); $product->setName(“Type 7 Widget”); $product->setDescription(“This widget will give you years of trouble-free widgeting.”); $product->setShortDescription(“High-end widget.”); […]
May 9, 2012

js reference
Contact us

We are glad that you preferred to contact us. Please fill our short form and one of our friendly team members will contact you back.

    Request a Quote