View Issue Details

IDProjectCategoryView StatusLast Update
0003536OXID eShop (all versions)1.03. Basket, checkout processpublic2012-12-10 13:22
Reporterksgerber Assigned To 
PriorityurgentSeveritymajorReproducibilityalways
Status resolvedResolutionno change required 
Product Version4.5.6 revision 40808 
Summary0003536: Article Not Buyable (After Order Creation)
DescriptionAfter a basket is converted into an Order, the Order will reduce the stock and if this reaches 0 and the article is defined as not buyable when stock is equal zero the basket will throw an error.

Normally this would not happen because the conversion from basket to order is done in one step, but if you integrate a third party payment gateway they all would require to override the GetArticle function in the basketitem.
Steps To ReproduceUse the DataTrans or oxid2ipayment Payment modules and remove the basketitem module extension.
Additional InformationThe following code would solve it, so this could be integrated into the standard basketitem.

    public function getArticle($blCheckProduct = true, $sProductId = null, $blDisableLazyLoading = false)
    {
        $oBasket = $this->getSession()->getBasket();
        
        if($oBasket->getOrderId() == "")
        {
            return parent::getArticle($blCheckProduct, $sProductId, $blDisableLazyLoading);
        }
        else
        {
            return parent::getArticle(false, $sProductId, $blDisableLazyLoading);
        }
    }
TagsOrder
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Activities

edvardas_gineika

2012-06-04 14:02

reporter   ~0006760

Creator of payment gateway module should himself define if he needs to override GetArticle function and specify wether or not to check if product is buyable.