Function __global->get_needed_fields
Definitions
sources/ecommerce.php
- Get fields that need to be filled in in the purchasing module.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $type_code | ID_TEXT | No | No | required parameter | N/A | N/A | The product codename |
| $force_extended | boolean | No | No | False | N/A | N/A | Show all possible input fields |
| $from_admin | boolean | No | No | False | N/A | N/A | Whether this is being called from the Admin Zone. If so, optionally different fields may be used, including a purchase_id field for direct purchase ID input. |
| $points_purchase | boolean | No | No | False | N/A | N/A | Whether this is a points purchase |
Returns
- A triple: The fields (use null for none), Hidden fields (use null for none), The text (use null for none), array of JavaScript function calls
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get fields that need to be filled in in the purchasing module.
*
* @param ID_TEXT $type_code The product codename
* @param boolean $force_extended Show all possible input fields
* @param boolean $from_admin Whether this is being called from the Admin Zone. If so, optionally different fields may be used, including a purchase_id field for direct purchase ID input.
* @param boolean $points_purchase Whether this is a points purchase
* @return array A triple: The fields (use null for none), Hidden fields (use null for none), The text (use null for none), array of JavaScript function calls
*/
function get_needed_fields(string $type_code, bool $force_extended = false, bool $from_admin = false, bool $points_purchase = false) : array
* Get fields that need to be filled in in the purchasing module.
*
* @param ID_TEXT $type_code The product codename
* @param boolean $force_extended Show all possible input fields
* @param boolean $from_admin Whether this is being called from the Admin Zone. If so, optionally different fields may be used, including a purchase_id field for direct purchase ID input.
* @param boolean $points_purchase Whether this is a points purchase
* @return array A triple: The fields (use null for none), Hidden fields (use null for none), The text (use null for none), array of JavaScript function calls
*/
function get_needed_fields(string $type_code, bool $force_extended = false, bool $from_admin = false, bool $points_purchase = false) : array
