Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setTrackingCode example
// Create model
$order
=
new
OrderModel
(
)
;
// Setting default values, necessary because of not-nullable table columns
$order
->
setComment
(
''
)
;
$order
->
setCustomerComment
(
''
)
;
$order
->
setInternalComment
(
''
)
;
$order
->
setTemporaryId
(
''
)
;
$order
->
setTransactionId
(
''
)
;
$order
->
setTrackingCode
(
''
)
;
$order
->
setReferer
(
''
)
;
$order
->
fromArray
(
$params
)
;
$violations
=
$this
->
getManager
(
)
->
validate
(
$order
)
;
if
(
$violations
->
count
(
)
> 0
)
{
throw
new
ValidationException
(
$violations
)
;
}
$this
->
createAddresses
(
$params
,
$order
)
;