Best Practices to Follow in Magento Store Development

Posted by Deepa Ranganathan
4
Nov 20, 2015
343 Views
Image
Magento is the ideal platform if you want to have your own e-Store. It offers varied levels of customizations, and comes up with many extensions to help include features and functionality to improve the look and feel of your store. When developing your store with Magento, you will commit some mistakes. Here are a few development mistakes and best practices that you should take into consideration.

Magento Development and Deployment Issues/Mistakes

1. When creating an extension, you need to be very careful and check for the secure mode. Will you be using http/https in the URL is something you need to decide, to generate the correct URL

2. It is a mistake to copy-paste the standard XML file directly from the internet, as you may face some random errors because of this practice. Let’s say you have a module that does not require an admin router, it would be a good idea not to include the router in such cases

3. Use the data that you retrieve from Magento input data. Avoid the data that you are able to receive from _GET or _POST

4. Avoid conflicts that arise from name conventions for the new tables and XML layout that you are adding to your Magento store

5. When you are including routers for the front-end and admin, use different routers

6. Don’t use common CSS class/ ID which may cause conflicts or compatibility issues in the Magento store layout

7. Use prefix ob_ to name template folders

You may also hit a road block when deploying your store, if you commit certain basic mistakes. Here are some of the common deployment mistakes you tend to make for your Magento store.

1. Your Magento server may include high security protection and low permission levels. When setting file/folder permission, make sure you set the correct permissions

2. You should disable the Magento compiler just before deploying your store. If you are unable to access the backend, you should check config.php and comment the lines manually

3. Enable the cache before deploying your store. For this, you need to visit Admin>System>Cache Management

4. A full permission administration account should be checked into when deploying your store

5. Check why the extension works on Windows and not on Linux OS. Chances are you are facing issues related to uppercase/lowercase

Best Practices for Magento Production Development


1. Do you need to include CSS will depend entirely on the module you are considering. If you have to include CSS, you need to use the combination of CSS and JavaScript in the following manner
<script type="text/javascript">
function ob_includeCss(cssFile)
{
var head = document.getElementsByTagName('head')[0];
var css = document.createElement('link');
css.type = 'text/css';
css.rel = 'stylesheet';
css.href = cssFile;
head.appendChild (css);
}
ob_includeCss('http://www.myibsource.com/skin/frontend/default/default/joomlart/jmtabs/themes/methys/style.css');
</script>

2. If you want to have control on the template layouts, you should ideally use local.xml


3. When you are controlling the CSS layout, you should use margins instead of padding. The reason being IE has a bug in its W3C which hinders padding.

Conclusion

When you are considering Magento production development, you need to be careful about how you are securing the store, and what kind of permissions you are including for all the levels. Hire Magento Developers to help you build e-Stores to meet your business needs.

Comments
avatar
Please sign in to add comment.