Archive | Magento RSS feed for this section

Magento version 1.8 available to Download

10 Oct

Finally wait is over for new version. New Magento version 1.8 is available,Are you happy with 1.7? if yes that’s good but you can try the newer version. Download it from here.
1. Security Updates :- The security feature of the system has witnessed a major overhaul with the recent update….

Advertisements

Programmatically update coupon expiry date in magento

4 Oct

 
In my last post, I have discussed on how to update the expiry date of coupon via SQL Query in magento. In this post I am giving an alternate method of updating the expiry date of coupon and believe that it is a better way than the raw query. Below is the code which will update the expiry…

How to update expiry date of coupon in Magento

3 Oct

I have asked by one of my colleague to update the expiration date of coupon code in Magento, I thought of writing a script which will update the date of all coupon. Suddenly thought of a shortcut method and updated in database.
Here is the simple query:-
UPDATE salesrule_coupon set…

Blog Shifted

13 Sep

Dear Friends,

I got lot of support from you and I am very happy to let you know that Finally I have migrated from WordPress Hosting to own hosted Blog.

Yes, I believe WordPress is the best blogging platform available in market. So I have used wordpress again for my blog.

Here is a link for my New Blog :- http://mukundtechie.com

I request all my followers to visit my site and suggest me, What can be done to make it more interactive and pleasing to see posts.

All your feedback and suggestions are welcomed.

Thanks,

Mukund Chaudhary

New Blog : http://mukundtechie.com

 

Tips for making mobile friendly website

7 Sep

Over past few year mobile usages has seen a revolution. People not only uses mobile for communication but they use it for various purposes, Online line shopping to ticket booking and all. But Unfortunately mobile arena is not so simple for developers and designers to handle as there is lot of complexity involved in cross browser. The vast number of mobile devices makes thorough testing a practical impossibility, leaving developers nostalgic for the days when they only had to support legacy browsers.

According to IDC,Android and iOS Combine for 92.3% of All Smartphone Operating System Shipments in the First Quarter While Windows Phone Leapfrogs BlackBerry.

IDC Reports on mobile published_ichart_173696

 

 

 

 

 

 

 

 

 Image Credit : IDC – Press Release

Also Check this report.  http://www.icharts.net/chartchannel/worldwide-smartphone-os-share-2012-q1-2013-q1_m3zryyngc

Mobile device have reduced screen size,So let’s tackle these issues one at a time and create a road map for mobile web development:

Implement Mobile Stylesheets

The first step to adding mobile support to a website is including a special stylesheet to adjust the CSS for mobile devices:

One approach to including mobile stylesheets involves detecting the user agent string with a server-side language such as PHP. With this technique, the site detects mobile devices and either serves an appropriate stylesheet or redirects the user to a mobile subdomain, for instance m.facebook.com. This server-side approach has several advantages: it guarantees the highest level of compatibility and also allows the website to serve special mark-up/content to mobile users.

Alternately, the easiest approach involves detecting the mobile device on the client side. One of the earliest techniques for including mobile  stylesheet’s media type, for instance:

<link rel=”stylesheet” href=”site.css” media=”screen” />
<link rel=”stylesheet” href=”mobile.css” media=”handheld” />

The first site.css targets desktops and laptops using the screen media type, while the second mobile.css targets mobile devices using handheld.

Since mobile devices typically have smaller screens, we can target handheld devices by detecting screens that are 480px and smaller:

<link rel=”stylesheet” href=”mobile.css” media=”only screen and (max-device width:480px)”/>

Use Advantage of HTML 5


<input type=”tel” />
<input type=”email” />

These input types allow devices such as iPhone to display a contextual keyboard that relates to the input type. In the example above type=”tel” triggers a numeric keypad ideal for entering phone numbers, and type=”email” triggers a keypad with @ and . buttons. For complete list of HTML 5 input type click here.
SPECIAL IPHONE / IPAD ENHANCEMENTS

Take a look at Sencha Touch, jQTouch and iui. These three Javascript libraries allow you to better interface with the iPhone, and also work on similar devices such as Android. Additionally, keep an eye on the much anticipated jQuery Mobile which has just been released in alpha.

