Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
validatePostMethod example
public
function
addArticleAction
(
)
{
$this
->
validatePostMethod
(
)
;
$orderNumber
=
trim
(
$this
->
Request
(
)
->
getParam
(
'sAdd'
)
)
;
$quantity
=
(int)
$this
->
Request
(
)
->
getParam
(
'sQuantity'
)
;
$productId
=
Shopware
(
)
->
Modules
(
)
->
Articles
(
)
->
sGetArticleIdByOrderNumber
(
$orderNumber
)
;
$instockInfo
=
$this
->
getInstockInfo
(
$orderNumber
,
$quantity
)
;
$this
->
View
(
)
->
assign
(
'sBasketInfo',
$instockInfo
)
;
if
(
$instockInfo
!== null
)
{
$this
->session->
offsetSet
(
'sErrorMessages',
$instockInfo
)
;
}