diff --git a/app/views/products/_cart_form.html.erb b/app/views/products/_cart_form.html.erb new file mode 100644 index 0000000..f1a6eb2 --- /dev/null +++ b/app/views/products/_cart_form.html.erb @@ -0,0 +1,50 @@ +<%= form_for :order, :url => populate_orders_url do |f| %> +<%= hook :inside_product_cart_form do %> + + <% if product_price(@product) %> + <%= hook :product_price do %> +

+ <%= t("price") %> +
+ <%= product_price(@product) %> +

+ <% end %> + <% end %> + + <% if @product.has_variants? %> +
+

<%= t('variants') %>

+ +
+ <% end%> + <% if @product.has_stock? || Spree::Config[:allow_backorders] %> + <%= text_field_tag (@product.has_variants? ? :quantity : "variants[#{@product.master.id}]"), + 1, :class => "title", :size => 3 %> +   + + <% else %> + <%= content_tag('strong', t('out_of_stock')) %> + <% end %> + +<% end %> +<% end %>