public function getSession( $type = '' )
	{
		$context = $this->_getContext();
		$session = $context->getSession();
		$locale = $context->getLocale();
		$currency = $locale->getCurrencyId();
		$language = $locale->getLanguageId();
		$sitecode = $locale->getSite()->getCode();
		$key = 'arcavias/basket/content-' . $sitecode . '-' . $language . '-' . $currency . '-' . strval( $type );

		if( ( $serorder = $session->get( $key ) ) === null ) {
			return $this->createItem();
		}

		$iface = 'MShop_Order_Item_Base_Interface';

		if( ( $order = unserialize( $serorder ) ) === false || !( $order instanceof $iface ) )
		{
			$msg = sprintf( 'Invalid serialized basket. "%1$s" returns "%2$s".', __METHOD__, $serorder );
			$context->getLogger()->log( $msg, MW_Logger_Abstract::WARN );

			return $this->createItem();
		}

		MShop_Factory::createManager( $context, 'plugin' )->register( $order, 'order' );

		return $order;
	}
public function getSession( $type = '' )
	{
		$context = $this->_getContext();
		$session = $context->getSession();
		$locale = $context->getLocale();
		$currency = $locale->getCurrencyId();
		$language = $locale->getLanguageId();
		$sitecode = $locale->getSite()->getCode();
		$key = 'arcavias/basket/content-' . $sitecode . '-' . $language . '-' . $currency . '-' . strval( $type );

		if( ( $serorder = $session->get( $key ) ) === null ) {
			return $this->createItem();
		}

		$iface = 'MShop_Order_Item_Base_Interface';

		if( ( $order = unserialize( $serorder ) ) === false || !( $order instanceof $iface ) )
		{
			$msg = sprintf( 'Invalid serialized basket. "%1$s" returns "%2$s".', __METHOD__, $serorder );
			$context->getLogger()->log( $msg, MW_Logger_Abstract::WARN );

			return $this->createItem();
		}

		MShop_Factory::createManager( $context, 'plugin' )->register( $order, 'order' );

		return $order;
	}
public function getSession ( $ type = '' ) { $ context = $ this -> _getContext ( ) ; $ session = $ context -> getSession ( ) ; $ locale = $ context -> getLocale ( ) ; $ currency = $ locale -> getCurrencyId ( ) ; $ language = $ locale -> getLanguageId ( ) ; $ sitecode = $ locale -> getSite ( ) -> getCode ( ) ; $ key = 'arcavias/basket/content-' . $ sitecode . '-' . $ language . '-' . $ currency . '-' . strval ( $ type ) ; if ( ( $ serorder = $ session -> get ( $ key ) ) === null ) { return $ this -> createItem ( ) ; } $ iface = 'MShop_Order_Item_Base_Interface' ; if ( ( $ order = unserialize ( $ serorder ) ) === false || ! ( $ order instanceof $ iface ) ) { $ msg = sprintf ( 'Invalid serialized basket. "%1$s" returns "%2$s".' , __METHOD__ , $ serorder ) ; $ context -> getLogger ( ) -> log ( $ msg , MW_Logger_Abstract :: WARN ) ; return $ this -> createItem ( ) ; } MShop_Factory :: createManager ( $ context , 'plugin' ) -> register ( $ order , 'order' ) ; return $ order ; }
Returns the current basket of the customer.

@param string $type Basket type if a customer can have more than one basket
@return MShop_Order_Item_Base_Interface Shopping basket
Returns the current basket of the customer .