[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 *Title: Enhanced shippingmanager. 2 3 *Incentive: 4 Added support for VAT and having more than one shipping item. 5 6 *Documentation: 7 Added info about what should be returned by the function getShippingInfo. 8 9 The function are fetching the shipping info and need to be reimplemented in a new shippinghandler. 10 It's also possible to return additional parameters to use in the templates. 11 12 \return an array with shipping info. 13 An example for an array that should be returned. 14 15 \code 16 array( 'shipping_items' => array( array( 'description' => 'Shipping vat: 12%', 17 'cost' => 50.25, 18 'vat_value' => 12, 19 'is_vat_inc' => 0, 20 'management_link' => '/myshippingmodule/options/12' ), 21 array( 'description' => 'Shipping vat: 25%', 22 'cost' => 100.75, 23 'vat_value' => 25, 24 'is_vat_inc' => 1, 25 'management_link' => '/myshippingmodule/options/25' ) ), 26 'description' => 'Total Shipping', 27 'cost' => 10.25, 28 'vat_value' => false, 29 'is_vat_inc' => 1, 30 'management_link' => '/myshippingmodule/options' ); 31 \endcode 32 33 An example for the shippingvalues with only one shippingitem. 34 \code 35 array( 'description' => 'Total Shipping vat: 16%', 36 'cost' => 10.25, 37 'vat_value' => 16, 38 'is_vat_inc' => 1, 39 'management_link' => '/myshippingmodule/options/1234' ); 40 \endcode 41 42 The returned array for each shipping item should consist of these keys: 43 - order_id - The order id for the current order. 44 - description - An own description of the shipping item. 45 - cost - A float value of the cost for the shipping. The value should be a float value. 46 - vat_value - The vat value that should be added to the shipping item. The value should be an integer or 47 false if the cost is combined by several VAT prices. 48 - is_vat_inc - Integer, either 0, 1. 0: The cost is excluded VAT. 49 1: the cost is included VAT. 50 51 - management_link - Example of an additional parameter that can be used 52 in a template. Ex: basket.tpl 53 54 55 You are also able to receive more information from the shippingmanager by the function updatePriceInfo and vatPriceInfo, 56 which will calculate VAT prices based on the original values. 57 58 The function updatePriceInfo() will load a custom basketInfoHandler where a default handler which are located in: 59 60 kernel/classes/basketinfohandlers/ezdefaultbasketinfohandler.php 61 62 and will be included as standard. 63 You'll be able to add a custom BasketInfoHandler in extensions, where you can specify the handler in shop.ini: 64 65 [BasketInfoSettings] 66 Handler=ezdefault 67 68 The new functionality in the shippingmanager should be backwardscompatible.
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 10:30:04 2007 | par Balluche grâce à PHPXref 0.7 |