caboose-store 0.0.37 → 0.0.38

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
- MDE0NjMyNTQwOGMyN2NmYTM1Nzg2NzI1NTZmZjE4YWVjZWRhMDljOQ==
4
+ MjYzYjI2MmYxNTBlYjQ3MmM3NGFkZDFiZDhiOTdhNTY1NWFkNTYxYg==
5
5
  data.tar.gz: !binary |-
6
- ZWJmMWVkZjg4ZjI1NWFjZjY3M2Q5MTM1ZDQzNTczYWFhNzE5MTVhZg==
6
+ ZDUyYjMyZDVlYmNiYTYzMTUwNmJiNTI1NjhmODBjZDgyNTMwZjE3NA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NThmYzJhZTM5MWM5MjUzNGY4MTY3ZGMzNzZkNjJiYmM2ZTU2OWZmZjU2N2Rl
10
- ZjkyOTE0MDU2OTc0MzkyMmYwMTQwZjU3OWE4OTI1NTQ2ZmQ4Mzc5YTdhMWYz
11
- ZmM0MDM1NzE4NmYxMWFlZDFkMjM1YmJjNjRlNmQxOTA4NTgxYTc=
9
+ OTQ5YWM4OTdlOTJlNzBlZjMyNTM0MWU1MjM0Y2RlYjA1YTQ5YjBlMTA0NzEw
10
+ ZmNhZWQ3M2RiNzFlZDFiZDk1MDgxNjUxMWZjMjY3MTRlZDQ3MTFlYThjODVk
11
+ NmU4MzIzZjFhYjg4NDM4ODI0NDI1NDRjMWFlZmY1NzEzZjc1Mjk=
12
12
  data.tar.gz: !binary |-
13
- MzZjY2ZkMjM4OGEwZDQ4MjQ1YmQwMTVkNGRkNjI2YmIwYzE2YmUxYjU2OWVh
14
- ZDcxMTdkOWE2YjljM2U1YjZmYmU5MGZlOWM5YzBhOWEzZDBjN2NkOTA3M2Fj
15
- ZGI2ZDA2ODk1ODdmZDU5MjVmYmQwNzRjMTFjZDgzMDFlODIyOGY=
13
+ NGEwNzM0ODVhNTE2ZTJmNjNjYTJkZjIwMDU3M2U1N2ViOWE0MjdhNzQ1NGZk
14
+ YTJjMmJjMmE3YzJkOGFjNzc3Nzk2N2FjNWI0MmQwNmQ3MzM0YWFkYjZmNGYx
15
+ M2I3YmQ1YmU4YjJjZTYyMzVkMDBmY2EyYTkxZjAzZjMwOTY0ODg=
@@ -195,15 +195,15 @@ module CabooseStore
195
195
 
196
196
  # Remove passed variants
197
197
  # redirect_to "/admin/products/#{params[:id]}/variants/group"
198
-
199
- render json: true
198
+
199
+ render :json => true
200
200
  end
201
201
 
202
202
  # GET /admin/products/update-vendor-status/:id
203
203
  def admin_update_vendor_status
204
204
  vendor = Vendor.find(params[:id])
205
205
  vendor.status = params[:status]
206
- render json: vendor.save
206
+ render :json => vendor.save
207
207
  end
208
208
 
209
209
  # GET /admin/products
@@ -261,8 +261,8 @@ module CabooseStore
261
261
  end
262
262
 
263
263
  @products = Product.all(
264
- include: [:variants, :vendor],
265
- conditions: conditions
264
+ :include => [:variants, :vendor],
265
+ :conditions => conditions
266
266
  )
267
267
 
268
268
  render :layout => 'caboose/admin'
@@ -130,16 +130,16 @@ module CabooseStore
130
130
  self.variants.where(:status => ['Active', 'Inactive'])
131
131
  end
132
132
 
133
- def option1_values
134
- arr = self.variants.reorder(:option1_sort_order).pluck(:option1).uniq.reject { |x| x.nil? || x.empty? }
133
+ def option1_values
134
+ self.variants.where(:status => 'Active').reorder(:option1_sort_order).pluck(:option1).uniq.reject { |x| x.nil? || x.empty? }
135
135
  end
136
136
 
137
137
  def option2_values
138
- self.variants.reorder(:option2_sort_order).pluck(:option2).uniq.reject { |x| x.nil? || x.empty? }
138
+ self.variants.where(:status => 'Active').reorder(:option2_sort_order).pluck(:option2).uniq.reject { |x| x.nil? || x.empty? }
139
139
  end
140
140
 
141
141
  def option3_values
142
- self.variants.reorder(:option3_sort_order).pluck(:option3).uniq.reject { |x| x.nil? || x.empty? }
142
+ self.variants.where(:status => 'Active').reorder(:option3_sort_order).pluck(:option3).uniq.reject { |x| x.nil? || x.empty? }
143
143
  end
144
144
  end
145
145
  end
@@ -71,10 +71,7 @@ captured = @order.financial_status == 'captured'
71
71
  <% end %>
72
72
  <tr><td colspan='5' align='right'>Subtotal </td><td align='right' id='subtotal' ><%= number_to_currency(@order.subtotal ) %></td></tr>
73
73
  <tr><td colspan='5' align='right'>Tax </td><td align='right' id='tax' ><%= number_to_currency(@order.tax ) %></td></tr>
74
- <% if !@order.shipping.nil? %>
75
- <tr><td colspan='5' align='right'><%= @order.shipping_method %> Shipping &amp; Handling </td><td align='right' id='shipping' ><%= number_to_currency(@order.shipping + @order.handling) %></td></tr>
76
- <% end %>
77
-
74
+ <tr><td colspan='5' align='right'><%= @order.shipping_method ? @order.shipping_method : '' %> Shipping &amp; Handling </td><td align='right' id='shipping'><%= number_to_currency(@order.shipping + @order.handling) %></td></tr>
78
75
  <tr>
79
76
  <td colspan='5' align='right'>Discount</td>
80
77
  <td align='right'>
@@ -53,7 +53,7 @@ end
53
53
  <th>&nbsp;</th>
54
54
  </tr>
55
55
  <tbody id='variants_tbody'>
56
- <% p.variants.where(:status => ['Active', 'Inactive']).each do |v| %>
56
+ <% p.variants.where(:status => ['Active', 'Inactive']).each do |v| %>
57
57
  <tr id='variant_<%= v.id %>' <% if @highlight_variant_id && v.id == @highlight_variant_id %>class='highlight'<% end %>>
58
58
  <td class='sort_handle'>&nbsp;</td>
59
59
  <% if @cols['option1' ] && p.option1 %><td><div id='variant_<%= v.id %>_option1' ></div></td><% end %>
@@ -1,3 +1,3 @@
1
1
  module CabooseStore
2
- VERSION = '0.0.37'
2
+ VERSION = '0.0.38'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-store
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.37
4
+ version: 0.0.38
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-09 00:00:00.000000000 Z
11
+ date: 2014-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: caboose-cms