Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setShipping example
$shippingAddress
->
fromArray
(
$shipping
)
;
$shippingAddress
->
setCustomer
(
$order
->
getCustomer
(
)
)
;
$shippingAddress
->
setCountry
(
$country
)
;
$shippingAddress
->
setState
(
$state
)
;
$violations
=
$this
->
getManager
(
)
->
validate
(
$shippingAddress
)
;
if
(
$violations
->
count
(
)
> 0
)
{
throw
new
ValidationException
(
$violations
)
;
}
$order
->
setBilling
(
$billingAddress
)
;
$order
->
setShipping
(
$shippingAddress
)
;
}
}