I am working on a custom product printing Ubercart store where a site visitor can browse for products, upload a custom design image, see that artwork against the product in a preview, and complete the order. I thought I'd post here to hear some feedback how others might go about it, because I'm still thinking through the steps. Thus far I have:

* Ubercart browse for products, add to cart, config base options, and node_checkout which allows
* Upload custom design
* Preview custom design on that product using a specific ImageCache + imagecache_actions png ("Preset") overlay

What I am working through is how to have a single imagecache Preset associated with each base product to be applied with the design at checkout/preview. Is there some hook_form_alter'ing to be done somewhere?

Comments

texas-bronius’s picture

Back in the day, a dear compsci professor called fleshing out algorithms in pseudo-English "wall-gol:"

I think I need to devise a preview function like:

$product->$imagecache_preset($product->$custom_design);

where $product is the base product (a cck node and Ubercart "product"), $custom_design is a node_reference from $product, and $imagecache_preset("preview") is the specific ImageCache preset somehow associated on the $product cck node. This would all hinge on during creation of the $product node, along with the other cck attributes, being able to associate or create an ImageCache preset right there on the node.. Is this possible?

--
http://drupaltees.com
80s themed Drupal T-Shirts

texas-bronius’s picture

So one more step toward a solution to report: I think the way to go about it is to have a cck text field (or, preferably, a list of Imagecache Presets from which to choose) which defines the Preset to use for that product. I am still stuck, however, in getting the node_reference'd node to see its parent node and its cck fields. If I could do that, I'd be home free.

--
http://drupaltees.com
80s themed Drupal T-Shirts