Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | uc_product_get_skus.patch | 6.33 KB | cha0s |
uc_product_get_models.patch | 6.34 KB | cha0s | |
Comments
Comment #1
cha0s CreditAttribution: cha0s commentedRerolled to use 'sku' instead of 'model'
Comment #2
Island Usurper CreditAttribution: Island Usurper commentedPatch no longer applies. Please reroll against the latest version in Bazaar.
Comment #3
Island Usurper CreditAttribution: Island Usurper commentedIt was uc_file that had changed too much. The names had changed, but the functionality was mostly the same. So it's committed.
Comment #5
greenbeans CreditAttribution: greenbeans commentedIs this patch going to eventually become part of UC core?
Comment #6
Island Usurper CreditAttribution: Island Usurper commentedIt's been part of UC since before the beta1 release.
Comment #7
greenbeans CreditAttribution: greenbeans commentedAh, thanks. I got here from a link from a module on the ubercart site that said it required this patch.