One of the most common customization in magento is to display reviews and ratings on the product page itself. This blog will show you how to render reviews and ratings on product page. Following are steps. Open your theme’s catalog.xml and include the following code inside block type=”catalog/product_view” [php] <!– For adding review page on […]
To Create a new theme first we have to understand the Magento Directory Structure /app – Here all the php codes of applications resides. /lib -The external code library. /skin -Here the css,js and images resides. /app Now we take a short brief of /app and /skin directory for theme creation. First we start with […]
There are many systems in PHP that follows MVC (Model-View-Controller) architecture. It is a robust design pattern that separates data access, business logic and user interface code. A typical MVC concept, Model: consists of application data and business rules. It communicates with the database get the information. In Magento, we have these files under “Model” […]
In magento by default currency selector renders in right side bar. To show it in the header is not a hard job. This blog will let you know about moving it to header of magento. First of all setup your desired currencies for your store from magento admin. Now create a new template file and […]
Creating a module which interact with a database table is quite simple. Most of the developers use magento module creator to create such a module. However, what if you want a module with multiple database tables. Following is the example of module with two database tables. Step 1. Create setup file of your custom module […]
Most people using JavaScript misunderstand the difference between ‘null’ and ‘undefined’. An unclear distinction between these two entities can lead to grave issues when using ‘null’ and ‘undefined’ in test cases. A variable is said to be ‘undefined’ if it has been declared, but no value has been given to it. Contrary to this, ‘null’ […]
Vimium is a chrome extension that provides keyboard shortcuts for web page navigation. So, if you also love mouseless browsing just like me, then you will definitely find vimium useful. Just to give an insight, for example, pressing f key will show a shortcut key corresponding to every link on the web page. Pressing the […]
We use “git log” many times a day while using Git in our projects. Sometimes we need to list Git commits between specific dates. Although, Git provides command to do this but the syntax is too long to type. So I created a script named timesheet, which facilitates us to display Git commits between two specific […]
Node.js is single threaded so it runs one process on a single CPU, as the power of Node.js is its performance and speed it doesn’t seem good to use only one CPU in a multi-core system. For utilizing all the CPUs, Node.js allows us to create a network of processes that all shares the same […]
In my recent project, I needed to copy the redis database from one server to another. Although redis provides SAVE and BGSAVE commands, I found another cool way of doing it. Log in to the new server and execute the following command in terminal: [bash] redis-cli slaveof IP-ADDRESS-OF-OLD-SERVER 6379 [/bash] The above command starts replicating […]
We are assuming that you have installed js2 in your system, in case if you have not installed js2, first install js2. First of all create a InheritanceTest.js2 file in scr directory with the content given below: [js] class Person { // Parent class var firstName; var lastName; function initialize(firstName, lastName) { // Constructor this.firstName […]
We are assuming that you have installed node.js in your system, in case if you have not installed node.js, first install node.js. To install js2 run the command given below: [bash] npm install js2 [/bash] Let’s create a simple Hello World project, but first let’s create a project directory structure: [bash] mkdir helloWorldJs2 cd helloWorldJs2 […]