cYu wrote:I got the sense

Posts: 1377
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

cYu wrote:
I got the sense that Steve was doing something more along the lines of adding an existing product to a cart from non-product nodes.

That's my guess, but I'm trying to think - of course I don't know the Uber API that well ... but what are the drawbacks of doing it that way, using a Cart Link, versus creating a "pseudo Product" with uc_product_insert or drupal_clone (although I have even less experience with the Drupal API)? My main hesitation is that the product node type has some specific parameters that need to get passed in order to maintain functionality of the store. Am I correct on this? I keep coming back to things like, SKU, shipping, attributes, etc etc. Of course you might not ALWAYS need these things when dealing with certain purchasable nodes, but my guess is it's probably wise to keep everything as consistent as possible.

Another idea would be, instead of duplicating work for everything, create a pseudo-temp product at the time the item is added to the cart, or when the order is submitted? Then again that'd probably fill up the database quickly. I'm thinking a temp_products table to keep track of node<->product relationships, and a new systems value for a temp_product_id or something along those lines. Scattershot as always and I'd have to examine the dis/advantages of each method.

It's hard because our needs right now are so custom that it's harder to make a module to do something like this, at least for now. Once I've gotten some of it completely locked in I might revisit it to make a more flexible Contrib.

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Node conversion? By: gajillion (22 replies) Mon, 08/27/2007 - 14:17