caboose-cms 0.5.199 → 0.5.200

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NzQ3ZmY5MGQxOTFkZmNjNzE1YTJiMmMwZTllMTU2MDM2NjFhMTlkOQ==
4
+ YzQwYWQxZGViMmI1ODlkNjNkMjJjODc3ZmE3NjZhYWY0NjViYTAwNA==
5
5
  data.tar.gz: !binary |-
6
- OGE1ZmZlMWNhMmZmNmE1NjE0YTE2NWJmODE2NTY4NDkwMWQ4Y2NkMA==
6
+ MDcwMDA0Y2M4MTRmMWI3Y2NiN2Q1N2U3YTM5MzAzZWQ3NzI0NjgyNQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OWUxNTY3MDU3YjgyYmQwMGMyNDJjZWExNDhkOTVlMGQ5N2FmYzU1OWNiZmNk
10
- ZmE3MGI5NjM4OWQ2Yzc3YmNlZjY2NjllMWFmMDE5NDlkZjhmZTRiMTg4OTAw
11
- OGJiYzI3MGU2OTE2YWFlMmM1NTNjMzViMGMwNTlkNmJjZDBhMjI=
9
+ NTUxNTM5MjEyYmM2OWJiYTZiZjEzODQ1YmUxOTE4MTY0NTRkYjg3MjliNjIx
10
+ OGJlY2JkYTVmNTRlMWQ3ZTYzZDYwMWE2ZDMwMDEzZDIyZjliMzI0ZDk3MThk
11
+ ODViZjRlYTQ2NGZhZjZkNWYwYTQwNGVlN2ZmZGIxOWYzZjg3MDQ=
12
12
  data.tar.gz: !binary |-
13
- YTdkMWJmMDYzMDMxMDhjOTUyZjQzNjVmMzQzNDc3ZjEwYWZjMmNmNmFmYmE0
14
- Y2Y2ODMxNzNkYzViNGYzM2VlYTJiMDZiNjk3ZGVjM2RkNzMxMDZhMDY1ZWFl
15
- N2ExZDZhOGU2MDNjOGNiNjQ5OTM5ZTc2Mzc3ZWUwNzcxOWQyMGM=
13
+ MmRiMWViNTgzYmFmMDE0NTQyOTMwMDJhOGRkZmZlNDAxZmY1MjExN2FmZTU3
14
+ NTNjZmY4NzdlYmEyODI1YjczYWY3MDI1ZTkzM2ZmNDRhYTk4NjliY2M4M2I0
15
+ NDZjYjM3MjM5M2EwNjg1OTFkZjQ4NzVjODI5NmQxYTFmN2VlYmY=
@@ -147,7 +147,7 @@ module Caboose
147
147
  else
148
148
  arr << { :content => "No Image" }
149
149
  end
150
- arr << { :content => "#{li.variant.product.title}\n#{li.variant.sku}", :borders => [:top, :right, :bottom], :width => 100 }
150
+ arr << { :content => "#{li.variant.product.title}\n#{li.variant.sku}\n#{self.gift_options(li)}", :borders => [:top, :right, :bottom], :width => 100 }
151
151
  arr << { :content => options }
152
152
  arr << { :content => "#{li.quantity}" , :align => :right }
153
153
  arr << { :content => "$" + sprintf("%.2f", li.unit_price) , :align => :right }
@@ -177,8 +177,8 @@ module Caboose
177
177
  arr << { :image => image, :fit => [40, 40], :borders => [:top, :bottom, :left], :width => 50 }
178
178
  else
179
179
  arr << { :content => "No Image" }
180
- end
181
- arr << { :content => "#{li.variant.product.title}\n#{li.variant.sku}", :borders => [:top, :right, :bottom], :width => 100 }
180
+ end
181
+ arr << { :content => "#{li.variant.product.title}\n#{li.variant.sku}\n#{self.gift_options(li)}", :borders => [:top, :right, :bottom], :width => 100 }
182
182
  arr << { :content => options }
183
183
  arr << { :content => "#{li.quantity}" , :align => :right }
184
184
  if li.unit_price
@@ -198,6 +198,15 @@ module Caboose
198
198
 
199
199
  table tbl , :position => 7, :width => 530
200
200
  end
201
+
202
+ def gift_options(li)
203
+ return "This item is not a gift." if !li.is_gift
204
+ str = "This item is a gift.\n"
205
+ str << "- Gift wrap: #{li.gift_wrap ? 'Yes' : 'No'}\n"
206
+ str << "- Hide prices: #{li.hide_prices ? 'Yes' : 'No'}\n"
207
+ str << "- Gift message:\n #{li.gift_message && li.gift_message.length > 0 ? li.gift_message : '[Empty]'}"
208
+ return str
209
+ end
201
210
 
202
211
  def payment_info
203
212
 
@@ -151,8 +151,8 @@ module Caboose
151
151
  arr << { :image => image, :fit => [40, 40], :borders => [:top, :bottom, :left], :width => 50 }
152
152
  else
153
153
  arr << { :content => "No Image" }
154
- end
155
- arr << { :content => "#{li.variant.product.title}\n#{li.variant.sku}", :borders => [:top, :right, :bottom], :width => 100 }
154
+ end
155
+ arr << { :content => "#{li.variant.product.title}\n#{li.variant.sku}\n#{self.gift_options(li)}", :borders => [:top, :right, :bottom], :width => 100 }
156
156
  arr << { :content => options }
157
157
  arr << { :content => "#{li.quantity}" , :align => :right }
158
158
  arr << { :content => "$" + sprintf("%.2f", li.unit_price) , :align => :right }
@@ -184,8 +184,8 @@ module Caboose
184
184
  arr << { :image => image, :fit => [40, 40], :borders => [:top, :bottom, :left], :width => 50 }
185
185
  else
186
186
  arr << { :content => "No Image" }
187
- end
188
- arr << { :content => "#{li.variant.product.title}\n#{li.variant.sku}", :borders => [:top, :right, :bottom], :width => 100 }
187
+ end
188
+ arr << { :content => "#{li.variant.product.title}\n#{li.variant.sku}\n#{self.gift_options(li)}", :borders => [:top, :right, :bottom], :width => 100 }
189
189
  arr << { :content => options }
190
190
  arr << { :content => "#{li.quantity}" , :align => :right }
191
191
  if li.unit_price
@@ -205,6 +205,15 @@ module Caboose
205
205
 
206
206
  table tbl , :position => 7, :width => 530
207
207
  end
208
+
209
+ def gift_options(li)
210
+ return "This item is not a gift." if !li.is_gift
211
+ str = "This item is a gift.\n"
212
+ str << "- Gift wrap: #{li.gift_wrap ? 'Yes' : 'No'}\n"
213
+ str << "- Hide prices: #{li.hide_prices ? 'Yes' : 'No'}\n"
214
+ str << "- Gift message:\n #{li.gift_message && li.gift_message.length > 0 ? li.gift_message : '[Empty]'}"
215
+ return str
216
+ end
208
217
 
209
218
  def payment_info(order)
210
219
 
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.5.199'
2
+ VERSION = '0.5.200'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.199
4
+ version: 0.5.200
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry