background preloader

Tricks & Patches

Facebook Twitter

Post Order data to other Server After Successful Order In Magento. To update our store orders on some other website other than our magento store we need to send the orders details after successful order at our store.To do this we need to dispatch a method after success action.

Post Order data to other Server After Successful Order In Magento

So we need to create a module in our ocal folder of magento . Here our module name is Postdata with package name Letsknnowit OR we can write this code in any other module also. We need to write some code in config.xml and Observer.php. Custom Layouts and Templates with Magento. In the first part of this series, we learned the basics of Magento module development including the Magento directory structure, the custom module structure, and we created a basic "Hello World" module in order to understand how controllers work in Magento.

Custom Layouts and Templates with Magento

In this article, we will learn how to create blocks and layouts files. Specifically, we'll look at how layout files and blocks files work in Magento and we'll look at the rendering of layout files. If you're looking for a quick solution, there's a great collection of Magento themes and templates over at Envato Market. It's a great way to quickly build up a collection of high-quality low poly items for your project. But, on with the tutorial! As the name suggests, layout files are useful in rendering front pages of Magento. Module - Debugging layout XML loading. I'm using PhpStorm with Magicento and so I thought I would adapt @benmarks great answer to my usage.

module - Debugging layout XML loading

In PhpStorm, open up app/code/core/Mage/Core/Controller/Varien/Action.php and put a break point in method generateLayoutBlocks(). I think the point is to insert it anywhere before $this->getLayout()->generateBlocks();. I put it on the previous line. After you insert the breakpoint, indicated by the red dot on the left by the line number, you can right click it to customize behavior. Click "More" at the bottom to open up all options. Once you open that up, you check the box for "Log message to console" (optional) and "Log evaluated expression" (where the magic happens).

Common issues and solutions during Magento upgrade to 1.9. We believe that almost every Magento developer had a chance to work on Magento upgrade to the latest version, and almost in all cases the developers could face with different bugs.

Common issues and solutions during Magento upgrade to 1.9

Therefore, we would like to share few solutions for fixing the common issues that may occur during upgrading Magento to 1.9 version. 1. Issue description: the first bug that can be met is that after Magento upgrade a customer will not be able to log in to the account. Issue reason: is that the theme installed on the website does not support a variable called form_key. Solution: add the following code snippet right after to every of your login.phtml files for the theme: Take a look at the example of the path to the file: app/design/frontend/yourthemepackage/yourtheme/template/persistent/customer/form/login.phtml. 2.

Magento display tier prices instead. Show tier price on home page in Magento. Current community your communities Sign up or log in to customize your list. more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges.

Show tier price on home page in Magento

How Reduce Magento First Byte With Varnish Cache. Magento out-of-the-box takes over one second for the first byte.

How Reduce Magento First Byte With Varnish Cache

That means it takes the server over one whole second just to begin to render your page. It works a little bit like this: To put that into perspective, a good Time to First Byte (TTFB) should be under 200 milliseconds for static content. One second may not seem like a long time, but in the cyber world, it’s an eternity! Often times, people will do front-end optimizations like html & CSS Minification, images optimization, and others hoping that their Magento site will load fast, but even with all of these front-end optimizations, the site will still be slow.

How Reduce Magento First Byte With Varnish Cache. Configuring APC Cache For Faster Magento - Magik. Just to give you brief introduction of APC Cache; Alternative PHP Cache (APC) is a free and open opcode cache which provides free, open, and robust framework for caching and optimizing PHP intermediate code.

Configuring APC Cache For Faster Magento - Magik

If you tweak APC well you can even cache application data (user cache). Now, let me ask you this. Does your store despite all hard work still under performing? The right Magento Cache strategy for best performance. There are many blog posts about magento cache and how to configure it right.

The right Magento Cache strategy for best performance

In this blog post i want to explain which cache backend (File System, APC, Memcached, Redis) is recommended in which environment (single server, multi server) and how to configure it. Understanding Magento’s Two-Level Caching Magento uses by default the two level cache backend from zend framework. Basically it’s about storing cache records in two backends, in a very fast one (but limited) like APC or Memcached and in a “slow” one like file system. Each cache backend has it’s features. Speeding up Magento with APC or Memcached – Tutorials – Magebase. We often hear complaints about how Magento is slow and performs poorly.

Speeding up Magento with APC or Memcached – Tutorials – Magebase

Developers know, however, that performance is relative and that we can do a number of things to speed up a Magento site. This article will focus on configuring and using APC and/or Memcached. We have a resources section at the end of this article with links to more performance optimization techniques. The options obviously also depend on the specific hosting arrangement. I will assume for the purposes of this article, that you have control over your hosting server and are able to install the necessary add-ons and make configuration changes to Apache and PHP. Speed up Magento without Varnish Cache - The Alternatives - An authentic perspective. More often than not you should probably stay clear of implementing varnish in Magento until you’ve exhausted all other options.

