uniqid – PHP Function
Syntax : uniqid (prefix, more_entropy) ; Description : The uniqid() function generates a unique ID based on the microtime (current time in microseconds). This is an inbuilt function of PHP. ID...
Syntax : uniqid (prefix, more_entropy) ; Description : The uniqid() function generates a unique ID based on the microtime (current time in microseconds). This is an inbuilt function of PHP. ID...
In the below example, we will learn how to get the shopping cart information in Magento with respect their respective values of cart items, subtotal, grand total, billing & shipping...
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...
Syntax : wordwrap ( string, width, break, cut ); Description : wordwrap() function will Wraps a string to a given number of width using a string break character. Parameter : [table caption=”” width=”100%”...
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...
Syntax : string nl2br( string , use_xhtml); Description : It is an inbuilt function of PHP. nl2br() function inserts HTML ( <br> or </ br> ) line breaks before all...
In this blog we are going to learn to get custom options values for all products in Magento with any specific order. Product might have custom option dropdown list and...
Bootstrap Modal: This dialog box/popup window which will be displayed on top of the current page in the form of Window disabling the background window. Once you click on the...
Bootstrap Collapse: With this JS functionality in Bootstrap you can hide or show content which will open only when you click on the element. This can also be used as...
Magento Get current module name, controller name, route name and current action name To find these important values you need to understand the use of below code with effective measures....
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...
Skin and Base url in Magento With Skin and Base URL you can get the right folder information and make changes as required. Get Base Url: Mage::getBaseUrl(); Get Skin Url:...
Magento get simple product from configurable :- To begin with configurable products are collection of simple products only. It is necessary to have simple products to make a configurable products....
There is default functionality to get all Customer data information from the databased with fist name, last name, email, status, phone, address and so on. Below code when runs give...
If you are looking to get the current date and time with specific format being used currently from the database then use the following code with specific syntax to get...
With the following code one can easily get the specific Current customer group id with logged in or session information. Mage::getSingleton(‘customer/session’)->getCustomerGroupId(); is used to get current customer group id details...
Get Sub Categories of Categories in Magento: You can get the desired result for displaying all the sub-categories of a particular categories by using the below code accordingly whether it...
Magento Show Categories on Homepage There are different ways to get Magento Categories on homepage or any custom page. Here we are going to discuss with them syntax or code...
Magento join two tables: To join two custom table in the database you need to add specific query with table to get the desired result. Here is the code that...
To get Last Insert Id in Magento you have to use specific code that will get you the desired result accordingly. With below given code you will be able to...