Search AutoComplete and Suggestions extension for Magento

I just wanted to share this awesome [Free] Magento extension that modifies the quick search box by: Directly showing results (instead of related searches) Showing search suggestions Magento default quick search shows related searches as you type. From my point of view, this is not relevant at all. On the other hand, having results directly under the search box… that’s totally worth it.  Of course, you’ll need to apply some styles to the results box. Read more…

[Off-Magento] Solving the Warning: ssh2_scp_send(): Failure creating remote file: Invalid ACK response from remote error

Recently I had to use ssh2 through php in order to send files from one server to another. I don’t know why, I was getting a error that was not actually very common on the Internet. My code was: The connection was correctly placed, but when trying to copy the file, I got: Warning: ssh2_scp_send(): Failure creating remote file: Invalid ACK response from remote After looking for the solution, I finally found something [not really Read more…

Filter product collection by multiple categories in Magento

During the past week I’ve dealed with a very weird and stressing thing with my colleagues: filtering a product collection by multiple categories in Magento. Filter by only 1 category Magento offers a type of filter that can be used directly from the collection: Filter by 2 or more categories This is a completely different story. It’s very important to proceed correctly in order to avoid errors of the type: [blockquote]Item (Mage_Catalog_Model_Product) with the same Read more…

Best way of disabling the Region select for addresses in Magento

Region select is not perfect in Magento. For example, for UK, there are missing counties, probably due how official they are or maybe just because Magento didn’t take the correct database. One way or another, region field is not considered one of the required fields for most sellers when integrating orders on their ERP. What is the best and cleanest way for disabling this select box? From my point of view, this is the best Read more…

Magento EE 1.13 & EE 1.8

Magento EE 1.13 is finally out (last version was released in December. The focus of this version has been performance, especially regarding indexing. These are good news, as our experience with indexing problems and performance during the last months has been really bad. Magento CE 1.8 will follow soon, something completely necessary, as the last version was released in July 2012 (that means nearly 8 months without any updates, not even security updates) The most important Read more…

Programmatically set product position in a category in Magento

Today I had to reorder products in a category. Basically, our client wanted to put the products with special price at the end. After trying to do this with the category model in Magento, I finally run into the Category Api. It worked like a charm, even though it works kind of slow. Here you have the solution (with an example):

Passing arguments to a Magento Shell script

Using Magento Api to create shell scripts seems to be easy, but there are too many things to take into account to get the most of it. In this case, I want to explain how to pass an argument from the command line when executing a magento shell script. You have to call the script passing the argument title and argument value: Then, on the script code, you can retrieve this value using from your Read more…

Solving reindex issues with Product Flat Data in Magento

For the past 2 years we’ve run into a reindex issue when reindexing product flat data in Magento more than once. Basically, we wet something like: The key is here: That is telling you which table is failing. This exception tells that the referential integrity between: catalog_product_flat_2.entity_id and catalog_product_entity.entity_id is corrupted. This usually means some record(s) contain(s) null in the field catalog_product_entity.entity_id, where they are expected to contain existing entity_ids. Fixing this In order to Read more…