.padding.center#my_cart

  %h1
    Ma commande

  -if @product_order.product_order_products.count > 0
    %table.table
      %thead
        %tr
          %th
          %th
            Article
          %th
            Prix U.
          %th
            Qte
          %th
            Prix
    
      %tbody
        =render @product_order.product_order_products.order(:product_id)

    -if @product_order.vourcher_code
      %div.boutique-right
        = "Total articles : " + number_to_currency(@product_order.total_articles, locale: :fr)
      .clear
      %div.boutique-right
        ="Code de réduction "
        ="("+@product_order.vourcher_code.slug+") :"
        =number_to_currency @product_order.vourcher_reduction
    .clear
    %div.boutique-right{:style => "width:auto;"}
      = "Total HT : "
      %strong=number_to_currency((@product_order.total_articles-@product_order.vourcher_reduction) , locale: :fr)
      
    .clear
    %div.boutique-right{:style => "width:auto;"}
      = "Total TTC : "
      %strong=number_to_currency((@product_order.total_ttc) , locale: :fr)
      
    .clear
    %br
    %br

    %center

      =link_to "Commander", particulars_public_product_orders_path, :class => "btn btn-primary order_button"
  -else
    %center
      Vous n'avez pas de produits dans votre panier.
      
      %br
      %br
      =link_to "Visitez notre boutique !", public_reseaux_products_path(:reseaux_id => session[:reseaux_id].to_i), :class => "btn btn-primary"
      
    
  %br
  %br
  
  -if 1==2
    %div
      %br
      %center
        =form_tag vourcher_public_product_orders_path do 
          =qit "Code de réduction label", "Code de réduction :"
          =text_field_tag :vourcher_code
          =submit_tag "Envoyer le code"