controller/frontend/src/Controller/Frontend/Order/Standard.php
protected function checkLimit( $baseId )
	{
		/** controller/frontend/order/limit-seconds
		 * Order limitation time frame in seconds
		 *
		 * Creating new orders is limited to avoid abuse and mitigate denial of
		 * service attacks. Within the configured time frame, only one order
		 * item can be created per order base item. All orders for the order
		 * base item within the last X seconds are counted.  If there's already
		 * one available, an error message will be shown to the user instead of
		 * creating the new order item.
		 *
		 * @param integer Number of seconds to check order items within
		 * @since 2017.05
		 * @category Developer
		 * @see controller/frontend/basket/limit-count
		 * @see controller/frontend/basket/limit-seconds
		 */
		$seconds = $this->getContext()->getConfig()->get( 'controller/frontend/order/limit-seconds', 300 );

		$search = $this->manager->createSearch()->setSlice( 0, 0 );
		$search->setConditions( $search->combine( '&&', [
			$search->compare( '==', 'order.baseid', $baseId ),
			$search->compare( '>=', 'order.ctime', date( 'Y-m-d H:i:s', time() - $seconds ) ),
		] ) );

		$total = 0;
		$this->manager->searchItems( $search, [], $total );

		if( $total > 0 ) {
			throw new \Aimeos\Controller\Frontend\Order\Exception( sprintf( 'The order has already been created' ) );
		}

		return $this;
	}
protected function checkLimit( $baseId )
	{
		/** controller/frontend/order/limit-seconds
		 * Order limitation time frame in seconds
		 *
		 * Creating new orders is limited to avoid abuse and mitigate denial of
		 * service attacks. Within the configured time frame, only one order
		 * item can be created per order base item. All orders for the order
		 * base item within the last X seconds are counted.  If there's already
		 * one available, an error message will be shown to the user instead of
		 * creating the new order item.
		 *
		 * @param integer Number of seconds to check order items within
		 * @since 2017.05
		 * @category Developer
		 * @see controller/frontend/basket/limit-count
		 * @see controller/frontend/basket/limit-seconds
		 */
		$seconds = $this->getContext()->getConfig()->get( 'controller/frontend/order/limit-seconds', 300 );

		$search = $this->manager->createSearch()->setSlice( 0, 0 );
		$search->setConditions( $search->combine( '&&', [
			$search->compare( '==', 'order.baseid', $baseId ),
			$search->compare( '>=', 'order.ctime', date( 'Y-m-d H:i:s', time() - $seconds ) ),
		] ) );

		$total = 0;
		$this->manager->searchItems( $search, [], $total );

		if( $total > 0 ) {
			throw new \Aimeos\Controller\Frontend\Order\Exception( sprintf( 'The order has already been created' ) );
		}

		return $this;
	}
protected function checkLimit ( $ baseId ) { /** controller/frontend/order/limit-seconds
		 * Order limitation time frame in seconds
		 *
		 * Creating new orders is limited to avoid abuse and mitigate denial of
		 * service attacks. Within the configured time frame, only one order
		 * item can be created per order base item. All orders for the order
		 * base item within the last X seconds are counted.  If there's already
		 * one available, an error message will be shown to the user instead of
		 * creating the new order item.
		 *
		 * @param integer Number of seconds to check order items within
		 * @since 2017.05
		 * @category Developer
		 * @see controller/frontend/basket/limit-count
		 * @see controller/frontend/basket/limit-seconds
		 */ $ seconds = $ this -> getContext ( ) -> getConfig ( ) -> get ( 'controller/frontend/order/limit-seconds' , 300 ) ; $ search = $ this -> manager -> createSearch ( ) -> setSlice ( 0 , 0 ) ; $ search -> setConditions ( $ search -> combine ( '&&' , [ $ search -> compare ( '==' , 'order.baseid' , $ baseId ) , $ search -> compare ( '>=' , 'order.ctime' , date ( 'Y-m-d H:i:s' , time ( ) - $ seconds ) ) , ] ) ) ; $ total = 0 ; $ this -> manager -> searchItems ( $ search , [ ] , $ total ) ; if ( $ total > 0 ) { throw new \ Aimeos \ Controller \ Frontend \ Order \ Exception ( sprintf ( 'The order has already been created' ) ) ; } return $ this ; }
Checks if more orders than allowed have been created by the user

@param string $baseId Unique ID of the order base item (basket)
@return \Aimeos\Controller\Frontend\Order\Iface Order controller for fluent interface
@throws \Aimeos\Controller\Frontend\Order\Exception If limit is exceeded
Checks if more orders than allowed have been created by the user