Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
isSalesChannelCountry example
$errors
->
add
(
new
ShippingAddressBlockedError
(
(string)
$country
->
getTranslation
(
'name'
)
)
)
;
return
;
}
if
(
!
$country
->
getShippingAvailable
(
)
&&
$validateShipping
)
{
$errors
->
add
(
new
ShippingAddressBlockedError
(
(string)
$country
->
getTranslation
(
'name'
)
)
)
;
return
;
}
if
(
!
$this
->
isSalesChannelCountry
(
$country
->
getId
(
)
,
$context
)
&&
$validateShipping
)
{
$errors
->
add
(
new
ShippingAddressBlockedError
(
(string)
$country
->
getTranslation
(
'name'
)
)
)
;
return
;
}
if
(
$customer
=== null
)
{
return
;
}
if
(
$customer
->
getActiveBillingAddress
(
)
=== null ||
$customer
->
getActiveShippingAddress
(
)
=== null
)
{
// No need to add salutation-specific errors in this case