Speed up Magento without Varnish Cache - The Alternatives - An authentic perspective

It seems like the Holy Grail in terms of performance and will literally make your site fly, the problem is Magento is a complicated beast and any extension you use that claims a quick integration with Magento couldn’t be further from the truth! (unless of course your using a stock site, unmodified.) It’s likely you will need a ton of customisation and debugging to any of the Varnish plugins you can buy off the shelf. Speeding up your Magento Store By Using the APC Cache. Speed issue in the Magento store is the Main factor we often here complaints about the page load and the poor performance of the Magento stores. In this post I am focusing on the speed optimization by using the APC Cache.

Here in this post I will describe how to install the APC Cache on the server and the APC Cache integration with the Magento. Here I am assuming that you have the root or sudo privileges of the server so that you can install the APC Cache on the server. Step 1. Installing the APC Cache on the server. Test if e-mails are working in Magento - Giel Berkers dot com. Adding Products to Your Magento Homepage. 5 Useful Tricks For Your Magento local.xml – Tutorials – Magebase. We have covered a lot about Magento’s layout XML in our past 2 articles [1] [2]. We saw that Magento will read the layout XML files in a specific order and that the local.xml file is read at the very end of the sequence.

This allows us to approach the implementation of new theme designs in a very modular and tidy way. Most of the time, we would use one of the Magento supplied themes as a starting point for a new theme. The base default theme gives us all the standard theme features and implements the complete Magento layout and phtml files but the theme is almost completely unstyled. Php - Magento custom layout local.xml not applying to custom module output pages. Magento Default Blocks Manual Removal Tutorial. Magento Bundle Product Type (Part 1) Bundle is a composite Magento product type with many useful properties, most prominent of which, in my opinion, is its flexibility. Bundles are usually understood as two or more products sold together.

Magento’s Bundle product type does that and more. It has features similar to that of other composite types, Grouped and Configurable, but also differs from them significantly. For example, product grouping is achievable in a simple form with the Grouped product type. Bundle type, however, allows more complex product combinations.

Uploading product images to Magento using Aoe_FilePicker. Last weekend at the Photo Hack Day 3 in San Francisco I met the guys behind They had just launched their service a couple of weeks ago and after playing around with this awesome service I couldn't stand integrating it into Magento by seamlessly replacing the existing uploader. is "a full-stack engine for working with user content" basically allowing users to get files from very different sources. implements interfaces to a couple of other services like Dropbox, GitHub, Facebook, Google but also comes with a nice drag'n'drop uploader for local files and even allows you to take pictures using your webcam.

My Aoe_FilePicker module replaces the default file upload functionality and allows you to use this great service. Magento use images on multiple Products - PixelPaul. So i have a client who has a lot of the same products in magento but with slight changes, so they use the same image for them all. and as many would know, in magento when you upload a product image you can’t use it again for another, you have to re upload it again. So it would be nice to have a image template system or image set you can assign to more then one product. So i asked a friend about this, and he shared a small extension he made with me to have image sets. but you could not assign it as a main image to use in the catalog so i added to add a bit. I had to do a bit of a rush job as i am about to go away for xmas so if you find some bugs please let me know, or if you improve it. it is a little limiting but does the job. you can download it here: prodimgshare upload the files, clear you cache, and under you catalog menu you will see image share.

Removing Product Comparison in Magento. As many things in Magento, removing product comparison is not available thru the admin interface. Thus, leaving us with the only option of getting down and dirty with theme files editing. This guide is pretty straightforward and is based on the Magento ver. Magento: Create A Sticky Menu In Magento. Add Following in code in template/catalog/navigation/top.phtml <script type="text/javascript"> jQuery(document).ready(function() { var stickyNavTop = jQuery('.nav-container').offset().top; var stickyNav = function(){ var scrollTop = jQuery(window).scrollTop(); if (scrollTop > stickyNavTop) { jQuery('.nav-container').addClass('sticky'); } else { jQuery('.nav-container').removeClass('sticky'); } }; stickyNav(); jQuery(window).scroll(function() { stickyNav(); }); }); </script>

Send Promo Code to New Registered Customer in Magento - Magento. Hello Guys, Checkout - Magento display tiered pricing for each product on cart page - Magento Stack Exchange. Current community your communities. Magento 1.9 - Showing if a product has a Tier price - Magento Stack Exchange. Current community. Removing Automatic Line Breaks <br> From Magento's Product Descriptions - Design Haven.