Previously I have written about Working With Ajax in Magento. And after a huge response I received from that post I was compelled to write more on implementing Ajax in Magento. And this time I want to say additionally about handling JSON (JavaScript Object Notation) along with Ajax, within the Magento enviornment. JSON Objects and Ajax can be very helpful technique to get the work done. You can learn about JSON from Here.
Twitter Update
-
Filed under - Custom Module, Magento, Tips No Comments so far. Add yours now
-
I had a time to research on Magento’s currency format and its display on Magento webshop. I then came across a block where I could change the format of currency display, in this case I am talking about moving the currency symbol to the right of the price value. In other words I found a way to show $10.00 as 10.00$. Notice the $ (Dollar) sign moving at the right of the price value.
Here’s a description of how this can be achievable. The basic idea is to rewrite Mage_Core_Model_Locale class’s currency function and add additional code. First you must write a rewrite code in your module’s config.xml.Continue reading “Displaying Currency code after the price value in Magento” »
Filed under - Magento, Tips No Comments so far. Add yours now
-
I recently came to a situation where I need to show a shipping price amount on cart before selecting the shipping address from the checkout page. Basically shipping price is shown after the user has added the shipping address and selected the shipping method. So to show shipping price on cart page load, I needed to find out the following.
- Shipping Address (Actually only country_id will work)
- Shipping Method (Set to Flatrate in the code below)
So what I did was first check if the user has already specified the shipping address (when user have added the shipping address in the checkout page and navigated back to cart page). If the shipping address is not present then I checked if the user is logged in and checked for default shipping address of the customer and used its country_id (if present), but if the user is not logged in or default shipping address is not present then I set the shipping address (country_id) to some country (NL).
After setting the country I then set the shipping method and then saved the quote so that the prices are calculated.
Continue reading “Magento: Setting Up a Default Shipping Method on Cart Page” »Filed under - Custom Module, Magento, Tips No Comments so far. Add yours now
-
Normally, I post tech stuff in my blog, but can’t get away from football world cup fever. And my friend broke a news that German coach will file a case against Spanish, claiming that Germans should have also got the ball during the play at semis, because they were also playing the same game.
Continue reading “Worldcup: German Coach to file a case against Spanish in FIFA” »
Filed under - Monologue No Comments so far. Add yours now
-
Magento’s Product Management GUI in back-end has Tabbed Navigation. There are two types of Tabs implemented there. One type of Tab is normal tab, loading content on page load while other type of tab has its content loaded by “Ajax”. Another interesting thing to note is that once the Ajax loaded tab’s content is loaded it will not “recall” Ajax to load its content, rather earlier loaded tab content is show. If are “confused” then just see how the “Categories” tab of the Product Management works.
Filed under - Custom Module, Magento, Tips 1 Comment so far. Add yours now
-
As a Magento Programmer I am fascinated by the use & simplicity of collection used in Magento. Simplicity, does not really mean being simple (it is rather complex structured) but easy to use. With the help of one of my colleague, I got down to understand how collection really represents the “collection” of data we are actually trying to get from database. Here is what I found drilling down into the Magento’s Core. I may be “not quite right” with the analysis, you can always comment.
Continue reading “Analysis & Usage of Collections in Magento” »
-
Nice Post I stumbled upon.. from www.eliasinteractive.com. This is a very helpful hack Lee has posted to reset order information while moving from development stage to production stage. I’d tried this in Enterprise Edition as well and it worked!
Filed under - Magento, Tips No Comments so far. Add yours now
-
I recently got to a situation where I needed to add a new frontend template for some module and after some action show the error or success message. Not the first time though
. Interesting thing was even if I added this code in the PHTML file.Continue reading “Solution: Error Message Not Showing up in Frontend in Magento” »
Filed under - Custom Module, Magento, PHP, Tips No Comments so far. Add yours now
-
Redirection in Magento’s controller is simple. You just need to call a _redirect() or _forward() function and provide appropriate router/controller/action parameter. But if you want to redirect to some other page from Model or from Observer, then this can be tricky. Lets take an example, for explaining what I am referring to, Suppose you are building a module that will only allow user of certain group to view a product in frontend. Then, you will have options like:
Continue reading “Redirect to some other location from Model or Observer in Magento” »
Filed under - Magento, Tips No Comments so far. Add yours now
-
When you log into adminstrator part of the Magento webshop, and look into the url you may see something like this.

Admin URL with Keys and Parameters
Continue reading “Generating Backend-Admin URL with Key and Parameters in Magento” »
Filed under - Custom Module, Magento, PHP, Tips 1 Comment so far. Add yours now