spree_gtm 0.0.8 → 0.0.9

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: 439062b3ff3723a681a46b7d7f95499a3994cbac
4
- data.tar.gz: 260a12b41a796645a871476102feff35b1ffadd9
3
+ metadata.gz: 32bfa6fc4c1f031c79a99a12342d18407f5514a0
4
+ data.tar.gz: eb0031f5f33d7a3d4087f61c0b6cd37013b034ee
5
5
  SHA512:
6
- metadata.gz: ed919866e6d32843715d501e59a28f60bb0301e58efe544ce6ce928cbdeac6d25897af158955716a1ed8aa639e74ec8df705317b5318e1f0a542e149b77b24a1
7
- data.tar.gz: 8134941596cf60ca6b909280868304ffc8256320e2b92c29861856b8fa191d73e69a5a6cbb446555479367d01caf5c575a735bd42010f766788a2a815c36b04f
6
+ metadata.gz: 8fc9500e8fdb0f4c299b7f2fb687fc95ae1053aa28ad36db6a14ec31577f21f3655def9f783dc22813998a8e6f5f6b3f7777cff5db0e90fe315a50977b5ae675
7
+ data.tar.gz: 3784d5efdf5ad265a922d83d277b16f53cc74063a8bce1c49480a39622fd832170b96c13bd632d4e40c5eeed3f0ba423401649627e1f186900c984bd6bab3730
@@ -18,15 +18,17 @@
18
18
  <% if @order.present? and @order.user.present? %>
19
19
  dataLayer.push({'userid': '<%= @order.user.id %>'});
20
20
  <% end %>
21
- <% if @order.present? %>
21
+ <% if @order.present? && @order.bill_address.present? %>
22
22
 
23
23
  dataLayer.push({
24
- 'transactionId': '<%= @order.number %>',
25
- 'transactionTotal': <%= @order.total %>,
26
- 'transactionTax': <%= @order.adjustments.tax.sum(:amount) %>,
27
- 'transactionShipping': <%= @order.adjustments.shipping.sum(:amount) %>,
28
- 'transactionState': '<%= @order.bill_address.state_text %>',
29
- 'transactionEmail': '<%= @order.email %>',
24
+ 'transactionId': '<%= @order.number %>',
25
+ 'transactionTotal': <%= @order.total %>,
26
+ 'transactionTax': <%= @order.adjustments.tax.sum(:amount) %>,
27
+ 'transactionShipping': <%= @order.adjustments.shipping.sum(:amount) %>,
28
+ 'transactionCity': '<%= @order.bill_address.city %>',
29
+ 'transactionState': '<%= @order.bill_address.state_text %>',
30
+ 'transactionZip': '<%= @order.bill_address.zipcode %>',
31
+ 'transactionEmail': '<%= @order.email %>',
30
32
  'transactionProducts': [
31
33
  <%=raw @order.line_items.map { |line_item| "{ 'sku': '#{h line_item.variant.sku}',
32
34
  'name': '#{h line_item.variant.product.name}',
data/spree_gtm.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_gtm'
5
- s.version = '0.0.8'
5
+ s.version = '0.0.9'
6
6
  s.summary = 'some summary here'
7
7
  s.description = 'some gem description here'
8
8
  s.required_ruby_version = '>= 2.1.0'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_gtm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stanislav O. Pogrebnyak