Blog: Extra-ordinary

Some sorting example in paython.

>>> sorted(5, 2, 3, 1, 4,8,9,7) output : 1, 2, 3, 4, 5, 7, 8, 9 list.sort() method : >>> a= 5, 2, 3, 1, 4,8,9,7 >>> a.sort() >>> a output : 1, 2, 3, 4, 5, 7, 8, 9 Key Functions : >>> sorted(“a key parameter to specify a function to be called on each list element prior to …

Continue Reading

Advantages and Disadvantages of Magento

Advantages of Magento It is open source, so it’s easy to be popular and everyone can use it. Since Magento is 100% open source platform, lots of Magento extensions including free and paid ones are available to enhance of the power of   Magento Ecommerce on your store. Magento is built to scale from 1 to a million, avoiding common pitfalls …

Continue Reading

How to Run Magento Code Externally?

Sometimes need to use Magento functions and classes from outside of the Magento platform. Please check the following code. <?php require_once(‘app/Mage.php’); //Path to Magento umask(0); Mage::app(); // Insert your code If you want run this script just save at your own name like upload.php run your script www.example.com/upload.php Hope it will help you.        

Continue Reading

How to migrate magento from one server to another?

Several way you can move server, one of the most easiest way. Follow the below Step: 1) Back up the files in the server 2) Export the Databse 3) Move the files to the new server 4) Import the databse to the new server 5) Edit the database details . please update the file “app/etc/local.xml”, with the latest Database details …

Continue Reading

Important functions list in Magento

General Related functions $this->getRequest()->getServer(‘HTTP_REFERER’); Product related functions $product->getName() $product->getSku() Mage::getModel(‘cataloginventory/stock_item’)->loadByProduct($_product)->getQty() $product->getResource()->getAttribute(‘color’)->getFrontend()->getValue($product) $product->isSaleable() $product->isisAvailable() Mage::getModel(‘catalogrule/rule’)->calcProductPriceRule($product,$product->getPrice()) $product->getTierPrice(1) Newsletter related functions $subscriber = Mage::getModel(‘newsletter/subscriber’); $subscriber->subscribe($user_mail); Cache Related functions $tags = array(Mage_Catalog_Model_Category::CACHE_TAG); //Category block tag Mage::app()->cleanCache($tags) Product images Related functions $_product->getMediaGalleryImages()->getItemByColumnValue(‘label’, ‘LABEL_NAME’)->getUrl() Customer related functions $this->helper(‘customer’)->isLoggedIn()

Continue Reading

How to Password protecting your development site with .htaccess or .htpasswd?

It is very simple just follow below instruction: Step 1 : Create a .htaccess file and upload to your server to the root of your dev site with the following content: AuthName “Authorisation Required” AuthUserFile “/path/to/.htpasswd” AuthType Basic require valid-user ErrorDocument 401 “Authorisation Required” N.B. : If .htaccess file already exists then you can add the above code on the …

Continue Reading

What is AngularJs ?

AngularJS is an open-source JavaScript framework, maintained by Google, that assists with running single-page applications. Its goal is to augment browser-based applications with model–view–controller (MVC) capability, in an effort to make both development and testing easier. The library reads in HTML that contains additional custom tag attributes; it then obeys the directives in those custom attributes, and binds input or …

Continue Reading