|
@@ -119,8 +119,8 @@ class BxAdsFormsEntryHelper extends BxBaseModTextFormsEntryHelper
|
|
|
$aResult = $oPayments->addToCart($iVendorId, $this->_oModule->_oConfig->getId(), $aCommodity['id'], 1);
|
|
$aResult = $oPayments->addToCart($iVendorId, $this->_oModule->_oConfig->getId(), $aCommodity['id'], 1);
|
|
|
if(isset($aResult['code']) && (int)$aResult['code'] == 0){
|
|
if(isset($aResult['code']) && (int)$aResult['code'] == 0){
|
|
|
$sUrl = $oPayments->getCartUrl($iVendorId);
|
|
$sUrl = $oPayments->getCartUrl($iVendorId);
|
|
|
- if (bx_is_api())
|
|
|
|
|
- return [bx_api_get_block('redirect', ['uri' => bx_api_get_relative_url($sUrl), 'timeout' => 1000])];
|
|
|
|
|
|
|
+ if($this->_bIsApi)
|
|
|
|
|
+ return [bx_api_get_block('redirect', ['uri' => bx_api_get_relative_url($sUrl)])];
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -147,8 +147,8 @@ class BxAdsFormsEntryHelper extends BxBaseModTextFormsEntryHelper
|
|
|
$aResult = $oPayments->addToCart($iVendorId, $this->_oModule->_oConfig->getId(), $aCommodity['id'], 1);
|
|
$aResult = $oPayments->addToCart($iVendorId, $this->_oModule->_oConfig->getId(), $aCommodity['id'], 1);
|
|
|
if(isset($aResult['code']) && (int)$aResult['code'] == 0){
|
|
if(isset($aResult['code']) && (int)$aResult['code'] == 0){
|
|
|
$sUrl = $oPayments->getCartUrl($iVendorId);
|
|
$sUrl = $oPayments->getCartUrl($iVendorId);
|
|
|
- if (bx_is_api())
|
|
|
|
|
- return bx_api_get_block('redirect', ['uri' => bx_api_get_relative_url($sUrl), 'timeout' => 1000]);
|
|
|
|
|
|
|
+ if($this->_bIsApi)
|
|
|
|
|
+ return bx_api_get_block('redirect', ['uri' => bx_api_get_relative_url($sUrl)]);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|