This a combined Feature Request and a Request for Guidance as to the next best step.
I am trying to make all the above work together correctly. Some advice on the best direction would be appreciated.
What I am looking to do here is figure out the best way to handle various shippable product types. For example, let's say I want a product type of "Lights". I want this to be a "Shippable Product" and I want various specialized data such as Wattage, mounting, weight etc. that I am not going to want on other types of products.
So, I use the cck to make a new Content Type called "Lights" and for that type I create various specialized fields. When I load up the content type manually it's a pretty simple matter, just fill in the fields and click on "Add to Store". Then some Product fields come up such as Price and SKU. Other things are missing from my Lights content type that are in Shippable Product such as "Role Assignments" but I am guessing that's just the way it is being that it's a custom type.
Next, I naturally want to import data into my new product type so I add the node_import module. Now a problem comes up, that is, there are no "Product Fields" like Price or SKU for my Product Type called Lights on the import screens. This I presume relates to having to click on "Add to Store" before product fields show up when adding a product manually.
So I see these courses of action from this point:
1. Add in the additional data through a custom import script direct to the database.
2. Extend the node_import to handle what I want.
3. Make my custom content type a "Shippable Product" Type so that it's handle as a "Shippable Product" by everything.
4. Find some solution that already exists for this scenario (the best option but I haven't seen anything so I am focusing on the other options.)
The 3rd option sounds to me to be the most ideal but I am not sure if it's the best path. And, if it is, should I hard code a my new product into e-commerce (sounds nasty and not a great way to go given e-commerce's complexity) or should I try and modify "Content Type" creation to just make it possible inherit e-commerce types (sounds more elegant and useful but may be hitting the core of drupal and be very difficult also), or is there some better way?
As a feature request I would like to see it be made possible to inherit e-commerce content types so that we can have numerous extended types. As a guidance request, I would appreciate any insight into the best way to solve this problem.
Thanks,
Reg
Comments
Comment #1
brmassa commentedReg,
yet, eC doesnt allow import data or deal with sku/price as normal fields. But im thinking on implement some import function soon.
regards,
massa
Comment #2
reg commentedI ended up writing my own import script. It's too specific to put up on here -- no-one else would have use for it. However, how I deduced what to do to the database I think would be useful to share.
The trick with importing is to know what to put in which tables. Here's how I figured it after not being too comfortable with the advice through the Drupal pages on the matter.
1. Export your entire database to an .sql file.
2. Manually add a product.
3. Export your entire database again.
4. Use a good text compare program to see the before and after differences (I used a windows program I like called Compare and Merge).
This way you will know for certain you are getting everything that was done through a manual operation.
Write your PHP script and use some common sense about what you don't need to do, such as watchdog entries which you will see in your comparison but don't need to mimic.
Comment #3
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.