workarea-cart_sharing 1.0.1.pre → 1.0.2.pre
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c1628fac480d3931ff6ff80c9f2755d5a2b672c07ba5dbdf2eecd3e89433ae7
|
4
|
+
data.tar.gz: 20711544742c0d14666115daf97ee62ed1b869dc55ad71aeefb9d2e20713b905
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e49648cd2a3da89cf5062a625f5cddaf7231a98da1403c30b0876b83ba7d3e8a0c822e5afdbdf4f24d9bf25675bb69a6cf61dd1c858044c09b028e675701a7d
|
7
|
+
data.tar.gz: 4786fa5ad6cafe397f05c9212e407bd8c887b4de5b4c9141092c1377f435ff008883d94ef2e3f430fa6ec6b714e98654ca331e128457a15c43e82cf2bc23b341
|
@@ -2,7 +2,8 @@ module Workarea
|
|
2
2
|
decorate Storefront::CartsController, with: :cart_sharing do
|
3
3
|
def from
|
4
4
|
if order = Order.find_by(sharable_token: params[:token]) rescue nil
|
5
|
-
|
5
|
+
|
6
|
+
add_sharable_items(order.items)
|
6
7
|
flash[:success] = t('workarea.storefront.cart_sharing.success')
|
7
8
|
else
|
8
9
|
flash[:error] = t('workarea.storefront.cart_sharing.failure')
|
@@ -10,5 +11,13 @@ module Workarea
|
|
10
11
|
|
11
12
|
redirect_to cart_path
|
12
13
|
end
|
14
|
+
|
15
|
+
private
|
16
|
+
def add_sharable_items(items)
|
17
|
+
this_order = self.current_order
|
18
|
+
this_order.items = this_order.items + items
|
19
|
+
this_order.save
|
20
|
+
end
|
13
21
|
end
|
22
|
+
|
14
23
|
end
|
data/config/locales/en.yml
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: workarea-cart_sharing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- gunasekaran.r
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: workarea
|