10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'app/models/spree_temando/variant_shipping_decorator.rb', line 10
def to_temando_item
return nil unless self.temando_quotable?
item = Temando::Item::GeneralGoods.new
if self.respond_to?(:packaging_optimization) then
Rails.logger.warn 'DEPRECATED: Spree::Variant#packaging_optimization. Use #populate_temando_item instead'
item.packaging_optimization = self.packaging_optimization
end
item.height = (self.height / 100.0)
item.length = (self.depth / 100.0)
item.width = (self.width / 100.0)
item.weight = self.weight
item.quantity = 1
item.description = self.name
item = populate_temando_item(item) if self.respond_to?(:populate_temando_item)
item
end
|