Shop_ShippingOption class
  
  
  
    | Defined in | 
    /modules/shop/models/shop_shippingoption.php, lines 38-1150 | 
   
      
      | Inheritance | 
      Phpr_Extension » Phpr_Extensible » Phpr_Validatable » Db_Base » Db_WhereBase » Db_SqlBase » Db_ActiveRecord » Shop_ShippingOption | 
     
          
      | Author | 
      LemonStand eCommerce Inc. | 
     
   
  Represents a shipping option.
Object of this class is available through the  $shipping_method property of the  Shop_Order class. 
Also, a collection of shipping option objects is available on the Shipping Method step of the Checkout process.  
  
  
      
    
          Show inherited properties. 
    
    
     
     
    
   
  
    Property details
  
      
      ¶
      description property
    
    
    public string $description; 
    
    Specifies the shipping option description in plain text format. 
          
      ¶
      error_hint property
    
    
    public string $error_hint; 
    
    Contains an error message returned by the shipping service provider. By default LemonStand does not return shipping options with errors. You can enable this feature on the System/Settings/Shipping 
  Configuration page, on the Parameters tab. If this field is not empty, its content should be displayed 
  instead of the option price and radio button. 
          
      ¶
      id property
    
    
    public integer $id; 
    
    Specifies the option identifier in the database. 
          
      ¶
      is_free property
    
    
    public boolean $is_free; 
    
    Determines whether the shipping option is free. 
          
      ¶
      ls_api_code property
    
    
    public string $ls_api_code; 
    
    Specifies the option API code. 
          
      ¶
      multi_option property
    
    
    public boolean $multi_option; 
    
    Indicates whether the option has sub-options. Some shipping methods can have multiple options, for example UPS Standard and UPS Express. 
          
      ¶
      multi_option_name property
    
    
    public boolean $multi_option_name; 
    
    Specifies the name of the parent option for sub-options. This property is set in the flat shipping option lists. See shop:on_evalShippingRate,  shop:checkout.  
          
      ¶
      name property
    
    
    public string $name; 
    
    Specifies the shipping option name. 
          
      ¶
      quote property
    
    
    public float $quote; 
    
    Specifies the shipping quote. This property is applicable only during the Checkout process. 
          
      ¶
      sub_options property
    
    
    public array $sub_options; 
    
    Contains a list of sub-options of a multi-option shipping method. Each element of the array is an object with the following fields:
   
    - id - specifies the sub-option identifier. Identifiers are specific for each shipping method.
 
    - name - specifies the sub-option name.
 
    - quote - specifies the sub-option shipping quote.
 
    - is_free - indicates whether the sub-option is free
 
    
          
      ¶
      taxable property
    
    
    public boolean $taxable; 
    
    Determines whether tax is applicable for the shipping option. 
          Method details
  
      
      ¶
      find_by_api_code() method
    
    
    public static Shop_ShippingOption find_by_api_code(string $code) 
    
        
          
                  
            | $code | 
            string | 
            specifies the API code. | 
           
                          
            | {return} | 
            Shop_ShippingOption | 
            returns the shipping option object. Returns NULL if the record with the specified API code is not found. | 
           
               
        
    Finds a shipping option by its API code. 
          
      ¶
      find_by_id() method
    
    
    public static Shop_ShippingOption find_by_id(string $code) 
    
        
          
                  
            | $code | 
            string | 
            specifies the API code. | 
           
                          
            | {return} | 
            Shop_ShippingOption | 
            returns the shipping option object. Returns NULL if the record with the specified API code is not found. | 
           
               
        
    Finds a shipping option by its identifier code.
This method uses internal memory caching. 
      
  
 |