<script type="text/javascript">
window.adcurve_configuration = {};
<% case controller.controller_name %>
  <% when "home" %>
    window.adcurve_configuration.adcurve_page = "home";
  <% when "orders" %>
    <% if controller.action_name == "edit" %>
    window.adcurve_configuration.adcurve_page = "cart";
    window.adcurve_configuration.adcurve_cart_items = <%= raw @order.line_items.map{|li| {
      :adcurve_product_id => li.product.sku, :adcurve_quantity => li.quantity, :adcurve_amount_1 => li.display_amount.to_s, :adcurve_amount_2 => li.display_amount.to_s } }.to_json %>
    <% end %>
  <% when "products" %>
    <% if controller.action_name != "index" %>
      window.adcurve_configuration.adcurve_page = "product";
      window.adcurve_configuration.adcurve_product_id = <%= raw @product.sku.to_json %>
    <% end %>
  <% when "taxons" %>
      window.adcurve_configuration.adcurve_page = "category";
      window.adcurve_configuration.adcurve_category_path = "<%= raw params[:id].split("\/")[1..-1].join(" > ") %>";
      window.adcurve_configuration.adcurve_products = <%=raw @products.map{|product| { :adcurve_product_id => product.sku  } }.to_json %>;
<% end %>
//hello
</script>

<script type="text/javascript">
window.s2m_configuration = {};
<% case controller.controller_name %>
  <% when "home" %>
    window.s2m_configuration.adcurve_page = "home";
  <% when "orders" %>
    <% if controller.action_name == "edit" %>
    window.s2m_configuration.adcurve_page = "cart";
    window.s2m_configuration.adcurve_cart_items = <%= raw @order.line_items.map{|li| {
      :adcurve_product_id => li.product.sku, :adcurve_quantity => li.quantity, :adcurve_amount_1 => li.display_amount.to_s, :adcurve_amount_2 => li.display_amount.to_s } }.to_json %>
    <% end %>
  <% when "products" %>
    <% if controller.action_name != "index" %>
      window.s2m_configuration.adcurve_page = "product";
      window.s2m_configuration.adcurve_product_id = <%= raw @product.sku.to_json %>
    <% end %>
  <% when "taxons" %>
      window.s2m_configuration.adcurve_page = "category";
      window.s2m_configuration.adcurve_category_path = "<%= raw params[:id].split("\/")[1..-1].join(" > ") %>";
      window.s2m_configuration.adcurve_products = <%=raw @products.map{|product| { :adcurve_product_id => product.sku  } }.to_json %>;
<% end %>
//hello
</script>

Fix bug s2m_configuraiton not defined
Fix bug s2m_configuraiton not defined
