Sha256: 45feadeea3537722afd24f74ef087c6ff8c1b6e32c6700dec8de56047666f6b7

Contents?: true

Size: 1.62 KB

Versions: 2

Compression:

Stored size: 1.62 KB

Contents

<% if Spree::Edrone.current and Spree::Edrone.current.active %>
  <script type="text/javascript">
    !(function() {
      window._edrone = window._edrone || {};
      let edrone_products = [
      <% @order.line_items.each_with_index do |line_item, index| %>
        <%= product_for_segment(line_item, quantity: line_item.quantity) %>,
      <% end %>  ];
        _edrone.action_type = 'order';
        _edrone.email = '<%= @order.email %>';
        _edrone.first_name = '<%= @order.bill_address.firstname %>';
        _edrone.last_name = '<%= @order.bill_address.lastname %>';
        _edrone.product_skus = edrone_products.map(product => product.sku).join('|'); 
        _edrone.product_ids = edrone_products.map(product => product.product_id).join('|');
        _edrone.product_titles = edrone_products.map(product => product.name).join('|');
        _edrone.product_urls = edrone_products.map(product => product.url).join('|');
        _edrone.product_category_ids = edrone_products.map(product => product.category_id).join('|');
        _edrone.product_category_names = edrone_products.map(product => product.category).join('|');
        _edrone.product_counts = edrone_products.map(product => product.quantity).join('|');
        _edrone.order_id = '<%= @order.number %>';
        _edrone.coupon = '<%= @order.promo_code %>';
        _edrone.city = '<%= @order.bill_address.city %>';
        _edrone.base_currency = '<%= @order.currency %>';
        _edrone.order_currency = '<%= @order.currency %>';
        _edrone.base_payment_value = '<%= @order.total %>';
        _edrone.order_payment_value = '<%= @order.total %>';
    })()
  </script>
<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spree_edrone-1.0.2 app/views/spree/shared/edrone/segment/_order_complete.js.erb
spree_edrone-1.0.1 app/views/spree/shared/edrone/segment/_order_complete.js.erb