View Issue Details

IDProjectCategoryView StatusLast Update
0005086OXID eShop (all versions)2.3. Extensions (modules, themes)public2013-04-29 16:09
Reportero.novytskiy Assigned To 
PriorityhighSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
PlatformLinuxOSDebianOS Version6
Summary0005086: Not overload oxcmp_basket
DescriptionIf you try to overload classes oxcmp_basket, then going to step 1 checkout we get the error:
PHP Fatal error: Maximum execution time of 30 seconds exceeded in / ***** / core /oxutilsobject.php on line 221.
Additional InformationFor testing

Metadata

$aModule = array(
    'id' => 'limitbuyproduct',
    'title' => 'Set minimum or maximum product',
    'description' => 'Set limits for buying of the product for install ',
    'thumbnail' => 'picture.png',
    'version' => '1.0',
    'author' => 'OXID eSales AG',
    'extend' => array(
        'oxcmp_basket'=>'/limitbuyproduct/components/basket'
        
    ),

);


/limitbuyproduct/components/basket.php


<?php

class basket extends basket_parent {

    
    
     public function tobasket( $sProductId = null, $dAmount = null, $aSel = null, $aPersParam = null, $blOverride = false )
    {
        // adding to basket is not allowed ?
        $myConfig = $this->getConfig();
        if ( oxRegistry::getUtils()->isSearchEngine() ) {
            return;
        }

        // adding articles
        if ( $aProducts = $this->_getItems( $sProductId, $dAmount, $aSel, $aPersParam, $blOverride ) ) {

            $this->_setLastCallFnc( 'tobasket' );
            $oBasketItem = $this->_addItems( $aProducts );

            // new basket item marker
            if ( $oBasketItem && $myConfig->getConfigParam( 'iNewBasketItemMessage' ) != 0 ) {
                $oNewItem = new stdClass();
                $oNewItem->sTitle = $oBasketItem->getTitle();
                $oNewItem->sId = $oBasketItem->getProductId();
                $oNewItem->dAmount = $oBasketItem->getAmount();
                $oNewItem->dBundledAmount = $oBasketItem->getdBundledAmount();

                // passing article
                oxSession::setVar( '_newitem', $oNewItem );
            }

            // redirect to basket
            return $this->_getRedirectUrl();
        }
    }
}
TagsNo tags attached.
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Activities

Linas Kukulskis

2013-04-29 16:09

reporter   ~0008643

please use unique class names, basket name already exist;

 'oxcmp_basket'=>'/limitbuyproduct/components/[yourPrefix]basket'