Class Hook_usergroup

Description
Method Summary
?tempcode get_identifier_manual_field_inputter (ID_TEXT $type_code)
tempcode get_message (string $product)
?array get_needed_fields ()
array get_products ([boolean $site_lang = false])
boolean is_available (ID_TEXT $product, MEMBER $member)
?MEMBER member_for (ID_TEXT $purchase_id)
Methods
get_identifier_manual_field_inputter (line 118)

Function for administrators to pick an identifier (only used by admins, usually the identifier would be picked via some other means in the wider ocPortal codebase).

  • return: Input field in standard Tempcode format for fields (NULL: no identifier).
?tempcode get_identifier_manual_field_inputter (ID_TEXT $type_code)
  • ID_TEXT $type_code: Product type code.
get_message (line 178)

Get the message for use in the purchase wizard.

  • return: The message.
tempcode get_message (string $product)
  • string $product: The product in question.
get_needed_fields (line 197)

Get fields that need to be filled in in the purchase wizard.

  • return: The fields and message text (NULL: none).
?array get_needed_fields ()
get_products (line 151)

Get the products handled by this eCommerce hook.

IMPORTANT NOTE TO PROGRAMMERS: This function may depend only on the database, and not on get_member() or any GET/POST values. Such dependencies will break IPN, which works via a Guest and no dependable environment variables. It would also break manual transactions from the Admin Zone.

  • return: A map of product name to list of product details.
array get_products ([boolean $site_lang = false])
  • boolean $site_lang: Whether to make sure the language for item_name is the site default language (crucial for when we read/go to third-party sales systems and use the item_name as a key).
is_available (line 209)

Check whether the product code is available for purchase by the member.

  • return: Whether it is.
boolean is_available (ID_TEXT $product, MEMBER $member)
  • ID_TEXT $product: The product.
  • MEMBER $member: The member.
member_for (line 137)

Find the corresponding member to a given purchase ID.

  • return: The member (NULL: unknown / can't perform operation).
?MEMBER member_for (ID_TEXT $purchase_id)
  • ID_TEXT $purchase_id: The purchase ID.

Documentation generated on Sun, 02 Jan 2011 23:27:52 +0000 by phpDocumentor 1.4.3