Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update styles and overrides for 1.0.x new base theme

  • Loading branch information...
commit ebdd983b2a76a46eabd7ab84688e907bf3873e8b 1 parent cabd6a8
@devilcoders devilcoders authored
Showing with 223 additions and 169 deletions.
  1. +68 −67 app/assets/javascripts/store/checkout.js
  2. +8 −0 app/assets/javascripts/store/rdr_wishlist.js
  3. 0  app/assets/stylesheets/store/base.css
  4. +3 −1 app/assets/stylesheets/store/checkout.css
  5. +1 −5 app/assets/stylesheets/store/{screen.css.erb → display.css.erb}
  6. +1 −1  app/assets/stylesheets/store/login.css
  7. +18 −3 app/assets/stylesheets/store/products.css
  8. +1 −1  app/assets/stylesheets/store/rdr.css
  9. 0  app/assets/stylesheets/store/screen.scss.css
  10. 0  app/assets/stylesheets/store/spree_core.css
  11. +2 −2 app/overrides/add_related_products_to_cart_form.rb
  12. +1 −1  app/overrides/add_taxonomies_to_product_show.rb
  13. +1 −1  app/overrides/add_to_head.rb
  14. +1 −1  app/overrides/drop_icon_from_add_to_wishlist.rb
  15. +2 −2 app/overrides/redefine_add_socials_to_login_extras.rb
  16. +1 −1  app/overrides/redefine_add_wish_to_cart_form.rb
  17. +1 −1  app/overrides/redefine_add_wishlists_to_account_my_orders.rb
  18. +3 −3 app/overrides/redefine_recently_viewed_overrides.rb
  19. +1 −1  app/overrides/redefine_replace_account_summary_with_social_logins.rb
  20. +1 −1  app/overrides/remove_account_summary.rb
  21. +1 −1  app/overrides/remove_brs_from_login_form.rb
  22. +1 −1  app/overrides/remove_brs_from_user_form.rb
  23. +1 −1  app/overrides/remove_card_expiration.rb
  24. +1 −1  app/overrides/remove_cart_code.rb
  25. +1 −1  app/overrides/remove_checkout_registration_header.rb
  26. +1 −1  app/overrides/remove_confirm_buttons.rb
  27. +1 −1  app/overrides/remove_delivery_buttons.rb
  28. +1 −1  app/overrides/remove_gateway_icons.rb
  29. +1 −1  app/overrides/remove_orders_show_header.rb
  30. +1 −1  app/overrides/remove_payment_buttons.rb
  31. +1 −1  app/overrides/remove_shipping.rb
  32. +1 −1  app/overrides/remove_summary_title.rb
  33. +1 −1  app/overrides/remvove_address_buttons.rb
  34. +1 −1  app/overrides/replace_account_header.rb
  35. +1 −1  app/overrides/replace_account_my_orders.rb
  36. +2 −3 app/overrides/replace_billing.rb
  37. +1 −1  app/overrides/replace_body.rb
  38. +2 −2 app/overrides/replace_cart_detail.rb
  39. +2 −2 app/overrides/replace_cart_form.rb
  40. +2 −2 app/overrides/replace_checkout.rb
  41. +19 −4 app/overrides/replace_checkout_registration.rb
  42. +1 −1  app/overrides/replace_confirm.rb
  43. +1 −1  app/overrides/replace_empty-cart.rb
  44. +1 −1  app/overrides/replace_gateway_fields.rb
  45. +3 −3 app/overrides/replace_line_item.rb
  46. +1 −1  app/overrides/replace_new_wishlist_form.rb
  47. +1 −1  app/overrides/replace_new_wishlist_header.rb
  48. +1 −1  app/overrides/replace_order_summary.rb
  49. +4 −4 app/overrides/replace_orders_show.rb
  50. +1 −1  app/overrides/replace_outside_cart_form.rb
  51. +2 −2 app/overrides/replace_payment.rb
  52. +1 −1  app/overrides/replace_paypal_payment.rb
  53. +29 −2 app/overrides/replace_product_show.rb
  54. +2 −2 app/overrides/replace_products.rb
  55. +1 −1  app/overrides/replace_shipping_method.rb
  56. +1 −1  app/overrides/replace_taxon_children.rb
  57. +1 −1  app/overrides/replace_taxon_sidebar_navigation.rb
  58. +1 −1  app/overrides/replace_taxonomies.rb
  59. +4 −6 app/overrides/replace_user_registration_new.rb
  60. +5 −5 app/overrides/replace_user_sessions_new.rb
  61. +1 −1  app/overrides/tweak_button_login.rb
  62. +1 −1  app/overrides/tweak_remember_me_login.rb
  63. +2 −2 app/views/shared/_all_products.html.erb
  64. +1 −8 lib/generators/spree_rdr_theme/install/install_generator.rb
