def activemerchant_package
      sc = self.invoice.site.store_config
      
      weight = 0.0
      self.line_items.each{ |li| weight = weight + (li.variant.weight * li.quantity) }      
      weight = weight * 0.035274 if sc.weight_unit == StoreConfig::WEIGHT_UNIT_METRIC # grams to ounces
                  
      sp = self.shipping_package
      dimensions = [sp.outside_length, sp.outside_width, sp.outside_height]
      if sc.length_unit == StoreConfig::LENGTH_UNIT_METRIC # cm to inches
        dimensions[0] = dimensions[0] / 2.54
        dimensions[1] = dimensions[0] / 2.54
        dimensions[2] = dimensions[0] / 2.54
      end
      
      return ActiveShipping::Package.new(weight, dimensions, :units => :imperial, :container => :variable)
    end
def activemerchant_package
      sc = self.invoice.site.store_config
      
      weight = 0.0
      self.line_items.each{ |li| weight = weight + (li.variant.weight * li.quantity) }      
      weight = weight * 0.035274 if sc.weight_unit == StoreConfig::WEIGHT_UNIT_METRIC # grams to ounces
                  
      sp = self.shipping_package
      dimensions = [sp.outside_length, sp.outside_width, sp.outside_height]
      if sc.length_unit == StoreConfig::LENGTH_UNIT_METRIC # cm to inches
        dimensions[0] = dimensions[0] / 2.54
        dimensions[1] = dimensions[0] / 2.54
        dimensions[2] = dimensions[0] / 2.54
      end
      
      return ActiveShipping::Package.new(weight, dimensions, :units => :imperial, :container => :variable)
    end
Gets the activemerchant package based on the shipping package