if (!
empty($insertId)) { $basket =
$this->
getBasket();
foreach ($basket[CartKey::POSITIONS
] ??
[] as $item) { if ((int) $item['id'
] ===
$insertId) { $this->
View()->
assign('sArticle',
$item);
break;
} } } if (Shopware()->
Config()->
get('similarViewedShow', true
)) { $this->
View()->
assign('sCrossSimilarShown',
$this->
getSimilarShown($productId));
} if (Shopware()->
Config()->
get('alsoBoughtShow', true
)) { $this->
View()->
assign('sCrossBoughtToo',
$this->
getBoughtToo($productId));
} } else { $this->session->
offsetSet('sErrorMessages',
$this->container->
get('snippets'
)->
getNamespace('frontend/basket/internalMessages'
)->
get('WrongArticleNumberMessage', 'Please enter a valid article number'
));
} if ($this->
Request()->
getParam('isXHR'
) || !
empty($this->
Request()->callback
)) { $this->
Request()->
setParam('sTargetAction', 'ajax_add_article'
);
}