Author: Rohan pathak

Magento Step by Step tutorials 0

How To Get Table Name in Magento..?

Get Table Name in Magento : You can easily add table in Magento by using the following code. Suppose you need to get table name category_product. Table Name in Magento :...

Magento Step by Step tutorials

How To Get last order ID in Magento?

Magento Get Last Order Id : You can get last order Id in magento by using the following code in Model. $orders = Mage::getModel(‘sales/order’)->getCollection() ->setOrder(‘increment_id’,’DESC’) ->setPageSize(1) ->getFirstItem(); echo $orders->getEntityId() This...

Magento Step by Step tutorials 0

How to get coupon code applied on cart in Magento.?

Magento get coupon code applied on cart code You can use the following getCouponCode method to apply coupon code on cart in Magento $coupon_code = Mage::getSingleton(‘checkout/session’) ->getQuote()->getCouponCode(); You can follow...

Magento Step by Step tutorials 0

How to Get media url, js url, store url and home url in Magento?

To Get Media Url Syntax:- $mediaUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA); OR $mediaUrl = Mage::getBaseUrl(‘media’); To Get Js Url Syntax:- $jsUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS); To Get Store Url Syntax:- $storeUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); To Get...