spree_zoned 0.5.21 → 0.5.22

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,13 @@
1
+ module Spree
2
+ ProductsHelper.module_eval do
3
+
4
+ def getCountryPrice(p)
5
+ c = session[:zoned] && session[:zoned][:current_country]
6
+ c = c ? c.to_i : 0
7
+ return p.price if c == 0
8
+ zpl = Spree::Zoned::Product.where "spree_product_id = ? AND spree_country_id = ?", p.id, c
9
+ zpl == [] ? p.price : zpl[0].cprice
10
+ end
11
+
12
+ end
13
+ end
@@ -0,0 +1,6 @@
1
+ Deface::Override.new(
2
+ :name => "zone_shared_product",
3
+ :virtual_path => "spree/shared/_products",
4
+ :replace_contents => "[data-hook='products_list_item']",
5
+ :partial => "spree/shared/products_list_item",
6
+ )
@@ -0,0 +1,5 @@
1
+ <div class="product-image">
2
+ <%= link_to small_image(product, :itemprop => "image"), product, :itemprop => 'url' %>
3
+ </div>
4
+ <%= link_to truncate(product.name, :length => 50), product, :class => 'info', :itemprop => "name", :title => product.name %>
5
+ <span class="price selling" itemprop="price"><%= number_to_currency(getCountryPrice(product)) %></span>
data/spree_zoned.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
  Gem::Specification.new do |s|
3
3
  s.platform = Gem::Platform::RUBY
4
4
  s.name = 'spree_zoned'
5
- s.version = '0.5.21'
5
+ s.version = '0.5.22'
6
6
  s.summary = 'A Spree extension to make your store zoned'
7
7
  s.description = "Everything you need for a zoned Spree store: zoned pricing, zoned products, zoned product ordering, zoned locales, ...\nProbalbly essential to you if you operate outside of the US."
8
8
  s.required_ruby_version = '>= 1.9.2'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_zoned
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.21
4
+ version: 0.5.22
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-01 00:00:00.000000000 Z
12
+ date: 2012-07-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: spree_core
@@ -137,16 +137,19 @@ files:
137
137
  - app/helpers/spree/admin/navigation_helper_decorator.rb
138
138
  - app/helpers/spree/admin/products_helper_decorator.rb
139
139
  - app/helpers/spree/base_helper_decorator.rb
140
+ - app/helpers/spree/products_helper_decorator.rb
140
141
  - app/models/spree/product_decorator.rb
141
142
  - app/models/spree/zoned/product.rb
142
143
  - app/overrides/add_country_selectbox.rb
143
144
  - app/overrides/add_prd_country.rb
144
145
  - app/overrides/replace_admin_product_right.rb
145
146
  - app/overrides/replace_index_rows.rb
147
+ - app/overrides/zone_shared_product.rb
146
148
  - app/views/spree/admin/zoned/_index_rows.html.erb
147
149
  - app/views/spree/admin/zoned/_prd_country.html.erb
148
150
  - app/views/spree/admin/zoned/_productright.html.erb
149
151
  - app/views/spree/admin/zoned/setcountry.js.erb
152
+ - app/views/spree/shared/_products_list_item.html.erb
150
153
  - app/views/spree/zoned/_countryselect.html.erb
151
154
  - app/views/spree/zoned/setcountry.js.erb
152
155
  - config/initializers/zoned_init.rb