Display an explanation message on product page when no distributor is selected

This commit is contained in:
Rohan Mitchell
2012-10-27 12:19:44 +11:00
parent f960cc44ba
commit 13317347bb
4 changed files with 35 additions and 0 deletions

View File

@@ -144,6 +144,16 @@ ul.product-listing {
}
/* Distributor details on product details page */
#product-distributor-details {
float: right;
}
#product-variants {
float: none;
}
/* Add to cart form on product details page */
#cart-form {
.error-distributor {

View File

@@ -0,0 +1,4 @@
Deface::Override.new(:virtual_path => "spree/products/show",
:insert_before => "[data-hook='cart_form']",
:partial => "distributors/details",
:name => "product_distributor_details")

View File

@@ -0,0 +1,2 @@
#product-distributor-details.columns.five.omega
When you select a distributor for your order, their address and pickup times will be displayed here.

View File

@@ -22,4 +22,23 @@ feature %q{
page.should have_selector 'td', :text => d.name
end
describe "viewing distributor details" do
context "without Javascript" do
it "displays a holding message when no distributor is selected" do
p = create(:product)
visit spree.product_path p
page.should have_selector '#product-distributor-details', :text => 'When you select a distributor for your order, their address and pickup times will be displayed here.'
end
it "displays distributor details when one is selected"
end
context "with Javascript" do
it "changes distributor details when the distributor is changed"
end
end
end