This is based mostly (a lot) from code from brmassa in http://drupal.org/node/85844.

I'm providing a patch so that each attribute can have its own image.

However, dropdowns are not very able to display images, so radio was used. This means that there will be a choice of list types for subproducts attributes.

*This is my first patch, so here we go! :)

** Any ideas on how to improve this is very welcome.

Comments

kuahyeow’s picture

Status: Active » Needs review
nedjo’s picture

Category: task » feature
Status: Needs review » Needs work

Seems useful.

A few things needed in the patch:

* Need to update the subproducts_install() function to include the new fields.
* Indenting should be done with double spaces, not tabs.
* "put here the URL" should be "put the URL here"
* $variation->type==1 should be $variation->type == 1, plus some other format issues, pls follow existing format (spaces, etc.)

kuahyeow’s picture

Status: Needs work » Needs review
StatusFileSize
new6.75 KB

I've cleaned up the code, by fixing my phpeclipse configurations. Hopefully, I've cleaned up all the formatting.

One problem is that right now, the image is just a url that must be typed in. Some image_attach like functionality would be good, but I do not know how that would affect coupling, i.e subproducts depending on image_attach module? Would that be a good idea?

neclimdul’s picture

Status: Needs review » Needs work

Still has tabs instead of spaces in patch. I keep my tabs size(phpeclipse -> php -- appearance tab) set to 4 so tabs mess up the flow of the code. If you look at the patch in your browser you will probably see the odd spacing I'm referring to.

brmassa’s picture

Version: 4.7.x-1.x-dev » 5.x-3.x-dev
Status: Needs work » Patch (to be ported)

Guys,

ECommerve v4 will have this feature. Since Subproducts on v4 was merged with EC Live Subproducts module, i suggest to you port your subproducts to that module.

regards,

massa

brmassa’s picture

Version: 5.x-3.x-dev » 5.x-4.x-dev
Assigned: kuahyeow » brmassa
Status: Patch (to be ported) » Fixed

Guys,

Since the EC Live Subproducts has this feature and next Ecommerce version (v4) will merge this code to subproducts, i suggest to all to migrate to EC Live Subproducts.

regards,

massa

brmassa’s picture

Status: Fixed » Closed (fixed)