[ Index ]
 

Code source de eZ Publish 3.9.0

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/kernel/shop/ -> updatebasket.php (source)

   1  <?php
   2  //
   3  // Created on: <13-Sep-2005 09:39:11 jhe>
   4  //
   5  // SOFTWARE NAME: eZ publish
   6  // SOFTWARE RELEASE: 3.9.0
   7  // BUILD VERSION: 17785
   8  // COPYRIGHT NOTICE: Copyright (C) 1999-2006 eZ systems AS
   9  // SOFTWARE LICENSE: GNU General Public License v2.0
  10  // NOTICE: >
  11  //   This program is free software; you can redistribute it and/or
  12  //   modify it under the terms of version 2.0  of the GNU General
  13  //   Public License as published by the Free Software Foundation.
  14  //
  15  //   This program is distributed in the hope that it will be useful,
  16  //   but WITHOUT ANY WARRANTY; without even the implied warranty of
  17  //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18  //   GNU General Public License for more details.
  19  //
  20  //   You should have received a copy of version 2.0 of the GNU General
  21  //   Public License along with this program; if not, write to the Free
  22  //   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  23  //   MA 02110-1301, USA.
  24  //
  25  //
  26  
  27  include_once ( 'kernel/classes/ezbasket.php' );
  28  include_once ( 'lib/ezutils/classes/ezoperationhandler.php' );
  29  
  30  $http = eZHttpTool::instance();
  31  $basket = eZBasket::currentBasket();
  32  $module =& $Params['Module'];
  33  
  34  $itemCountList = $http->sessionVariable( 'ProductItemCountList' );
  35  $itemIDList = $http->sessionVariable( 'ProductItemIDList' );
  36  
  37  $operationResult = eZOperationHandler::execute( 'shop', 'updatebasket', array( 'item_count_list' => $itemCountList, 
  38                                                                                 'item_id_list' => $itemIDList ) );
  39  
  40  switch( $operationResult['status'] )
  41  {
  42      case EZ_MODULE_OPERATION_HALTED:
  43      {
  44          if ( isset( $operationResult['redirect_url'] ) )
  45          {
  46              $module->redirectTo( $operationResult['redirect_url'] );
  47              return;
  48          }
  49          else if ( isset( $operationResult['result'] ) )
  50          {
  51              $result =& $operationResult['result'];
  52              $resultContent = false;
  53              if ( is_array( $result ) )
  54              {
  55                  if ( isset( $result['content'] ) )
  56                      $resultContent = $result['content'];
  57                  if ( isset( $result['path'] ) )
  58                      $Result['path'] = $result['path'];
  59              }
  60              else
  61                  $resultContent =& $result;
  62              $Result['content'] =& $resultContent;
  63              return $Result;
  64         }
  65      }break;
  66  }
  67  
  68  $module->redirectTo( '/shop/basket/' );
  69  
  70  ?>


Généré le : Sat Feb 24 10:30:04 2007 par Balluche grâce à PHPXref 0.7