In most of the projects, when the items are shipped to the client, we need to know the costs of this shipment.
I've seen than @mmoreram and @alch are working in a shipping component, but it seems that is not included into the order yet. Are you ok if we include a shipping cost method into PaymentBridge?
/**
* Get shipping amount
*
* @return integer
*/
public function getShippingAmount() {
// Calculate the costs for this order
// 0 if it is free
}
And then create the form field if applicable:
/*
* PaymentBridge stores shipping amount in cents
*/
$shippingAmount = $this
->paymentBridge
->getShippingAmount();
if ($shippingAmount > 0) {
$formBuilder
->add('shipping_1', 'hidden', array(
'data' => $shippingAmount,
))
;
}
In most of the projects, when the items are shipped to the client, we need to know the costs of this shipment.
I've seen than @mmoreram and @alch are working in a shipping component, but it seems that is not included into the order yet. Are you ok if we include a shipping cost method into PaymentBridge?
And then create the form field if applicable: