Version: current

     1 <?php
     2
     3 /**
     4  * Способ оплаты с фиксированной стоимостью
     5  *
     6  * @package cart_shipping
     7  * @author dvp
     8  */
     9 class FixedShippingMethod extends ShippingMethod {
    10
    11     static $db = array(
    12         "HandlingFee" => "CatalogPrice",
    13     );
    14
    15     /**
    16      * Рассчитывает стоимость доставки
    17      *
    18      * @param ShippingPackage $package
    19      * @param Address $address
    20      *
    21      * @return null|float
    22      */
    23     function calculateRate(ShippingPackage $package, Address $address){
    24 //      $this->CalculatedRate = ($this->HandlingFee > 0) ? $this->HandlingFee : null;
    25         $this->CalculatedRate = $this->HandlingFee;
    26         return $this->CalculatedRate;
    27     }
    28 }
    29

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -