This patch introduces hook_uc_product_models(), which is currently only implemented by uc_attribute. This allows product features (files, rols, recurring) and the stock module to retrieve a list of models on a product node in a consistent manner.

This hook is invoked by uc_product_get_models(), which takes a product node.

As a bit of an aside, perhaps the Model/SKU field on each product feature should actually be provided by the product feature interface. That could be implemented pretty trivially if it's a good idea.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cha0s’s picture

FileSize
6.33 KB

Rerolled to use 'sku' instead of 'model'

Island Usurper’s picture

Status: Needs review » Needs work

Patch no longer applies. Please reroll against the latest version in Bazaar.

Island Usurper’s picture

Status: Needs work » Fixed

It was uc_file that had changed too much. The names had changed, but the functionality was mostly the same. So it's committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

greenbeans’s picture

Is this patch going to eventually become part of UC core?

Island Usurper’s picture

It's been part of UC since before the beta1 release.

greenbeans’s picture

Ah, thanks. I got here from a link from a module on the ubercart site that said it required this patch.