subproducts.module

Version

1.21.2.11.2.1.2.16 (checked in on 2007/08/09 at 03:28:53 by gordon)

Description

This module adds subproducts and variations functionality to Drupal's E-Commerce package.

Subproducts functionality is divided into two distinct types: variations and base products.

Variation-type products are products that have subproducts that are defined by a combination of attributes--for example, a color (blue) and a size (small). Product types that return themselves as part of the 'subproduct_types' productapi option are considered to support variation-type subproducts. An example is the apparel module in ecommerce/contrib.

Product variations and attribute data are stored in dedicated tables and accessed and updated through a user interface, similar to (and based on) the UI in Drupal core for administering the forum module's vocabulary and terms. Before users can create subproducts, a site administrator must first designate available variations and their attributes.

The second type of subproduct is the base-type. In this case, a subproduct is not itself a combination of attributes, but is a reference to a product that has such attributes. For example, a logo (the parent product) might be available printed on a small, blue shirt (the subproduct). Product types that return product types other than themselves as part of the 'subproduct_types' productapi option are considered to support base-type subproducts. An example is the custom module in ecommerce/contrib.

Functions

Namesort iconDescription
subproducts_accessImplementation of hook_access().
subproducts_add_to_cart
subproducts_add_to_cart_2
subproducts_adminMenu callback; administration page for maintaining product variations.
subproducts_admin_sqlReturn appropriate sql clause giving admins access to unpublished nodes.
subproducts_attribute_formReturns a form for adding an attribute.
subproducts_attribute_form_submit
subproducts_attribute_form_validateValidate an attribute before it is saved.
subproducts_base_product_typesFetch the list of foreign subproduct types for a given product type.
subproducts_cart_set_subproduct_baseSet the matching subproduct for a set of base product variation attributes.
subproducts_cart_set_subproduct_variationSet the matching subproduct for a set of product variation attributes.
subproducts_confirm_attribute_deleteReturns a confirmation page for deleting an attribute
subproducts_confirm_attribute_delete_submit
subproducts_confirm_variation_deleteReturns a confirmation page for deleting a variation
subproducts_confirm_variation_delete_submit
subproducts_ec_settingsImplementation of hook_ec_settings().
subproducts_generateMenu callback; generate subproducts of a given product based on variations.
subproducts_get_attributeReturn the attribute object matching a attribute ID.
subproducts_get_attributesFind all attributes associated with a given variation.
subproducts_get_base_attributesFind all the attributes of a product's subproducts' base products.
subproducts_get_base_dataReturn structured base product information for a given parent product.
subproducts_get_base_parentReturn the parent of a subproduct's base product.
subproducts_get_base_parentsReturn all parents of base products of a product's subproducts.
subproducts_get_childrenReturn an array of children for a given product.
subproducts_get_child_attributesFind all the attributes of a product's subproducts.
subproducts_get_node_baseReturn the id of the base product for a given node.
subproducts_get_node_variationsReturn an array of variations for a (subproduct) node.
subproducts_get_node_variations_stringReturn an array of strings representing the variations for a (subproduct) node.
subproducts_get_variationReturn the variation object matching a variation ID.
subproducts_get_variationsFetch all available variations for a specified product type, or for all product types.
subproducts_get_variations_subproductFind the subproduct matching a set of variations.
subproducts_helpImplementation of hook_help()
subproducts_listMenu callback; list subproducts for a specified product.
subproducts_list_submit
subproducts_list_validate
subproducts_menuImplementation of hook_menu().
subproducts_multiple_delete_confirm
subproducts_multiple_delete_confirm_submit
subproducts_nodeapiImplementation of _nodeapi hook.
subproducts_permImplementation of hook_perm().
subproducts_permuteFind all the permutations of a given set of arrays.
subproducts_price_elementsReturns the form elements for pricing.
subproducts_remove_duplicatesDeletes any subproducts that duplicate the attribute combinations of another subproduct.
subproducts_reset_price_baseRecalculate the price of a base-type subproduct after a change in price of its parent or its parent's pricing type.
subproducts_reset_price_variationRecalculate the price of a variation-type subproduct after a change in price of its parent or its parent's pricing type.
subproducts_save_attributeCreate, update, or delete an attribute.
subproducts_save_variationCreate, update, or delete a variation.
subproducts_surcharge_extraIf there is a surcharge, add information about it to an attribute's display text.
subproducts_variations_overviewMenu callback; return an overview list of existing attributes and variations
subproducts_variations_product_typesFetch product types supporting variations.
subproducts_variation_formReturns a form for adding a variation.
subproducts_variation_form_submit
theme_subproducts_add_to_cartTheme to allow the removal of the add to cart form, useful when displaying subproduct options within other forms
theme_subproducts_attribute_itemsTheme a list of product attributes
theme_subproducts_in_cartProvides a display of the shopping cart, themed to allow removal of the cart display
theme_subproducts_listTheme a list of subproducts.