spree_quick_cart 0.2.1 → 2.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 257c167105ca217e77708ba560c1228ef180d452
4
- data.tar.gz: 32d9dfab30dd1b9001e5c1d273c8f6167168d446
3
+ metadata.gz: 9df8ef37583492e95c7bbe55d71d16695539b6a5
4
+ data.tar.gz: b94ebd79718a5e77f20654e46d78a0ee9d936309
5
5
  SHA512:
6
- metadata.gz: b36a33e29aa231d623fb600be5d0c848f9b5b8a602b850dea7954cb71ede2b9511edf4278f594f3fb7ced46e02ca1622273029b5630eafe1a028f275b8337a16
7
- data.tar.gz: fabc16d7f793b58e7de0b5d24ff98e44250ea0a433b5d16aefdb9a95ebd8d8ab34674c663d6122bba7ccf333ab8ace3c4e81fe51e45bd7929670d744fdb43093
6
+ metadata.gz: a711ed5b9660739e40023b7fc774e79dbc71ec9e7cfae30c6bc089b83a89459b6d6c9bc1830380d3790d3a3a98abb057fbc75895410ae9ac938be667997e9014
7
+ data.tar.gz: 914b85c495bc9e95ac68893e55109631775ca9f20e9c3c91ad9bc95211ce142861e4477d20cbcd5a2e8e97a4f8f95a2aa2a30fe8c6cadd3dda57859c3b1a0375
@@ -37,9 +37,9 @@ function SpreeQuickCart() {
37
37
  cache: false,
38
38
  dataType: 'json',
39
39
  success: function(data, textStatus, jqXHR) {
40
- total = data.item_total;
41
- items_count = data.item_count;
42
- $('#link-to-cart .cart-info').html("Cart: (" + items_count + ") <span class='amount'>$" + total + "</span>")
40
+ total = data.display_total;
41
+ items_count = data.total_quantity;
42
+ $('#link-to-cart .cart-info').html("Cart: (" + items_count + ") <span class='amount'>" + total + "</span>")
43
43
  that.showFlashMessage('Item added to the cart successfully.', true);
44
44
  },
45
45
  error: function(data, textStatus, jqXHR) {
@@ -1,7 +1,7 @@
1
1
  .quick-add-to-cart-form
2
2
  - order = current_order(true)
3
3
  %span.current-order-path(style="display:none")
4
- = current_api_orders_path
4
+ = api_order_path(order.number)
5
5
  = form_tag api_order_line_items_path(order.number), method: :post do
6
6
  .fields
7
7
  = hidden_field_tag "order_token", order.token
@@ -2,7 +2,7 @@
2
2
  Gem::Specification.new do |s|
3
3
  s.platform = Gem::Platform::RUBY
4
4
  s.name = 'spree_quick_cart'
5
- s.version = '0.2.1'
5
+ s.version = '2.1.3'
6
6
  s.summary = 'Insert add to cart button in product index page'
7
7
  s.description = 'Adds js quick add to cart button to product catalogue'
8
8
  s.required_ruby_version = '>= 2.0.0'
@@ -17,7 +17,6 @@ Gem::Specification.new do |s|
17
17
 
18
18
  s.add_dependency 'spree_core', '~> 2.1.3'
19
19
  s.add_dependency 'spree_frontend', '~> 2.1.3'
20
- s.add_dependency 'spree_backend', '~> 2.1.3'
21
20
  s.add_dependency 'spree_api', '~> 2.1.3'
22
21
 
23
22
  s.add_development_dependency 'capybara', '~> 2.1'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_quick_cart
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 2.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francisco Trindade
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-14 00:00:00.000000000 Z
11
+ date: 2013-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_core
@@ -38,20 +38,6 @@ dependencies:
38
38
  - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: 2.1.3
41
- - !ruby/object:Gem::Dependency
42
- name: spree_backend
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ~>
46
- - !ruby/object:Gem::Version
47
- version: 2.1.3
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ~>
53
- - !ruby/object:Gem::Version
54
- version: 2.1.3
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: spree_api
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -208,13 +194,10 @@ files:
208
194
  - app/assets/javascripts/store/spree_quick_cart.js
209
195
  - app/assets/stylesheets/store/quick_cart.scss
210
196
  - app/assets/stylesheets/store/spree_quick_cart.css
211
- - app/controllers/spree/api/orders_controller_decorator.rb
212
197
  - app/overrides/quick_cart_add_button.rb
213
- - app/views/spree/api/orders/current.rabl
214
198
  - app/views/spree/shared/_quick_cart_add_button.haml
215
199
  - bin/rails
216
200
  - config/locales/en.yml
217
- - config/routes.rb
218
201
  - lib/generators/spree_quick_cart/install/install_generator.rb
219
202
  - lib/spree_quick_cart.rb
220
203
  - lib/spree_quick_cart/engine.rb
@@ -1,11 +0,0 @@
1
- Spree::Api::OrdersController.class_eval do
2
-
3
- def current
4
- if session[:order_id]
5
- @current_order = Spree::Order.find(session[:order_id])
6
- else
7
- @current_order = nil
8
- end
9
- end
10
-
11
- end
@@ -1,4 +0,0 @@
1
- object @current_order
2
- attributes *order_attributes
3
- attribute :item_count
4
-
data/config/routes.rb DELETED
@@ -1,9 +0,0 @@
1
- Spree::Core::Engine.routes.draw do
2
- namespace :api do
3
- resources :orders do
4
- collection do
5
- get :current
6
- end
7
- end
8
- end
9
- end