View
135 app/assets/javascripts/store/checkout.js
@@ -1,82 +1,83 @@
(function($){
$(document).ready(function(){
- if($('.edit_order').is('*')){
- //$('#checkout_form_address').validate();
- var get_states = function(region){
- var country = $('span#' + region + 'country :only-child').val();
- return state_mapper[country];
- }
+ //$('#checkout_form_address').validate();
- var update_state = function(region) {
- var states = get_states(region);
-
- var state_select = $('span#' + region + 'state select');
- var state_input = $('span#' + region + 'state input');
-
- if(states) {
- var selected = state_select.val();
- state_select.html('');
- var states_with_blank = [["",""]].concat(states);
- $.each(states_with_blank, function(pos,id_nm) {
- var opt = $(document.createElement('option'))
- .attr('value', id_nm[0])
- .html(id_nm[1]);
- if(selected==id_nm[0]){
- opt.attr('selected', 'selected');
- }
- state_select.append(opt);
- });
- state_select.removeAttr('disabled').show();
- state_input.hide().attr('disabled', 'disabled');
-
- } else {
- state_input.removeAttr('disabled').show();
- state_select.hide().attr('disabled', 'disabled');
- }
+ var get_states = function(region){
+ var country = $('span#' + region + 'country :only-child').val();
+ return state_mapper[country];
+ }
- };
+ var update_state = function(region) {
+ var states = get_states(region);
- var show_payment_method = function(){
- $('li.payment_method').hide();
- var id = $("input[name='order[payments_attributes][][payment_method_id]']:checked").val()
+ var state_select = $('span#' + region + 'state select');
+ var state_input = $('span#' + region + 'state input');
+
+ if(states) {
+ var selected = state_select.val();
+ state_select.html('');
+ var states_with_blank = [["",""]].concat(states);
+ $.each(states_with_blank, function(pos,id_nm) {
+ var opt = $(document.createElement('option'))
+ .attr('value', id_nm[0])
+ .html(id_nm[1]);
+ if(selected==id_nm[0]){
+ opt.attr('selected', 'selected');
+ }
+ state_select.append(opt);
+ });
+ state_select.removeAttr('disabled').show();
+ state_input.hide().attr('disabled', 'disabled');
- $('li.payment_method.' + id).show();
+ } else {
+ state_input.removeAttr('disabled').show();
+ state_select.hide().attr('disabled', 'disabled');
}
- // Show fields for the selected payment method
- $("input[type='radio'][name='order[payments_attributes][][payment_method_id]']").change(function(){
- show_payment_method();
- })
-
- $('span#bcountry select').change(function() { update_state('b'); });
- $('span#scountry select').change(function() { update_state('s'); });
- update_state('b');
- update_state('s');
- show_payment_method()
-
- $('input#order_use_billing').click(function() {
- if($(this).is(':checked')) {
- $('#shipping .inner').hide();
- $('#shipping .inner input, #shipping .inner select').attr('disabled', 'disabled');
- } else {
- $('#shipping .inner').show();
- $('#shipping .inner input, #shipping .inner select').removeAttr('disabled', 'disabled');
-
- //only want to enable relevant field
- if(get_states('s')){
- $('span#sstate input').hide().attr('disabled', 'disabled');
- }else{
- $('span#sstate select').hide().attr('disabled', 'disabled');
- }
+ };
+
+ var show_payment_method = function(){
+ $('li.payment_method').hide();
+ var id = $("input[name='order[payments_attributes][][payment_method_id]']:checked").val()
+
+ $('li.payment_method.' + id).show();
+ }
+ // Show fields for the selected payment method
+ $("input[type='radio'][name='order[payments_attributes][][payment_method_id]']").change(function(){
+ show_payment_method();
+ })
+
+ $('span#bcountry select').change(function() { update_state('b'); });
+ $('span#scountry select').change(function() { update_state('s'); });
+ update_state('b');
+ update_state('s');
+ show_payment_method()
+
+ $('input#order_use_billing').click(function() {
+ if($(this).is(':checked')) {
+ $('#shipping .inner').hide();
+ $('#shipping .inner input, #shipping .inner select').attr('disabled', 'disabled');
+ } else {
+ $('#shipping .inner').show();
+ $('#shipping .inner input, #shipping .inner select').removeAttr('disabled', 'disabled');
+
+ //only want to enable relevant field
+ if(get_states('s')){
+ $('span#sstate input').hide().attr('disabled', 'disabled');
+ }else{
+ $('span#sstate select').hide().attr('disabled', 'disabled');
}
- }).triggerHandler('click');
- $('form.edit_checkout').submit(function() {
- $(this).find(':submit, :image').attr('disabled', true).removeClass('primary').addClass('disabled');
- });
+ }
+ }).triggerHandler('click');
+
+ $('form.edit_checkout').submit(function() {
+ $(this).find(':submit, :image').attr('disabled', true).removeClass('primary').addClass('disabled');
+ });
+
- }
});
})(jQuery);
+
View
8 app/assets/javascripts/store/rdr_wishlist.js
@@ -20,4 +20,12 @@ $(document).ready(function() {
return false;
});
}
+
+ // Remove an item from the cart by setting its quantity to zero and posting the update form
+ $('form#updatecart a.delete').show().click(function(){
+ $(this).parents('tr').find('input.line_item_quantity').val(0);
+ $(this).parents('form').submit();
+ return false;
+ });
+
});
View
0  app/assets/stylesheets/store/base.css
No changes.
View
4 app/assets/stylesheets/store/checkout.css
@@ -24,7 +24,9 @@ select {
color: #333;
}
-input[type='text'], input[type='password'] {
+input[type='text'], input[type='password'],
+input[type="email"], input[type="url"],
+input[type="phone"] {
font-size: 18px;
padding: 7px 5px 5px;
border: 2px solid #A0A0A0;
View
6 app/assets/stylesheets/store/screen.css.erb → app/assets/stylesheets/store/display.css.erb
@@ -203,11 +203,7 @@ footer #copyright {
text-align: right;
}
-
-
-
-
-button, a.button {
+button, a.button, .button {
border: none;
background-color: #0095DA;
color: #fff!important;
View
2  app/assets/stylesheets/store/login.css
@@ -26,6 +26,6 @@ body#login #local_login input[type='password'] {
width: 100%
}
-body#login #local_login button {
+body#login #local_login .button {
margin: 0 33%;
}
View
21 app/assets/stylesheets/store/products.css
@@ -38,11 +38,11 @@ body#product-details #product-description {
#product-images #thumbnails li a {
display: block;
width: 45px;
- height: 35px;
float: left;
- border: 2px solid #ccc;
- margin: 0 2px 0 2px;
+ border: 2px solid #CCC;
+ margin: 2px;
text-align: center;
+ border-image: initial;
}
#product-images #thumbnails li a img {
@@ -116,3 +116,18 @@ dl.part-numbers dd {
margin-left: 20px;
display: block;
}
+
+#product-variants ul{
+ margin: 0;
+ list-style: none;
+}
+#product-variants ul li {
+ margin-bottom: 10px;
+}
+#product-variants ul li span.price {
+ font-size: 12px;
+ color: red;
+}
+#product-variants ul li label {
+ display: inline;
+}
View
2  app/assets/stylesheets/store/rdr.css
@@ -2,7 +2,7 @@
*= require store/reset
*= require store/typography
*= require store/misc
- *= require store/screen
+ *= require store/display
*= require store/taxonomy
*= require store/products
*= require store/cart
View
0  app/assets/stylesheets/store/screen.scss.css
No changes.
View
0  app/assets/stylesheets/store/spree_core.css
No changes.
View
4 app/overrides/add_related_products_to_cart_form.rb
@@ -1,6 +1,6 @@
if Rails.application.railties.all.map(&:railtie_name).include? "spree_related_products"
- Deface::Override.new(:virtual_path => %q{products/show},
+ Deface::Override.new(:virtual_path => %q{spree/products/show},
:name => %q{add_related_products_to_cart_form},
:replace => %q{[data-hook='cart_form'] hr},
:sequence => {:after => "replace_cart_form" },
@@ -10,7 +10,7 @@
<p>
<%= check_box_tag "variants[#{cross_sell.master.id}]", 1 %>
<label for="">
- Add <em>'<%= link_to cross_sell.name, product_url(cross_sell) %>'</em> for <%= product_price(cross_sell) %>
+ Add <em>'<%= link_to cross_sell.name, product_url(cross_sell) %>'</em> for <%=number_to_currency(cross_sell.price) %>
</label>
</p>
<% end %>
View
2  app/overrides/add_taxonomies_to_product_show.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => %q{products/show},
+Deface::Override.new(:virtual_path => %q{spree/products/show},
:name => %q{add_taxonomies_to_product_show},
:insert_after => %q{[data-hook='product_show']},
:sequence => {:after => 'add_recently_viewed_products_to_products_show'},
View
2  app/overrides/add_to_head.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => %q{shared/_head},
+Deface::Override.new(:virtual_path => %q{spree/shared/_head},
:name => %q{add_to_head},
:insert_after => %q{code[erb-loud]:contains('stylesheet_link_tag')},
:text => %q{<link href="<%=request.protocol%>fonts.googleapis.com/css?family=Arvo:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">})
View
2  app/overrides/drop_icon_from_add_to_wishlist.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => 'products/show',
+Deface::Override.new(:virtual_path => 'spree/products/show',
:name => 'drop_icon_from_add_to_wishlist',
:replace => "code[erb-loud]:contains('icons/add-to-cart')",
:text => %q{<%= t('add_to_wishlist') %>},
View
4 app/overrides/redefine_add_socials_to_login_extras.rb
@@ -1,10 +1,10 @@
if Rails.application.railties.all.map(&:railtie_name).include? "spree_social"
- Deface::Override.new(:virtual_path => "user_registrations/new",
+ Deface::Override.new(:virtual_path => "spree/user_registrations/new",
:name => "add_socials_to_login_extras",
:disabled => true)
- Deface::Override.new(:virtual_path => "user_sessions/new",
+ Deface::Override.new(:virtual_path => "spree/user_sessions/new",
:name => "add_socials_to_login_extras",
:disabled => true)
View
2  app/overrides/redefine_add_wish_to_cart_form.rb
@@ -1,6 +1,6 @@
if Rails.application.railties.all.map(&:railtie_name).include? "spree_wishlist"
- Deface::Override.new(:virtual_path => 'products/show',
+ Deface::Override.new(:virtual_path => 'spree/products/show',
:name => 'add_wish_to_cart_form',
:sequence => {:after => 'replace_product_show'})
View
2  app/overrides/redefine_add_wishlists_to_account_my_orders.rb
@@ -1,6 +1,6 @@
if Rails.application.railties.all.map(&:railtie_name).include? "spree_wishlist"
- Deface::Override.new(:virtual_path => "users/show",
+ Deface::Override.new(:virtual_path => "spree/users/show",
:name => "add_wishlists_to_account_my_orders",
:text => %q{<h3>
My Wishlists:
View
6 app/overrides/redefine_recently_viewed_overrides.rb
@@ -1,14 +1,14 @@
if Rails.application.railties.all.map(&:railtie_name).include? "spree_recently_viewed"
- Deface::Override.new(:virtual_path => 'shared/_products',
+ Deface::Override.new(:virtual_path => 'spree/shared/_products',
:name => 'add_recently_viewed_products_to_products_index',
:disabled => true)
- Deface::Override.new(:virtual_path => 'products/show',
+ Deface::Override.new(:virtual_path => 'spree/products/show',
:name => 'add_recently_viewed_products_to_products_show',
:disabled => true)
- Deface::Override.new(:virtual_path => 'shared/_recently_viewed_products',
+ Deface::Override.new(:virtual_path => 'spree/shared/_recently_viewed_products',
:name => 'change_title',
:replace => 'h3',
:text => '<h2>Recently Viewed</h2>')
View
2  app/overrides/redefine_replace_account_summary_with_social_logins.rb
@@ -1,6 +1,6 @@
if Rails.application.railties.all.map(&:railtie_name).include? "spree_social"
- Deface::Override.new(:virtual_path => "users/show",
+ Deface::Override.new(:virtual_path => "spree/users/show",
:name => "replace_account_summary_with_social_logins",
:replace => "[data-hook='account_summary']",
:sequence => {:after => 'replace_account_my_orders'},
View
2  app/overrides/remove_account_summary.rb
@@ -1,3 +1,3 @@
-Deface::Override.new(:virtual_path => %q{users/show},
+Deface::Override.new(:virtual_path => %q{spree/users/show},
:name => %q{remove_account_summary},
:remove => %q{[data-hook='account_summary']})
View
2  app/overrides/remove_brs_from_login_form.rb
@@ -1,3 +1,3 @@
-Deface::Override.new(:virtual_path => %q{shared/_login},
+Deface::Override.new(:virtual_path => %q{spree/shared/_login},
:name => %q{remove_brs_from_login_form},
:remove => %q{br})
View
2  app/overrides/remove_brs_from_user_form.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => %q{shared/_user_form},
+Deface::Override.new(:virtual_path => %q{spree/shared/_user_form},
:name => %q{remove_brs_from_user_form},
:remove => %q{br})
View
2  app/overrides/remove_card_expiration.rb
@@ -1,3 +1,3 @@
-Deface::Override.new(:virtual_path => %q{checkout/payment/_gateway},
+Deface::Override.new(:virtual_path => %q{spree/checkout/payment/_gateway},
:name => %q{remove_card_expiration},
:remove => %q{[data-hook='card_expiration']})
View
2  app/overrides/remove_cart_code.rb
@@ -1,3 +1,3 @@
-Deface::Override.new(:virtual_path => %q{checkout/payment/_gateway},
+Deface::Override.new(:virtual_path => %q{spree/checkout/payment/_gateway},
:name => %q{remove_cart_code},
:remove => %q{[data-hook='cart_code']})
View
2  app/overrides/remove_checkout_registration_header.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => %q{checkout/registration},
+Deface::Override.new(:virtual_path => %q{spree/checkout/registration},
:name => %q{remove_checkout_registration_header},
:remove => %q{h2},
:sequence => {:before => 'replace_checkout_registration' })
View
2  app/overrides/remove_confirm_buttons.rb
@@ -1,3 +1,3 @@
-Deface::Override.new(:virtual_path => %q{checkout/_confirm},
+Deface::Override.new(:virtual_path => %q{spree/checkout/_confirm},
:name => %q{remove_confirm_buttons},
:remove => %q{[data-hook='buttons']})
View
2  app/overrides/remove_delivery_buttons.rb
@@ -1,3 +1,3 @@
-Deface::Override.new(:virtual_path => %q{checkout/_delivery},
+Deface::Override.new(:virtual_path => %q{spree/checkout/_delivery},
:name => %q{remove_delivery_buttons},
:remove => %q{[data-hook='buttons']})
View
2  app/overrides/remove_gateway_icons.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => %q{checkout/payment/_gateway},
+Deface::Override.new(:virtual_path => %q{spree/checkout/payment/_gateway},
:name => %q{remove_gateway_icons},
:remove => %q{code[erb-loud]:contains('image_tag')},
:sequence => {:before => 'replace_gateway_fields' })
View
2  app/overrides/remove_orders_show_header.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => %q{orders/show},
+Deface::Override.new(:virtual_path => %q{spree/orders/show},
:name => %q{remove_orders_show_header},
:remove => %q{h1},
:sequence => {:before => 'replace_orders_show' })
View
2  app/overrides/remove_payment_buttons.rb
@@ -1,3 +1,3 @@
-Deface::Override.new(:virtual_path => %q{checkout/_payment},
+Deface::Override.new(:virtual_path => %q{spree/checkout/_payment},
:name => %q{remove_payment_buttons},
:remove => %q{[data-hook='buttons']})
View
2  app/overrides/remove_shipping.rb
@@ -1,3 +1,3 @@
-Deface::Override.new(:virtual_path => %q{checkout/_address},
+Deface::Override.new(:virtual_path => %q{spree/checkout/_address},
:name => %q{remove_shipping},
:remove => %q{#shipping[data-hook]})
View
2  app/overrides/remove_summary_title.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => %q{checkout/_summary},
+Deface::Override.new(:virtual_path => %q{spree/checkout/_summary},
:name => %q{remove_summary_title},
:remove => %q{h3},
:sequence => {:before => 'replace_order_summary'})
View
2  app/overrides/remvove_address_buttons.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => %q{checkout/_address},
+Deface::Override.new(:virtual_path => %q{spree/checkout/_address},
:name => %q{remove_address_buttons},
:remove => %q{[data-hook='buttons']},
:closing_selector => %q{})
View
2  app/overrides/replace_account_header.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => %q{users/show},
+Deface::Override.new(:virtual_path => %q{spree/users/show},
:name => %q{replace_account_header},
:replace => %q{h1},
:text => %q{<h1><%= t("my_account") %><%= link_to "(edit)", edit_account_path, :id => "edit_account_link" %></h1>})
View
2  app/overrides/replace_account_my_orders.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => %q{users/show},
+Deface::Override.new(:virtual_path => %q{spree/users/show},
:name => %q{replace_account_my_orders},
:replace => %q{[data-hook='account_my_orders']},
:sequence => {:after => 'remove_account_summary' },
View
5 app/overrides/replace_billing.rb
@@ -1,10 +1,9 @@
-Deface::Override.new(:virtual_path => %q{checkout/_address},
+Deface::Override.new(:virtual_path => %q{spree/checkout/_address},
:name => %q{replace_billing},
:replace => %q{#billing[data-hook]},
:text => %q{<% content_for :javascripts do %>
<%= javascript_include_tag 'checkout', '/states' %>
<% end %>
-
<div id="content" role="content">
<h2>Your Billing Information</h2>
<%= form.fields_for :bill_address do |bill_form| %>
@@ -136,7 +135,7 @@
<li>
<%= ship_form.label :country_id, "Country" %>
<span id="scountry">
- <%= ship_form.collection_select :country_id, Country.all, :id, :name %>
+ <%= ship_form.collection_select :country_id, Spree::Country.all, :id, :name %>
</span>
</li>
<li>
View
2  app/overrides/replace_body.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => %q{layouts/spree_application},
+Deface::Override.new(:virtual_path => %q{spree/layouts/spree_application},
:name => %q{replace_body},
:replace => %q{[data-hook='body']},
:closing_selector => %q{},
View
4 app/overrides/replace_cart_detail.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => %q{orders/_form},
+Deface::Override.new(:virtual_path => %q{spree/orders/_form},
:name => %q{replace_cart_detail},
:replace => %q{#cart-detail[data-hook]},
:text => %q{<table id="cart-detail" data-hook>
@@ -27,7 +27,7 @@
<tr class="totals">
<td colspan="6">&nbsp;</td>
<td colspan="2" class="totals">
- <%= "#{t("subtotal")}: #{order_price(@order)}" %>
+ <%= t(:subtotal) %>: <span class="order-total"><%= order_subtotal(@order) %></span>
</td>
</tr>
</tbody>
View
4 app/overrides/replace_cart_form.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => %q{products/show},
+Deface::Override.new(:virtual_path => %q{spree/products/show},
:name => %q{replace_cart_form},
:replace => %q{[data-hook='cart_form']},
:closing_selector => %q{},
@@ -16,7 +16,7 @@
<dt>Price</dt>
<dd><span class="price discounted"><%= number_to_currency @product.cost_price %></span></dd>
<dt>Sale Price</dt>
- <dd><span class="price selling"><%= product_price(@product) %></span></dd>
+ <dd><span class="price selling"><%= number_to_currency @product.price %></span></dd>
<!-- #Coming soon
<dt>after $xx.00 rebate</dt>
<dd><span class="price">$xx.99</span></dd>
View
4 app/overrides/replace_checkout.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => %q{checkout/edit},
+Deface::Override.new(:virtual_path => %q{spree/checkout/edit},
:name => %q{replace_checkout},
:replace => %q{#checkout[data-hook]},
:closing_selector => %q{},
@@ -6,7 +6,7 @@
<div id="title" role="title">CHECKOUT</div>
<!-- START MAIN CONTENT -->
<div id="main-content" role="main-content">
- <%= render "shared/error_messages", :target => @order %>
+ <%= render "spree/shared/error_messages", :target => @order %>
<div id="tabs" role="tabs">
<ul>
<li><span class="number">1</span><span class="title">Create an Account</span></li>
View
23 app/overrides/replace_checkout_registration.rb
@@ -1,11 +1,11 @@
-Deface::Override.new(:virtual_path => %q{checkout/registration},
+Deface::Override.new(:virtual_path => %q{spree/checkout/registration},
:name => %q{replace_checkout_registration},
:replace => %q{#registration},
:text => %q{<div id="checkout" role="checkout" class="clearfix">
<div id="title" role="title">CHECKOUT</div>
<!-- START MAIN CONTENT -->
<div id="main-content" role="main-content">
- <%= render "shared/error_messages", :target => @order %>
+ <%= render "spree/shared/error_messages", :target => @order %>
<div id="tabs" role="tabs">
<ul>
<li class='active'><span class="number">1</span><span class="title">Create an Account</span></li>
@@ -19,12 +19,27 @@
<div id="existing-customer">
<h2>Existing Customers</h2>
<p>If you've already registered for an account on you can sign in here:</p>
- <%= render :partial => 'shared/login' %>
+ <%= render :partial => 'spree/shared/login' %>
</div>
<hr>
- <%= render :template => 'user_registrations/new' %>
+ <%= render :template => 'spree/user_registrations/new' %>
+
+ <hr>
+ <% if Spree::Config[:allow_guest_checkout] %>
+ <div id="guest_checkout" data-hook class="columns omega eight">
+ <%= render :partial => 'spree/shared/error_messages', :locals => { :target => @order } %>
+ <h2><%= t(:guest_user_account) %></h2>
+ <%= form_for @order, :url => update_checkout_registration_path, :method => :put, :html => { :id => 'checkout_form_registration' } do |f| %>
+ <p>
+ <%= f.label :email, t(:email) %><br />
+ <%= f.email_field :email, :class => 'title' %>
+ </p>
+ <p><%= f.submit t(:continue), :class => 'button primary' %></p>
+ <% end %>
+ </div>
+ <% end %>
</div>
</div>
<!-- END MAIN CONTENT -->
View
2  app/overrides/replace_confirm.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => %q{checkout/_confirm},
+Deface::Override.new(:virtual_path => %q{spree/checkout/_confirm},
:name => %q{replace_confirm},
:replace => %q{#order_details[data-hook]},
:text => %q{<div id="content" role="content">
View
2  app/overrides/replace_empty-cart.rb
@@ -1,3 +1,3 @@
-Deface::Override.new(:virtual_path => %q{orders/edit},
+Deface::Override.new(:virtual_path => %q{spree/orders/edit},
:name => %q{replace_empty-cart},
:remove => %q{#empty-cart[data-hook]})
View
2  app/overrides/replace_gateway_fields.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => %q{checkout/payment/_gateway},
+Deface::Override.new(:virtual_path => %q{spree/checkout/payment/_gateway},
:name => %q{replace_gateway_fields},
:replace => %q{[data-hook='card_number']},
:text => %q{<li class="payment_method <%= payment_method.id %>" style="display:<%= checked == payment_method.id ? "block" : "none" %>;">
View
6 app/overrides/replace_line_item.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => %q{orders/_line_item},
+Deface::Override.new(:virtual_path => %q{spree/orders/_line_item},
:name => %q{replace_line_item},
:replace => %q{tr},
:text => %q{<tr class="<%= cycle('', 'alt') %>">
@@ -14,7 +14,7 @@
<%= variant_options variant %>
</td>
<td class="unit-price" data-hook="cart_item_price">
- <%= product_price(line_item) %>
+ <%= number_to_currency(line_item.price) %>
</td>
<td class="operator">
X
@@ -26,7 +26,7 @@
=
</td>
<td class="total" data-hook="cart_item_total">
- <%= format_price(product_price(line_item, :format_as_currency => false) * line_item.quantity) unless line_item.quantity.nil? %>
+ <%= number_to_currency(line_item.price * line_item.quantity) unless line_item.quantity.nil? %>
</td>
<td class="total" data-hook="cart_item_delete">
<%= link_to("Remove", '#', :class => 'delete button') %>
View
2  app/overrides/replace_new_wishlist_form.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => 'wishlists/new',
+Deface::Override.new(:virtual_path => 'spree/wishlists/new',
:name => 'replace_new_wishlist_form',
:replace_contents => "code[erb-loud]:contains('form_for')",
:closing_selector => "code[erb-silent]:contains('end')",
View
2  app/overrides/replace_new_wishlist_header.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => 'wishlists/new',
+Deface::Override.new(:virtual_path => 'spree/wishlists/new',
:name => 'replace_new_wishlist_header',
:replace => 'h1',
:text => %q{<% @body_id = 'cart' %>
View
2  app/overrides/replace_order_summary.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => %q{checkout/_summary},
+Deface::Override.new(:virtual_path => %q{spree/checkout/_summary},
:name => %q{replace_order_summary'},
:replace => %q{[data-hook='order_summary']},
:text => %q{<div id="aside" role="aside">
View
8 app/overrides/replace_orders_show.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => %q{orders/show},
+Deface::Override.new(:virtual_path => %q{spree/orders/show},
:name => %q{replace_orders_show},
:replace => %q{#order[data-hook]},
:text => %q{<% @body_id = 'cart' %>
@@ -33,7 +33,7 @@
<%= variant_options variant %>
</td>
<td class="unit-price">
- <%= product_price(line_item) %>
+ <%= number_to_currency line_item.price %>
</td>
<td class="operator">
X
@@ -45,14 +45,14 @@
=
</td>
<td class="total">
- <%= format_price(product_price(line_item, :format_as_currency => false) * line_item.quantity) unless line_item.quantity.nil? %>
+ <%= number_to_currency (line_item.price * line_item.quantity) unless line_item.quantity.nil? %>
</td>
</tr>
<% end %>
<tr class="totals">
<td colspan="6">Item Subtotal</td>
<td class="totals">
- <%= order_price(@order) %>
+ <%= number_to_currency @order.item_total %>
</td>
</tr>
<% @order.adjustments.each do |adjustment| %>
View
2  app/overrides/replace_outside_cart_form.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => %q{orders/edit},
+Deface::Override.new(:virtual_path => %q{spree/orders/edit},
:name => %q{replace_outside_cart_form},
:replace => %q{[data-hook='outside_cart_form']},
:closing_selector => %q{},
View
4 app/overrides/replace_payment.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => %q{checkout/_payment},
+Deface::Override.new(:virtual_path => %q{spree/checkout/_payment},
:name => %q{replace_payment},
:replace => %q{#payment[data-hook]},
:text => %q{<div id="content" role="content">
@@ -13,7 +13,7 @@
<hr />
<% @order.available_payment_methods.each_with_index do |method, i| %>
- <%= render "checkout/payment/#{method.method_type}", :payment_method => method, :checked => (@order.try(:payment).try(:payment_method_id) || method.id if i == 0) %>
+ <%= render "spree/checkout/payment/#{method.method_type}", :payment_method => method, :checked => (@order.try(:payment).try(:payment_method_id) || method.id if i == 0) %>
<% end %>
</ul>
<br>
View
2  app/overrides/replace_paypal_payment.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => 'checkout/payment/_paypalexpress',
+Deface::Override.new(:virtual_path => 'spree/checkout/payment/_paypalexpress',
:name => 'replace_paypal_payment',
:replace => 'a',
:text => %q{<li class="payment_method <%= payment_method.id %>" style="display:<%= checked == payment_method.id ? "block" : "none" %>;">
View
31 app/overrides/replace_product_show.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => %q{products/show},
+Deface::Override.new(:virtual_path => %q{spree/products/show},
:name => %q{replace_product_show},
:replace => %q{[data-hook='product_show']},
:closing_selector => %q{},
@@ -36,7 +36,7 @@
<dt>Price</dt>
<dd><span class="price discounted"><%= number_to_currency (@product.price * 1.2) %></span></dd>
<dt>Sale Price</dt>
- <dd><span class="price selling"><%= product_price(@product) %></span></dd>
+ <dd><span class="price selling"><%= number_to_currency (@product.price) %></span></dd>
</dl>
<dl class="shipping">
<dt>Shipping</dt>
@@ -48,6 +48,33 @@
</dl>
<hr />
+
+ <% if @product.has_variants? %>
+ <div id="product-variants" class="columns five alpha">
+ <h3 class="product-section-title"><%= t(:variants) %></h3>
+ <ul>
+ <% has_checked = false
+ @product.variants.active.each_with_index do |v,index|
+ next if v.option_values.empty? || (!v.in_stock && !Spree::Config[:show_zero_stock_products])
+ checked = !has_checked && (v.in_stock || Spree::Config[:allow_backorders])
+ has_checked = true if checked %>
+ <li>
+ <%= radio_button_tag "products[#{@product.id}]", v.id, checked, :disabled => !v.in_stock && !Spree::Config[:allow_backorders] %>
+ <label for="<%= ['products', @product.id, v.id].join('_') %>">
+ <span class="variant-description">
+ <%= variant_options v %>
+ </span>
+ <% if variant_price_diff v %>
+ <span class="price diff"><%= variant_price_diff v %></span>
+ <% end %>
+ </label>
+ </li>
+ <% end%>
+ </ul>
+ </div>
+ <% end%>
+
+
<% end %>
<p><button type="submit">Add to cart</button></p>
View
4 app/overrides/replace_products.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => %q{shared/_products},
+Deface::Override.new(:virtual_path => %q{spree/shared/_products},
:name => %q{replace_products},
:replace => %q{#products[data-hook]},
:closing_selector => %q{},
@@ -18,7 +18,7 @@
<p class="stock"><%= product.has_stock? ? "IN STOCK" : "OUT OF STOCK" %></p>
<p class="prices">
<span class="price discounted"><%= number_to_currency(product.price * 1.2) %></span>&nbsp;
- <span class="price selling"><%= product_price(product) %></span></p>
+ <span class="price selling"><%= number_to_currency(product.price) %></span></p>
<p><%= link_to 'View More', product_path(product), :class => 'button' %></p>
</div>
<p class="description">
View
2  app/overrides/replace_shipping_method.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => %q{checkout/_delivery},
+Deface::Override.new(:virtual_path => %q{spree/checkout/_delivery},
:name => %q{replace_shipping_method},
:replace => %q{#shipping_method[data-hook]},
:text => %q{<div id="content" role="content">
View
2  app/overrides/replace_taxon_children.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => "taxons/show",
+Deface::Override.new(:virtual_path => "spree/taxons/show",
:name => "replace_taxon_children",
:replace => "[data-hook='taxon_children']",
:text => %q{ <div data-hook="taxon_products">
View
2  app/overrides/replace_taxon_sidebar_navigation.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => %q{taxons/show},
+Deface::Override.new(:virtual_path => %q{spree/taxons/show},
:name => %q{replace_taxon_sidebar_navigation},
:replace => %q{[data-hook='taxon_sidebar_navigation']},
:closing_selector => %q{},
View
2  app/overrides/replace_taxonomies.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => %q{shared/_taxonomies},
+Deface::Override.new(:virtual_path => %q{spree/shared/_taxonomies},
:name => %q{replace_taxonomies},
:replace => %q{#taxonomies[data-hook]},
:text => %q{<%= render 'shared/all_products' %>})
View
10 app/overrides/replace_user_registration_new.rb
@@ -1,13 +1,11 @@
- Deface::Override.new(:virtual_path => %q{user_registrations/new},
+ Deface::Override.new(:virtual_path => %q{spree/user_registrations/new},
:name => %q{replace_user_registration_new},
:replace => %q{#new-customer},
:text => %q{<div id="new_customers">
<h2>New Customers</h2>
<p>You can register for a new account below:</p>
- <%= form_for(:user, :url => registration_path(User.new)) do |f| %>
- <%= render 'shared/user_form', :f => f %>
- <p>
- <button type="submit">Register</button>
- </p>
+ <%= form_for :user, :url => spree.user_registration_path(@user) do |f| %>
+ <%= render :partial => 'spree/shared/user_form', :locals => { :f => f } %>
+ <p><%= f.submit t(:create), :class => 'button primary' %></p>
<% end %>
</div>})
View
10 app/overrides/replace_user_sessions_new.rb
@@ -1,16 +1,16 @@
-Deface::Override.new(:virtual_path => %q{user_sessions/new},
+Deface::Override.new(:virtual_path => %q{spree/user_sessions/new},
:name => %q{replace_user_sessions_new},
:replace => %q{#existing-customer},
:text => %q{
<% if Rails.application.railties.all.map(&:railtie_name).include? "spree_social" %>
-<%= render 'shared/social_users' %>
+<%= render 'spree/shared/social_users' %>
<% end %>
<div id="local_login">
<div id="existing-customer">
<h2>Existing Customers</h2>
<p>If you've already registered for an account you can sign in here:</p>
- <%= render :partial => 'shared/login' %>
+ <%= render :partial => 'spree/shared/login' %>
</div>
<hr/>
@@ -18,7 +18,7 @@
<div id="new_customers">
<h2>New Customers</h2>
<p>You can register for a new account here on RailsDog Radio below:</p>
- <%= form_for(:user, :url => registration_path(User.new)) do |f| %>
+ <%= form_for :user, :url => spree.user_registration_path(@user) do |f| %>
<% if session[:omniauth] %>
<p>
@@ -26,7 +26,7 @@
<%= f.text_field :email, :class => 'title' %>
</p>
<% else %>
- <%= render 'shared/user_form', :f => f %>
+ <%= render 'spree/shared/user_form', :f => f %>
<% end %>
<p>
<button type="submit">Register</button>
View
2  app/overrides/tweak_button_login.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => %q{shared/_login},
+Deface::Override.new(:virtual_path => %q{spree/shared/_login},
:name => %q{tweak_button_login},
:replace => %q{p code:contains('submit_tag')},
:text => %q{<button type="submit">Log In</button>})
View
2  app/overrides/tweak_remember_me_login.rb
@@ -1,4 +1,4 @@
-Deface::Override.new(:virtual_path => %q{shared/_login},
+Deface::Override.new(:virtual_path => %q{spree/shared/_login},
:name => %q{tweak_remember_me_login},
:replace => %q{p label},
:text => %q{<%= f.check_box :remember_me %>
View
4 app/views/shared/_all_products.html.erb
@@ -9,7 +9,7 @@
<% else %>
<h2>All Products</h2>
<ul>
- <% Taxonomy.where(:name => "Categories").first.root.children.each_with_index do |taxon,i| %>
+ <% Spree::Taxonomy.where(:name => "Categories").first.root.children.each_with_index do |taxon,i| %>
<li><%= raw link_to(taxon.name, seo_url(taxon)) %></li>
<% end %>
</ul>
@@ -17,6 +17,6 @@
</div>
<% if Rails.application.railties.all.map(&:railtie_name).include? "spree_recently_viewed" %>
<div id="recent-products" class="list-box">
- <%= render "shared/recently_viewed_products" %>
+ <%= render "spree/shared/recently_viewed_products" %>
</div>
<% end %>
View
9 lib/generators/spree_rdr_theme/install/install_generator.rb
@@ -2,18 +2,11 @@ module SpreeRdrTheme
module Generators
class InstallGenerator < Rails::Generators::Base
- def remove_spree_core_stylesheets
- gsub_file "app/assets/stylesheets/store/all.css", /^\s*\*=\s*require\s*store\/spree_core.*$/, ''
- end
-
def add_javascripts
append_file "app/assets/javascripts/store/all.js", "//= require jquery.fancybox-1.3.4\n"
append_file "app/assets/javascripts/store/all.js", "//= require store/rdr_wishlist\n"
end
-
- def add_stylesheets
- inject_into_file "app/assets/stylesheets/store/all.css", " *= require store/rdr\n", :before => /\*\//, :verbose => true
- end
+
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.