5

I'm going to be receiving product data from multiple 3rd-party sources in a common format.

Generally, I've seen this issue handled by either creating a product for each incoming item in the user's cart from the 3rd-party, or loading all the relevant product data as json in a product's textbox custom option.

The first way can add a lot of bloat to the database, and the second can require updating a lot of templates to use the json data.

Is there a way to directly create quote items without a corresponding product existing? Or does anyone have a good starting point where I could override the existing functionality?

I'm poking around Mage/Checkout but not finding quite what I'm looking for.

Thanks.

  • 3
    A Mage_Sales_Model_Quote_Item has a required reference to a product, but you can edit everything. So if you ask me, have one product (maybe implement your own product type?) and implement a renderer for the product page and the cart. This should be a good start... – Fabian Blechschmidt Mar 11 '13 at 22:06
  • Did you found an answer? Please share it with us. – Fabian Blechschmidt Apr 7 '13 at 1:25
  • I just needed it for a proof of concept that hasn't turned into a real project yet, so I went with the approach of creating a new product since I knew I could get that done in the time allotted. I'll probably revisit this if the project pans out. – Sam Apr 8 '13 at 13:57
1

Assuming I'm understanding your scenario, I would use a product setup just for adding these items to the quote/cart with custom information on it. After you create the quote item from the product programmatically, you can set custom pricing, "custom" custom options for displaying key/value information (no template mods) alongside it and you can even set a custom URL and image on the quote item.

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.