public function CommerceShippingQuoteInterface::calculate_quote in Commerce Shipping 7
Do the actual shipping cost calculation.
Parameters
$currency_code: The currency code that the shipping should use when returning the cost.
$form_values: Array of values inputted in the submit form by the user.
$order: The order for which operations should be done.
$pane_form: The complete form array of the pane that shipping method is located on.
$pane_values: The complete $form_state of the pane that shipping method is located on.
Return value
array of values, one for each line item created containing one of.
- (array) containing any of these keys: 'amount', 'currency_code', 'quantity', 'label'
- (int) the price of the shipping, the order currency will be used, formatted as integer.
1 method overrides CommerceShippingQuoteInterface::calculate_quote()
- CommerceShippingQuote::calculate_quote in plugins/
quotes/ quote_base/ CommerceShippingQuote.class.php - Do the actual shipping cost calculation.
File
- plugins/
quotes/ quote_base/ CommerceShippingQuote.class.php, line 88 - Contains the CommerceShippingQuote class and CommerceShippingQuoteInterface interface.
Class
- CommerceShippingQuoteInterface
- Declares an interface for shipping quote classes
Code
public function calculate_quote($currency_code, $form_values = array(), $order = NULL, $pane_form = NULL, $pane_values = NULL);