Mhh, ich habe folgendes Problem: Im Core gibt es im folgende öffentliche Methode im Checkout Controller:
public function calculateShippingCostsAction()
{
if ($this->Request()->getPost('sCountry')) {
$this->session['sCountry'] = (int) $this->Request()->getPost('sCountry');
$this->session['sState'] = 0;
$this->session['sArea'] = Shopware()->Db()->fetchOne('
SELECT areaID FROM s_core_countries WHERE id = ?
', [$this->session['sCountry']]);
}
if ($this->Request()->getPost('sPayment')) {
$this->session['sPaymentID'] = (int) $this->Request()->getPost('sPayment');
}
if ($this->Request()->getPost('sDispatch')) {
$this->session['sDispatch'] = (int) $this->Request()->getPost('sDispatch');
}
if ($this->Request()->getPost('sState')) {
$this->session['sState'] = (int) $this->Request()->getPost('sState');
}
// We might change the shop context here so we need to initialize it again
$this->get('shopware_storefront.context_service')->initializeShopContext();
// We need an indicator in the view to expand the shipping costs pre-calculation on page load
$this->View()->assign('calculateShippingCosts', true);
$this->forward($this->Request()->getParam('sTargetAction', 'index'));
}
Ich muss nun eine Möglichkeit finden Code (session_write_close() im Speziellen) zwischen
$this->View()->assign('calculateShippingCosts', true);
// session_write_close() here
$this->forward($this->Request()->getParam('sTargetAction', 'index'));
diesen beiden Zeilen ausführen ODER das $this->forward(…) abzubrechen, damit ich in einem PostDispatch-Event die session schreiben kann und danach das forward selbst mache.