For creating special iphone-icon. Save a 57 x 57 pixel PNG somewhere on your website, then add this snippet within your <head> tag:

<link rel=”apple-touch-icon” href=”/customIcon.png”/>

Hope this post helps you to make a mobile centric site. All comments are welcome either any suggestion,feedback or any query.

How to get Controller, Module, Action & Router Name in Magento

6 Sep

In most of the case you need to know the name of controller or module in order to debug. Simple one line code to get these. In my previous post written about skill a developer must have. So targeting developer this is another post for them

1. Get Controller Name In Template Files:

$this->getRequest()->getControllerName();

2. Get Action Name In Template Files:

$this->getRequest()->getActionName(); //the function inside the controller

3. Get Router Name In Template Files:

$this->getRequest()->getRouteName();

4. Get Module Name In Template Files:

$this->getRequest()->getModuleName();

Finding Controller, Module, Action & Router Name In Class Files:

5. Get Controller Name In Class Files:

Mage::app()->getRequest()->getControllerName();

6. Get Action Name In Class Files:

Mage::app()->getRequest()->getActionName();

7. Get Router Name In Class Files:

Mage::app()->getRequest()->getRouteName();

8. Get Module Name In Class Files:

Mage::app()->getRequest()->getModuleName();

These functions i.e. getControllerName, getActionName, getRouteName, getModuleName are present in the class Mage_Core_Model_Url, you can display all the results by taking a vardump as
var_dump(Mage::app()->getRequest());

Hope this make sense to you and help you in debugging. Happy coding..:)

How to optimize the performance of a website.

3 Sep

Performance of a web page play a key role in conversion rate of your website. A fast website gets more user automatically. I decided to write on how to make the web pages loads faster.

Optimise performance of website

Optimize performance of website

If your answers is yes then, there are some of golden rule to be followed to make your site loads faster. They are as below:-

Rule 1: Make Fewer HTTP Requests

HTML take 10-20% time only however 80-90% of time spent in making HTTP requests for all the components (images, scripts, stylesheets, Flash, etc.) referenced in the HTML document. Using techniques as below, we can reduces response times of the pages by as much as 50%

  • Image Maps
  • CSS Sprites
  • Inline Images
  • Combined Scripts and Stylesheets

Rule 2: Use a Content Delivery Network
Content Delivery Networks (CDN) is a large distributed system of servers.The goal of a CDN is to serve content to end-users with high availability and high performance.

Rule 3: Add an Expires Header
A web server uses the Expires header in the HTTP response to tell the client how long a component can be cached.In Apace ExpiresDefault is set to 10 year.

Some useful techniques are as below:-

  • Expires Header
  • Max-Age and mod_expires
  • Empty Cache vs. Primed Cache
  • More Than Just Images
  • Revving Filenames

Rule 4: Gzip Components
Compression is a simple, effective way to save bandwidth and speed up your site. Smaller the file, faster it will loads.If you are using Apache, see how it work
Rule 5: Put Stylesheets at the Top
Put all your stylesheets at the top and remove unused content.
Rule 6: Put Scripts at the Bottom
Put script at bottom as anything below the script is blocked from rendering and downloading until after the script is loaded.
Rule 7: Make JavaScript and CSS External
Use external javascript and css as much as possible.

Rule 9: Reduce DNS Lookups
The Domain Name System (DNS) maps hostnames to IP addresses, just as phonebooks map people’s names to their phone numbers.DNS lookups add delays to the initial requests to a host. Making requests to a large number of different hosts can hurt performance.

Rule 10: Minify JavaScript
Always minify your javascript or css. There are various online tools available.(http://minify.avivo.si/#results)

Rule 11: Avoid Redirects
Redirects increase the load time as it has to look up two different address. Try to avoid redirects.

Rule 12: Remove Duplicate Scripts
Duplicacy in code normally happens but it can hurt your performance. So try to remove duplicacy in the code.

This article is based on Steve’s book High Performance Web Sites, published by O’Reilly.]

%d bloggers like this: