spree_quick_cart 0.1.1 → 0.1.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e864553378eec6999b99c36d5d406d2408348504
|
4
|
+
data.tar.gz: 7a50820164eb2dbc55f13e89b14e7202e2fae3d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 005285203b78f4a645c598f9e2ff5de71150bca93f9afe6ed03278780a3ae3f435100155c6faf53b7b431ab3b587fb60c68aa9a659daf01505b4f8ce9319243b
|
7
|
+
data.tar.gz: 42f6ef571c2d056c93d844329702aba826542d5189b23d9357229445bcc670d1fc7bb153785ab93771b7445d0b45294616919328b25fde26fa177370270533b2
|
@@ -4,6 +4,7 @@ function SpreeQuickCart() {
|
|
4
4
|
|
5
5
|
this.initializeQuickCartForm = function() {
|
6
6
|
$(".quick-add-to-cart-form").find("form").submit(function() {
|
7
|
+
that.current_order_path = $(this).closest(".quick-add-to-cart-form").find('.current-order-path').text();
|
7
8
|
Spree.ajax({
|
8
9
|
url: $(this).attr("action"),
|
9
10
|
type: "POST",
|
@@ -22,7 +23,7 @@ function SpreeQuickCart() {
|
|
22
23
|
|
23
24
|
this.replaceCartInformation = function() {
|
24
25
|
Spree.ajax({
|
25
|
-
url:
|
26
|
+
url: that.current_order_path,
|
26
27
|
type: "GET",
|
27
28
|
cache: false,
|
28
29
|
dataType: 'json',
|
@@ -1,6 +1,8 @@
|
|
1
1
|
.quick-add-to-cart-form
|
2
2
|
- order = Spree::Order.find(session[:order_id]) if session[:order_id]
|
3
3
|
- if order
|
4
|
+
%span.current-order-path(style="display:none")
|
5
|
+
= current_api_orders_path
|
4
6
|
= form_tag api_order_line_items_path(order.number), method: :post do
|
5
7
|
.fields
|
6
8
|
= hidden_field_tag "order_token", order.token
|
data/spree_quick_cart.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_quick_cart'
|
5
|
-
s.version = '0.1.
|
5
|
+
s.version = '0.1.2'
|
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'
|