suite
This commit is contained in:
parent
3b4ca4d0b0
commit
136920cdf3
@ -238,6 +238,13 @@ $("document").ready ->
|
|||||||
|
|
||||||
resize = ->
|
resize = ->
|
||||||
|
|
||||||
|
$(".with_ratio").each ->
|
||||||
|
ratio = parseFloat($(this).data("ratio"))
|
||||||
|
height = $(this).width()*ratio
|
||||||
|
|
||||||
|
$(this).css("height",height+"px")
|
||||||
|
|
||||||
|
|
||||||
$(".customer_message_list .height_frame").css
|
$(".customer_message_list .height_frame").css
|
||||||
"height" : $(".customer_message_show").height()+"px"
|
"height" : $(".customer_message_show").height()+"px"
|
||||||
min_height = 0
|
min_height = 0
|
||||||
|
@ -136,7 +136,7 @@ class Public::ProductOrdersController < ApplicationController
|
|||||||
@product_order = ProductOrder.find(session[:product_order_id])
|
@product_order = ProductOrder.find(session[:product_order_id])
|
||||||
@product_order.archive_now
|
@product_order.archive_now
|
||||||
if !@product_order.product_order_payment_type_ok_id?
|
if !@product_order.product_order_payment_type_ok_id?
|
||||||
@product_order.product_order_payment_type_ok_id = 10
|
@product_order.product_order_payment_type_ok_id = 2
|
||||||
end
|
end
|
||||||
@product_order.force_payment = true
|
@product_order.force_payment = true
|
||||||
|
|
||||||
@ -174,15 +174,18 @@ class Public::ProductOrdersController < ApplicationController
|
|||||||
if @product_order.product_order_payment_type_ok_id == 3
|
if @product_order.product_order_payment_type_ok_id == 3
|
||||||
redirect_to paid_by_ogone_public_product_orders_path()
|
redirect_to paid_by_ogone_public_product_orders_path()
|
||||||
else
|
else
|
||||||
if @product_order.product_order_payment_type_ok_id == 10
|
|
||||||
|
if [10, 1, 2, 4].include?(@product_order.product_order_payment_type_ok_id)
|
||||||
|
|
||||||
@product_order_payment = ProductOrderPayment.create(:product_order_payment_type_id => @product_order.product_order_payment_type_ok_id)
|
@product_order_payment = ProductOrderPayment.create(:product_order_payment_type_id => @product_order.product_order_payment_type_ok_id)
|
||||||
|
|
||||||
@product_order.product_order_payments << @product_order_payment
|
@product_order.product_order_payments << @product_order_payment
|
||||||
|
|
||||||
@product_order.product_order_payment_ok = @product_order_payment
|
@product_order.product_order_payment_ok = @product_order_payment
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@product_order.completed_finish = true
|
@product_order.completed_finish = true
|
||||||
|
|
||||||
@product_order.save
|
@product_order.save
|
||||||
|
@ -124,7 +124,7 @@ class Product < ActiveRecord::Base
|
|||||||
|
|
||||||
|
|
||||||
def tva
|
def tva
|
||||||
0.0
|
0.20
|
||||||
end
|
end
|
||||||
|
|
||||||
def price_ttc
|
def price_ttc
|
||||||
|
@ -198,7 +198,7 @@ class ProductOrder < ActiveRecord::Base
|
|||||||
def generate_bl_number
|
def generate_bl_number
|
||||||
|
|
||||||
|
|
||||||
if !self.bl_number and self.product_order_payment_type_ok_id == 10
|
if !self.bl_number and ([1,2,4,10].include?(self.product_order_payment_type_ok_id))
|
||||||
|
|
||||||
self.bl_year = self.updated_at.year
|
self.bl_year = self.updated_at.year
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
%table.table#product_orders
|
%table.table#product_orders
|
||||||
%tr
|
%tr
|
||||||
%th ID
|
%th ID
|
||||||
|
%th Date
|
||||||
%th
|
%th
|
||||||
Nom
|
Nom
|
||||||
%th Pays d'exp.
|
%th Pays d'exp.
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
%tr#product_order_row.product_order_row{:id => product_order.id, :class => ("success" if product_order)}
|
%tr#product_order_row.product_order_row{:id => product_order.id, :class => ("success" if product_order)}
|
||||||
%td
|
%td
|
||||||
=product_order.id
|
=product_order.id
|
||||||
|
%td
|
||||||
|
=l product_order.created_at
|
||||||
%td
|
%td
|
||||||
-if product_order.particular_bill
|
-if product_order.particular_bill
|
||||||
=product_order.particular_bill.name
|
=product_order.particular_bill.name
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
=f.inputs do
|
=f.inputs do
|
||||||
=f.input :name, :label => "Nom du réseau : "
|
=f.input :name, :label => "Nom du réseau : "
|
||||||
|
=f.input :description, :label => "A propos : ", :input_html => {:class => "redactor_textarea"}
|
||||||
-if !@reseaux.parent
|
-if !@reseaux.parent
|
||||||
=f.input :chef_reseau, :label => "Chef réseau : ", :collection => Customer.where(:chef_reseau => true).pluck(Arel.sql("CONCAT(`firstname`, ' ', `name`)"), :id)
|
=f.input :chef_reseau, :label => "Chef réseau : ", :collection => Customer.where(:chef_reseau => true).pluck(Arel.sql("CONCAT(`firstname`, ' ', `name`)"), :id)
|
||||||
|
|
||||||
@ -18,3 +18,16 @@
|
|||||||
|
|
||||||
|
|
||||||
.actions= f.submit "Sauvegarder", :class => "btn btn-primary"
|
.actions= f.submit "Sauvegarder", :class => "btn btn-primary"
|
||||||
|
|
||||||
|
|
||||||
|
:javascript
|
||||||
|
$(".redactor_textarea").redactor({
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
:css
|
||||||
|
.redactor-editor{
|
||||||
|
padding: 24px 32px;
|
||||||
|
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.07);
|
||||||
|
}
|
@ -43,7 +43,7 @@
|
|||||||
-if @reseaux_layout
|
-if @reseaux_layout
|
||||||
=link_to image_tag("/logo-mb.png", :id => "logo-mb"), "/"
|
=link_to image_tag("/logo-mb.png", :id => "logo-mb"), "/"
|
||||||
-if @reseaux_layout
|
-if @reseaux_layout
|
||||||
.reseaux_top{:style => "background-image:url('"+(@reseaux.background_image_file.file.large.url if @reseaux.background_image_file).to_s+"');"}
|
.reseaux_top.with_ratio{:data => {:ratio => "0.2"},:style => "background-image:url('"+(@reseaux.background_image_file.file.large.url if @reseaux.background_image_file).to_s+"');"}
|
||||||
=link_to "" do
|
=link_to "" do
|
||||||
=image_tag @reseaux.logo_image_file.file.large.url, :class => "logo_reseaux" if @reseaux.logo_image_file
|
=image_tag @reseaux.logo_image_file.file.large.url, :class => "logo_reseaux" if @reseaux.logo_image_file
|
||||||
|
|
||||||
|
@ -64,18 +64,20 @@
|
|||||||
.columns{
|
.columns{
|
||||||
width:50%;
|
width:50%;
|
||||||
float:left;
|
float:left;
|
||||||
|
box-sizing:border-box;
|
||||||
|
padding:0 10px;
|
||||||
.inner{
|
.inner{
|
||||||
background:rgba(255,255,255,0.8);
|
background:rgba(255,255,255,0.8);
|
||||||
max-width:480px;
|
max-width:480px;
|
||||||
margin:auto;
|
margin:auto;
|
||||||
padding:20px;
|
padding:20px;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
html {
|
html {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
height: 100%;
|
min-height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -98,3 +100,14 @@
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 800px) {
|
||||||
|
.columns{
|
||||||
|
margin-bottom:50px;
|
||||||
|
width:auto;
|
||||||
|
padding:0 40px;
|
||||||
|
float:none;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -30,8 +30,14 @@
|
|||||||
=number_to_currency @product_order.vourcher_reduction
|
=number_to_currency @product_order.vourcher_reduction
|
||||||
.clear
|
.clear
|
||||||
%div.boutique-right{:style => "width:auto;"}
|
%div.boutique-right{:style => "width:auto;"}
|
||||||
= "Total : "
|
= "Total HT : "
|
||||||
%strong=number_to_currency((@product_order.total_articles-@product_order.vourcher_reduction) , locale: :fr)
|
%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
|
.clear
|
||||||
%br
|
%br
|
||||||
%br
|
%br
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#my_cart
|
.padding.center#my_cart
|
||||||
%h1 Coordonnées
|
%h1 Coordonnées
|
||||||
|
|
||||||
= semantic_form_for [:public,@product_order], :url => particulars_save_public_product_orders_path(), :html => { :method => :post, :onchange =>"cb_infos();"}do |f|
|
= semantic_form_for [:public,@product_order], :url => particulars_save_public_product_orders_path(), :html => { :method => :post, :onchange =>"cb_infos();"}do |f|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
.center
|
.padding.center
|
||||||
|
|
||||||
%h1="Merci pour votre commande !"
|
%h1="Merci pour votre commande !"
|
||||||
|
|
||||||
%p
|
%p
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#my_cart
|
.padding.center#my_cart
|
||||||
.order_recap
|
.order_recap
|
||||||
%h1= "Validation de votre commande"
|
%h1= "Validation de votre commande"
|
||||||
%br
|
%br
|
||||||
@ -55,14 +55,14 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
=f.input :product_order_payment_type_ok_id, :label => false, :collection => [["Pré-commande",10]], :as => :radio, :include_blank => false
|
=f.input :product_order_payment_type_ok_id, :label => false, :collection => [["Chèque",1], ["Virement",2],["Mandat administratif",4]], :as => :radio, :include_blank => false #["Pré-commande",10]
|
||||||
|
|
||||||
|
|
||||||
.cb_infos
|
.cb_infos
|
||||||
= "Vous serez redirigé vers la page de paiement sécurisé."
|
= "Vous serez redirigé vers la page de paiement sécurisé."
|
||||||
%br
|
%br
|
||||||
|
|
||||||
=f.input :cgv, :label => "J'accepte les conditions générales de vente."
|
=f.input :cgv, :label => raw("J'accepte <a href='/mentions-legales.html' target='_blank'>les conditions générales de vente</a>.")
|
||||||
.actions
|
.actions
|
||||||
%center
|
%center
|
||||||
=f.submit "Valider ma commande", :class => "btn btn-primary order_button"
|
=f.submit "Valider ma commande", :class => "btn btn-primary order_button"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
|
|
||||||
.center.row
|
.center.row
|
||||||
|
|
||||||
|
.intro=raw @reseaux.description
|
||||||
%h1 Produits exclusifs réservés à ce réseau
|
%h1 Produits exclusifs réservés à ce réseau
|
||||||
|
|
||||||
.boutique_body.products
|
.boutique_body.products
|
||||||
|
@ -20,9 +20,16 @@
|
|||||||
|
|
||||||
.price
|
.price
|
||||||
-if !@product.price_reduced_ht?
|
-if !@product.price_reduced_ht?
|
||||||
= number_to_currency(@product.price_ttc, locale: :fr)
|
= number_to_currency(@product.price_ht, locale: :fr)
|
||||||
-else
|
-else
|
||||||
= number_to_currency(@product.price_reduced_ttc, locale: :fr)
|
= number_to_currency(@product.price_reduced_ht, locale: :fr)
|
||||||
|
HT
|
||||||
|
|
||||||
|
%div
|
||||||
|
%span{:style => "font-weight:normal;"}
|
||||||
|
= number_to_currency(@product.price_ttc, locale: :fr)
|
||||||
|
TTC
|
||||||
|
|
||||||
|
|
||||||
-if @product.price_reduced_ht?
|
-if @product.price_reduced_ht?
|
||||||
.price_reduced
|
.price_reduced
|
||||||
|
Loading…
x
Reference in New Issue
Block a user