My Blog

November 19, 2012

Magento – Get Original Image URL of a Product

$productId = ‘SOME_PRODUCT_ID’; $product = Mage::getModel(‘catalog/product’)->load($productId); $productMediaConfig = Mage::getModel(‘catalog/product_media_config’);   $baseImageUrl = $productMediaConfig->getMediaUrl($product->getImage()); $smallImageUrl = $productMediaConfig->getMediaUrl($product->getSmallImage()); $thumbnailUrl = $productMediaConfig->getMediaUrl($product->getThumbnail()); more info: http://www.anyknowledge.com/magento-get-original-image-url-of-a-product/ http://www.magentocommerce.com/boards/viewthread/69911/
November 8, 2012

How to Get the Base Url for a specific Magento Store View

Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
October 16, 2012

How to Export Product like Goodle Base Xml in Magento

// Magento XML products exporter // by nirav chauhan // http://niravchauhan.wordpress.com/ require_once ‘app/Mage.php’; umask( 0 ); Mage::app( “default” ); Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); $_urlPath = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); $_imagePath = $_urlPath […]
October 16, 2012

Export Products To XML – Magento

setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); //echo getcwd(); $_urlPath = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); $_imagePath = $_urlPath . “media”; $_logFileName = getcwd().”export_products.log”; $_xmlPath = getcwd().”/var/export”; $xmlFile = $_xmlPath . “/” . “productexport.xml”; $doc = […]
October 16, 2012

How to redirect from the static page in magento

put End of the page: Ex: like custome order custom index menagement , custom add to cart etc in the end: $message = (‘Your cart has […]
September 29, 2012

How to show add Success message and add Error message in Magento

Show Error Message in frontend $message = $this->__(‘Email Id Already Exist.’); Mage::getSingleton(‘core/session’)->addError($message); Show Success message in frontend $message = $this->__(‘You have Register Successfully’); Mage::getSingleton(‘core/session’)->addSuccess($message);
August 28, 2012

Prestashop | Show Random Products In Home Featured

open /modules/homefeatured/homefeatured.php file find this : $products = $category->getProducts((int)($params[‘cookie’]->id_lang), 1, ($nb ? $nb : 10)); directly after that code, add this : if ($products) { shuffle($products); […]
August 17, 2012

add facebook share button in magento

<a name="fb_share" type="button" href="http://www.facebook.com/sharer.php?u=">Share [twitter-follow screen_name=’nirav1188′]
August 17, 2012

Finding the Online Customer in magento

You can easily find out number of online customer by the code in the content section useOnlineFilter(); echo “Online Customer “.count($collection); ?> Finding the Online Customer […]
0
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.


    X
    Request a Quote