Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getCountryIdByIso example
$this
->
createShippingMethod
(
)
;
$this
->browser =
$this
->
createCustomSalesChannelBrowser
(
[
'id' =>
$this
->ids->
create
(
'sales-channel'
)
,
'shippingMethodId' =>
$this
->ids->
get
(
'shipping'
)
,
]
)
;
$this
->browser->
setServerParameter
(
'HTTP_SW_CONTEXT_TOKEN',
$this
->ids->
create
(
'token'
)
)
;
$this
->
createProduct
(
)
;
$countryId
= Uuid::
fromBytesToHex
(
$this
->
getCountryIdByIso
(
)
)
;
$this
->
createCustomerAndLogin
(
$countryId
)
;
if
(
$vatIds
)
{
$this
->customerRepository->
update
(
[
[
'id' =>
$this
->ids->
get
(
'customer'
)
, 'vatIds' =>
$vatIds
]
]
,
Context::
createDefaultContext
(
)
)
;
}
$this
->currencyRepository->
update
(
[
[