CodeExplorer setDeliveryTaxes example
$response->
setLineItemTaxes([ $this->ids->
get('line-item-1'
) =>
new CalculatedTaxCollection([ new CalculatedTax(1.0, 1.0, 1.0
),
]),
$this->ids->
get('line-item-2'
) =>
new CalculatedTaxCollection([ new CalculatedTax(2.0, 2.0, 2.0
),
new CalculatedTax(3.0, 3.0, 3.0
),
]),
]);
$response->
setDeliveryTaxes([ $this->ids->
get('delivery-1'
) =>
new CalculatedTaxCollection([ new CalculatedTax(4.0, 4.0, 4.0
),
]),
$this->ids->
get('delivery-2'
) =>
new CalculatedTaxCollection([ new CalculatedTax(5.0, 5.0, 5.0
),
new CalculatedTax(6.0, 6.0, 6.0
),
]),
]);
$response->
setCartPriceTaxes(new CalculatedTaxCollection([ new CalculatedTax(7.0, 7.0, 7.0
),