eZPublish(LegacyStack)  5.1
eZShopOperationCollection Class Reference

The class eZShopOperationCollection does. More...

Public Member Functions

 activateOrder ($orderID)
 
 addToBasket ($objectID, $optionList, $quantity)
 
 checkCurrency ($orderID)
 
 eZShopOperationCollection ()
 
 fetchOrder ($orderID)
 
 handleShipping ($orderID)
 
 handleUserCountry ($orderID)
 
 sendOrderEmails ($orderID)
 
 updateBasket ($itemCountList, $itemIDList)
 
 updateShippingInfo ($objectID, $optionList)
 

Detailed Description

The class eZShopOperationCollection does.

Member Function Documentation

eZShopOperationCollection::activateOrder (   $orderID)
eZShopOperationCollection::addToBasket (   $objectID,
  $optionList,
  $quantity 
)

Operation entry: Adds the object $objectID with options $optionList to the current basket.

eZShopOperationCollection::checkCurrency (   $orderID)

Verify that we have a valid currency before the the order can continue.

eZShopOperationCollection::eZShopOperationCollection ( )

Constructor

eZShopOperationCollection::fetchOrder (   $orderID)
eZShopOperationCollection::handleShipping (   $orderID)

Operation entry: Adds order item: shipping. $orderID contains the order id for the shipping handler.

The function handleShipping() are runn in the process of confirmorder and is the final function for creating an order_item in the order confirmation.

An example for an array that should be returned by the function eZShippingManager::getShippingInfo( $productCollectionID ):

array( 'shipping_items' => array( array( 'description' => 'Shipping vat: 12%',
'cost' => 50.25,
'vat_value' => 12,
'is_vat_inc' => 0 ),
array( 'description' => 'Shipping vat: 25%',
'cost' => 100.75,
'vat_value' => 25,
'is_vat_inc' => 0 ) ),
'description' => 'Total Shipping',
'cost' => 182.22,
'vat_value' => false,
'is_vat_inc' => 1 );

An example for the shippingvalues with only one shippingitem, old standard.

array( 'description' => 'Total Shipping vat: 16%',
'cost' => 10.25,
'vat_value' => 16,
'is_vat_inc' => 1 );

The returned array for each shipping item should consist of these keys:

  • order_id - The order id for the current order.
  • description - An own description of the shipping item.
  • cost - A float value of the cost for the shipping.
  • vat_value - The vat value that should be added to the shipping item.
  • is_vat_inc - Either 0, 1 or false. 0: The cost is excluded VAT. 1: the cost is included VAT. false: The cost is combined by several other VAT prices.

This function may also send additional parameters to be used in other templates, like in the basket.

eZShopOperationCollection::handleUserCountry (   $orderID)

Operation entry: Extracts user country from order account info and recalculates VAT with country given.

eZShopOperationCollection::sendOrderEmails (   $orderID)
eZShopOperationCollection::updateBasket (   $itemCountList,
  $itemIDList 
)
eZShopOperationCollection::updateShippingInfo (   $objectID,
  $optionList 
)

Operation entry: Updates shipping info for items in the current basket.


The documentation for this class was generated from the following file: