3

I'm trying to wrap my head around when/why I would create a custom product type. I have to imagine there have been opportunities in the past where I probably could have benefited from this, but I'm having a hard time thinking when this would be a beneficial solution. Can anyone explain where and why I would/could take advantage of programming a custom product type?

5

The best rule of thumb here in my opinion is that if you can do it with attributes, attribute sets, and built-in types cleanly and without degrading performance, don't create a custom type. It's not worth the hassle in most cases. And to be entirely honest, there is only one time I can think of where we (I.e. myself and the entire dev team at Classy Llama) have ever effected a custom product type in the 5 years we've been working with Magento. And one or two where we should have, had we known ahead of time what the end result was going to look like once all was settled. ;)

Where they would come in handy and/or necessary is when you have a subset of products which need an entirely different way of relating to other products, are of a medium not covered by the built-in types, have special or complex pricing models best suited for implementation in a product type model, different means of handling inventory, etc. I'm sure there are others, these are things I'm thinking of off hand based on my knowledge of how products work under the hood.

So use your best judgment. You don't want to go through all the trouble of defining and building the type if you don't have to. A good point of reference for the possible differences between types are those such as the differences in how things are handled in simple vs say configurable or grouped types.

| improve this answer | |
  • 1
    I always look for the common (but custom) type methods which provide behaviors for add to cart & customization. – benmarks May 23 '13 at 3:23
  • 1
    I may that someone added a product type in 5 years, but we had to do that on our very first project, because of the exact same reasons posted in this answer and benmarks' important addition: large customization of adding to cart behavior. Also, a new product type doesn't mean writing it from scratch, so it should not sound so scary. – nevvermind May 23 '13 at 6:25
2

In my current project we are selling online courses and different online services. At the beginning, we didn't develop custom product type. The courses were supported by downloadable product type and the online services with Virtual product type which makes sense at the beginning. Using custom options or adding product attributes/attributes set may help when you have very basic needs for those options.

Sometimes, I had some issues with bundle and configurable product type or with sales process with downloadable product type. So I had to make several changes. It adds some overwrites code on right and left and at the end you need to do a good documentation, you add also some complexity to the code based on the core code with possible unstability risks with updates.

Additionally, in our case, we developed business logic to de/activate courses, set rights access, enable services, get information from external web applications, etc. We have more and more complex attributes and logic in frontend and backend.

Then, I wanted also keep shop owner experience more easier as possible by limiting the explanation of which attribute set to select and which product type etc

In the meantime I wanted to keep access to Magento update (I moved from 1.3 to 1.4, 1.5 and to 1.7) and sometimes improve/change the default product type by adding some features, in my case it was the downloadable product. The downloadable product type is not completely up to date (e.g. invoice/credit memo/order code of template files) compared to bundle or configurable product types in Magento 1.7, I mean without my changes.

For those reasons, I preferred to develop my own custom product type, like that it is more clear for the development, for the maintenance and for the shop owner.

My case is probably specific but for sure I don't regret it and I would recommend in the case of complex needs and business logic.

Creating a new custom product type is not so a big deal, you have to care about the default attributes like price, taxes and so on.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.