Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
matchZipCode example
return
false;
}
if
(
!
$customer
=
$scope
->
getSalesChannelContext
(
)
->
getCustomer
(
)
)
{
return
RuleComparison::
isNegativeOperator
(
$this
->operator
)
;
}
if
(
!
$address
=
$customer
->
getActiveBillingAddress
(
)
)
{
return
RuleComparison::
isNegativeOperator
(
$this
->operator
)
;
}
return
$this
->
matchZipCode
(
$address
)
;
}
}
public
function
match
(
RuleScope
$scope
)
: bool
{
if
(
!
$scope
instanceof CheckoutRuleScope
)
{
return
false;
}
if
(
!
$address
=
$scope
->
getSalesChannelContext
(
)
->
getShippingLocation
(
)
->
getAddress
(
)
)
{
return
RuleComparison::
isNegativeOperator
(
$this
->operator
)
;
}
return
$this
->
matchZipCode
(
$address
)
;
}
}