Magento Themes and Magento Extensions

Magento: Product Import Script : Update 1

Share
Posted on June 2nd, 2011 | Posted by admin

There’s a lot of people checking my blog regularly, but not a lot of people signed up to my Twitter account to get updates on the progress, so I figured it would be a good idea to give updates occasionally on the blog. (If you want the BEST updates on the progress,subscribe to my Twitter).

Tonight I was able to successfully import custom attributes, of many types, even dropdowns. So, the good news is that in the script, you’ll be able to just include whatever columns you want for any custom attributes that you’ve created – and consider them imported!

The trickiest part was/is the dropdown attributes. These aren’t just a simple value that I can place into the database. The values for these have been pre-populated. So, first I need to check the database for the column, figure out if it is a user-defined attribute, then figure out if it is a dropdown, then search the database for the specific value that was given in the column. If it is off at all, or not found at all then I need to create error handling and logging for this issue and figure out what to do. That part isn’t complete yet. So – at this point, if the value isn’t found – an ugly PHP error is issued. But, I’ll get to that next.

After that is complete – I just need to figure out a way to handle all sorts of default values (if you choose not to include a lot of columns) so that the product is sure to get all the values it needs to function properly. Once that is done – and some overall loose ends are tied up – I think I will be ready for some beta testing (for any of you out there interested in helping test it out).

Twitter: Follow the Product Import Script on Twitter

Share
Posted on May 30th, 2011 | Posted by admin

There are definitely better ways to keep people up-to-date on a project that is often changing than a web page or blog posts. So, for little updates, and updates about the Magento Product Import Script that I am working on, I’ve setup a Twitter account for any of you who are interested in keeping up with the latest things that I’m working on.

My Twitter page is: http://www.twitter.com/Prattski. Check it out, and stay updated!

If you haven’t seen already, I’ve also added my twitter posts to the right side bar of the blog here. Well, that’s enough for now. Time to go work on the script for a little while!

How to create a new product type in Magento

Share
Posted on May 27th, 2011 | Posted by admin
How to create a new product type in Magento

Magento comes packed with several product types: simple, grouped, configurable, virtual, bundle, downloadable. Sometimes clients request can reach beyond any of these built in product types functionality. In such cases, usual way of handling things is throwing some new attributes and hooking into some events from which you can handle and “re-route” certain logic.

In some cases, the required product logic can extend to such level that you are better of with building a new product type in Magento. Why, you might ask? Becase of the more finer control you can achieve on product trough your own models than to poke around on the existing stuff.

Attached to this article is a fully working extension I wrote that creates a new product type in your Magento store. This new product type uses code name “customproduct”. Its based on the Mage_Catalog_Model_Product_Type_Abstract class, the one on which the “simple” product is build upon. Unlike “simple” product type, this “customproduct” does not have any, whatsoever, additional logic built in. This, I leave to you.

Also, extension comes with several “hooks” to certain Magento controllers actions. If you open the app/code/local/Ajzele/CustomProduct/Model/Observer.php you will see implemented several “blank” methods as hooks. Going to config.xml file of this extension will show you what these methods “observe”.

Programatically add bundle product to cart in Magento

Share
Posted on May 26th, 2011 | Posted by admin

Programatically add bundle product to cart in Magento

Sometimes, clients requirements exceed the defaults built into the Magento. Recently we came across a task that among other things required manipulation of bundle products in Magento. In order to help my coworker Tomas I wrote this little code snippet that

Removing Product Comparison in Magento

Share
Posted on May 23rd, 2011 | Posted by admin

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. 1.3.1.1

Before beginning of this procedure please Go to: System-> Cache Management and disable cache. You can turn it on after you’re done.

Step 1 – reports.xml

Open: app/design/frontend/deafult/Your Theme name/layout/reports.xml and delete the following lines:

<block type="reports/product_compared" before="right.permanent.callout" name="right.reports.product.compared" template="reports/product_compared.phtml" />
<block type="reports/product_viewed" before="right.permanent.callout" name="right.reports.product.viewed" template="reports/product_viewed.phtml" />
Page 5 of 7« First...«34567»