In order to have a more well defined Ubercart specific API, let's wrap the module_invoke_all() necessary to get an array of product types in our own API function. This will allow us to change the way those product types are defined in the future while preserving the output of this function for developers.

CommentFileSizeAuthor
#2 uc_product_types_cleanup.patch29.74 KBrszrama

Comments

rszrama’s picture

After doing this, commit an updated version of the patch in #341819: Allow contrib modules to utilize uc_product_add_to_cart_form.

rszrama’s picture

Version: 6.x-2.x-dev » 6.x-2.0-beta1
Assigned: Unassigned » rszrama
Status: Active » Fixed
StatusFileSize
new29.74 KB

Committing this mondo-patch that does the following:

  • Adds uc_product_types() which is now used instead of module_invoke_all('product_types').
  • Adds uc_product_type_names() which returns an array of product types -> names for use as options arrays in form elements.
  • Updates the comments for uc_product_is_product() and actually implements it. : P
  • Probably cleans up some more things that I noticed as I was going through, including personal credit lines (ours and others') in modules. >:)

Status: Fixed » Closed (fixed)

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