1

Is there a way in spree to calculate discount for product, based on promotions, and show it on product show page? Currently, i know that it is possible to show all adjustments on order page, but I would like to show possible price for every product while user is browsing products. Also, I would like to show taxes that are going to be applied to product.

Thanks!

vladotg
  • 33
  • 6

1 Answers1

0

You can use deface to load taxes in the product page . You will have to override this controller . If you want to load only after a particular div , you would do this -

Deface::Override.new(:virtual_path => 'spree/admin/products/_form',
  :name => 'add_tax_to_product_edit',
  :insert_after => "erb[loud]:contains('text_field :price')",
  :text => "
    <%= f.field_container :tax do %>
      <%= f.label :tax, raw(Spree.t(:sale_price) + content_tag(:span, ' *')) %>
      <%= f.text_field :tax, :value =>
        number_to_currency(@product.tax, :unit => '') %>
      <%= f.error_message_on :tax %>
    <% end %>
  ")
Caffeine Coder
  • 1,869
  • 1
  • 17
  • 35