Function __global->get_discounted_price
Definitions
sources/ecommerce.php
- Find the 'discounted' price for a product (check the return values carefully).
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $details | array | No | No | required parameter | N/A | N/A | Product details |
| $member_id | ?MEMBER | No | No | Null | N/A | N/A | The member who this is for (null: current member) |
Returns
- A tuple: Discounted price (null is no discount), Discounted price tax code, Points required to get discount (null is no discount), Whether this is a discount
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Find the 'discounted' price for a product (check the return values carefully).
*
* @param array $details Product details
* @param ?MEMBER $member_id The member who this is for (null: current member)
* @return array A tuple: Discounted price (null is no discount), Discounted price tax code, Points required to get discount (null is no discount), Whether this is a discount
*/
function get_discounted_price(array $details, ?int $member_id = null) : array
* Find the 'discounted' price for a product (check the return values carefully).
*
* @param array $details Product details
* @param ?MEMBER $member_id The member who this is for (null: current member)
* @return array A tuple: Discounted price (null is no discount), Discounted price tax code, Points required to get discount (null is no discount), Whether this is a discount
*/
function get_discounted_price(array $details, ?int $member_id = null) : array

