Php tutorials for beginners with example

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...

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...

Php tutorials for beginners with example 0

wordwrap – PHP String Functions

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 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...

Php tutorials for beginners with example 0

nl2br – PHP String Functions

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...

Step by step Bootstrap 3 tutorials 0

Understanding Bootstrap 4 Modal

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...

Step by step Bootstrap 3 tutorials 0

Bootstrap collapse

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 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...

Magento Step by Step tutorials 0

How to get Current Customer Group id in Magento.?

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...