client/html/src/Client/Html/Account/Watch/Standard.php
protected function editItems( \Aimeos\MW\View\Iface $view, array $ids )
	{
		$context = $this->getContext();
		$cntl = \Aimeos\Controller\Frontend::create( $context, 'customer' );
		$item = $cntl->uses( ['product' => ['watch']] )->get();

		$config = [
			'timeframe' => $view->param( 'wat_timeframe', 7 ),
			'pricevalue' => $view->param( 'wat_pricevalue', '0.00' ),
			'price' => $view->param( 'wat_price', 0 ),
			'stock' => $view->param( 'wat_stock', 0 ),
			'currency' => $context->getLocale()->getCurrencyId(),
		];

		foreach( $ids as $id )
		{
			if( ( $listItem = $item->getListItem( 'product', 'watch', $id ) ) !== null )
			{
				$time = time() + ( $config['timeframe'] + 1 ) * 86400;
				$listItem = $listItem->setDateEnd( date( 'Y-m-d 00:00:00', $time ) )->setConfig( $config );

				$cntl->addListItem( 'product', $listItem );
			}
		}

		$cntl->store();
	}
protected function editItems( \Aimeos\MW\View\Iface $view, array $ids )
	{
		$context = $this->getContext();
		$cntl = \Aimeos\Controller\Frontend::create( $context, 'customer' );
		$item = $cntl->uses( ['product' => ['watch']] )->get();

		$config = [
			'timeframe' => $view->param( 'wat_timeframe', 7 ),
			'pricevalue' => $view->param( 'wat_pricevalue', '0.00' ),
			'price' => $view->param( 'wat_price', 0 ),
			'stock' => $view->param( 'wat_stock', 0 ),
			'currency' => $context->getLocale()->getCurrencyId(),
		];

		foreach( $ids as $id )
		{
			if( ( $listItem = $item->getListItem( 'product', 'watch', $id ) ) !== null )
			{
				$time = time() + ( $config['timeframe'] + 1 ) * 86400;
				$listItem = $listItem->setDateEnd( date( 'Y-m-d 00:00:00', $time ) )->setConfig( $config );

				$cntl->addListItem( 'product', $listItem );
			}
		}

		$cntl->store();
	}
protected function editItems ( \ Aimeos \ MW \ View \ Iface $ view , array $ ids ) { $ context = $ this -> getContext ( ) ; $ cntl = \ Aimeos \ Controller \ Frontend :: create ( $ context , 'customer' ) ; $ item = $ cntl -> uses ( [ 'product' => [ 'watch' ] ] ) -> get ( ) ; $ config = [ 'timeframe' => $ view -> param ( 'wat_timeframe' , 7 ) , 'pricevalue' => $ view -> param ( 'wat_pricevalue' , '0.00' ) , 'price' => $ view -> param ( 'wat_price' , 0 ) , 'stock' => $ view -> param ( 'wat_stock' , 0 ) , 'currency' => $ context -> getLocale ( ) -> getCurrencyId ( ) , ] ; foreach ( $ ids as $ id ) { if ( ( $ listItem = $ item -> getListItem ( 'product' , 'watch' , $ id ) ) !== null ) { $ time = time ( ) + ( $ config [ 'timeframe' ] + 1 ) * 86400 ; $ listItem = $ listItem -> setDateEnd ( date ( 'Y-m-d 00:00:00' , $ time ) ) -> setConfig ( $ config ) ; $ cntl -> addListItem ( 'product' , $ listItem ) ; } } $ cntl -> store ( ) ; }
Updates the item using the given reference IDs

@param \Aimeos\MW\View\Iface $view View object
@param array $ids List of referenced IDs
Updates the item using the given reference IDs