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

Posts Tagged ‘ Query ’

Here is a small snippet of code, yet useful, to get ordered items and its details. I’ve deviced this code a lot before and posted in Magento Commerce’s Forum as well. But felt like writting it again, so that I can have a quick refrence to it as well. Next thing, I’ve tried a lot to get all orders and their items details by single query, but have not yet come up with a solution. If you have any method of finding order and its details by a single query, then please do response. The code below first needs an order ID as it parameters to give order details.

Continue reading “Getting Ordered Items and their Detail from Order ID in Magento” »

  • Share/Bookmark

Query in Magento can be quite troublesome, if you are a starter..or non-starter. So I’ve tried to share some of the difficult queries using collection in Magento, so that it will be helpful to my blog readers and also a place where I can later refer to. Here is one of them, may not be dificult to all, but for me I had a very bad time initially, when I first started on Magento about a year ago. I had always thought to post on my blog, but when one of my collegue asked me about this I remembered and here’s the query.

Continue reading “Getting Customer’s Info Using Single Query Including Billing and Shipping Addresses” »

  • Share/Bookmark

Using Custom Query in Magento

Posted on December 8, 2009 by Subesh Pokhrel | 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 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

Search engine optimization by SEO Design Solutions