Subesh Pokhrel's Blog – Magento Development Tips,PHP,Google Maps
PHP & Magento Tips & Tutorials

Using Custom Query in Magento

Posted on December 8, 2009 | No Comments

Magento has given us very good features to manage Models and Collection for interacting with Database tables. Nowonder, they are very helpful in most of the cases. Yet, we may need to write custom query in some cases (if you need it quick or if you are new to Models & Collection in Magento). But by Magento’s standard this is not recommended. If you are a starter you may find this quering to database very helpful. Here is how you can do this.

Continue reading “Using Custom Query in Magento” »

  • Share/Bookmark

Magento’s Dataflow (Inport/Export) is one of distinguishing feature that makes Magento the leader in eCommerce Software. But for a programmer to understand how it workes in Magento can be quite nasty. I tried to understand how it workes and came up with following understanding. Continue reading “General Workflow of Magento’s Import/Export – Dataflow” »

  • Share/Bookmark

During one of my project works I came across a situation like changing the input of TINYMCE editor to image. Can you believe what can be the user’s requirement? :P Basically what the client needed was to change the text to image and text should be in American Typewriter Font with the option of showing text as image formatted by alignment. i.e Left Alignment, Center Alignment or Right Alignment in a white background image. Then I did some research, this is another way of saying I Googled a lot! lol. I came across two scripts, one which converted text to image and another a function to set alignment. So I thought that why not combine both the codes and publish for others, who may need it as well.

Continue reading “Converting Text to Image in PHP formatted by alignment” »

  • Share/Bookmark

Handling Products image in Magento is quite easy to do. Magento has deviced as very good class and function to create product’s image by defining widht and height and in addition it caches that image created if you want to get the same sized image next time. But managing other images like category images or other image you may need in your module can be quite troublesome. I went to the core of the function used to cache product’s image and came up with the script which can be used to cache any other images, like the product’s image.

Continue reading “Image Resize In Magento & cache the resized image” »

  • Share/Bookmark

As you may know or not ! Magento is the fastest growing eCommerce plateform, nowonder because Magento has a lots of flexibility in it. You can feel that too if you are a just a user and as for me as Programmer I just Love it. One of the salient feature that makes Magento a leader in eCommerce software is its ability to Import and Export data to an from the system.

Continue reading “Product Import In Magento Alongwith Updating The Attribute’s Options” »

  • Share/Bookmark

Here is a simple way of adding product link such as Related, Upsell and Crosssell Link to a product in Magento. I just got the way of doing this and thought to share! So kind of me :)

Continue reading “Adding Related Product and other links to Product in Magento” »

  • Share/Bookmark

Working with AJAX in Magento

Posted on November 17, 2009 | 5 Comments

Ajax in Magento can be pretty troublesome.Because you will need to take controllers and layout into account.And I almost used up a whole day trying to make ajax work. Here are some of the steps I’d like to share so that you will not waste lots of your time, before making this work :D .
Let’s first know in Magento terms what we need.

Continue reading “Working with AJAX in Magento” »

  • Share/Bookmark

Magento as you might know or not! has really a very PIA (Pain in the A**) type of methods to create SQL, execute and fetch! There are two ways of getting SQL from the collection of Magento. Here are the two ways.

Continue reading “How to get Query as a String in Magento?” »

  • Share/Bookmark

I was working in Magento trying to print PDF of the shipping information, with out changing the locale of the site and it was set to “Dutch”. And I came up with this word “gemailed”, I pronounced it as “G-Mailed”. Then suddenly my mind clicked with a connection G-Mailed and Gmail. So i thought it would be a good (if not better) discovery and share on my blog. Here’s the screen shot of the translation.

Continue reading “Wonder if this is the reason behind the name “Gmail”!” »

  • Share/Bookmark

I am a big fan of Latitude and Longitude, as you all might know, I have other post related to Latitude and Longitude and Google Maps.
I came across one of the greatest feature of Mozilla Firefox 3.5, and that was to get the latitude and Longitude of user using simple Javascript. No API to use, No query to Google or anything. Here’s the code.

Continue reading “Get Latitude and Longitude Of User From Simple Javascript!” »

  • Share/Bookmark

Search engine optimization by SEO Design Solutions