spree_core 0.60.6 → 0.70.RC1
Sign up to get free protection for your applications and to get access to all the features.
- data/{public → app/assets}/images/admin/bg/active-tab.png +0 -0
- data/{public → app/assets}/images/admin/bg/admin_tab_back.png +0 -0
- data/{public → app/assets}/images/admin/bg/admin_tab_selected_back.png +0 -0
- data/{public → app/assets}/images/admin/bg/content-back-blue.png +0 -0
- data/{public → app/assets}/images/admin/bg/content-back-green.png +0 -0
- data/{public → app/assets}/images/admin/bg/content-back.png +0 -0
- data/{public → app/assets}/images/admin/bg/flash-error.png +0 -0
- data/{public → app/assets}/images/admin/bg/flash-notice.png +0 -0
- data/{public → app/assets}/images/admin/bg/green-stripes.gif +0 -0
- data/{public → app/assets}/images/admin/bg/green-stripes.png +0 -0
- data/{public → app/assets}/images/admin/bg/grid_header_back.png +0 -0
- data/{public → app/assets}/images/admin/bg/grid_header_back_green.png +0 -0
- data/{public → app/assets}/images/admin/bg/header-bg.png +0 -0
- data/{public → app/assets}/images/admin/bg/header.png +0 -0
- data/{public → app/assets}/images/admin/bg/header_bg.jpg +0 -0
- data/{public → app/assets}/images/admin/bg/menu-current.png +0 -0
- data/{public → app/assets}/images/admin/bg/red-stripes.gif +0 -0
- data/{public → app/assets}/images/admin/bg/red-stripes.png +0 -0
- data/{public → app/assets}/images/admin/bg/spree_50.png +0 -0
- data/{public → app/assets}/images/admin/bg/subnav-divider.png +0 -0
- data/{public → app/assets}/images/admin/bg/subnav.png +0 -0
- data/{public → app/assets}/images/admin/bg/tab-back.png +0 -0
- data/{public → app/assets}/images/admin/buttons/blue/left_01.png +0 -0
- data/{public → app/assets}/images/admin/buttons/blue/right_01.png +0 -0
- data/{public → app/assets}/images/admin/buttons/drag-handle-green.png +0 -0
- data/{public → app/assets}/images/admin/buttons/green/left_01.png +0 -0
- data/{public → app/assets}/images/admin/buttons/green/right_01.png +0 -0
- data/{public → app/assets}/images/admin/buttons/left_01.png +0 -0
- data/{public → app/assets}/images/admin/buttons/left_01_small.png +0 -0
- data/{public → app/assets}/images/admin/buttons/orange/left_03.png +0 -0
- data/{public → app/assets}/images/admin/buttons/orange/right_03.png +0 -0
- data/{public → app/assets}/images/admin/buttons/right_01.png +0 -0
- data/{public → app/assets}/images/admin/buttons/right_01_small.png +0 -0
- data/{public → app/assets}/images/admin/icons/16x16/1.png +0 -0
- data/{public → app/assets}/images/admin/icons/16x16/10.png +0 -0
- data/{public → app/assets}/images/admin/icons/16x16/2.png +0 -0
- data/{public → app/assets}/images/admin/icons/16x16/3.png +0 -0
- data/{public → app/assets}/images/admin/icons/16x16/4.png +0 -0
- data/{public → app/assets}/images/admin/icons/16x16/5.png +0 -0
- data/{public → app/assets}/images/admin/icons/16x16/6.png +0 -0
- data/{public → app/assets}/images/admin/icons/16x16/7.png +0 -0
- data/{public → app/assets}/images/admin/icons/16x16/8.png +0 -0
- data/{public → app/assets}/images/admin/icons/16x16/9.png +0 -0
- data/{public → app/assets}/images/admin/icons/32x32/1.png +0 -0
- data/{public → app/assets}/images/admin/icons/32x32/10.png +0 -0
- data/{public → app/assets}/images/admin/icons/32x32/11.png +0 -0
- data/{public → app/assets}/images/admin/icons/32x32/2.png +0 -0
- data/{public → app/assets}/images/admin/icons/32x32/3.png +0 -0
- data/{public → app/assets}/images/admin/icons/32x32/4.png +0 -0
- data/{public → app/assets}/images/admin/icons/32x32/5.png +0 -0
- data/{public → app/assets}/images/admin/icons/32x32/6.png +0 -0
- data/{public → app/assets}/images/admin/icons/32x32/7.png +0 -0
- data/{public → app/assets}/images/admin/icons/32x32/8.png +0 -0
- data/{public → app/assets}/images/admin/icons/32x32/9.png +0 -0
- data/{public → app/assets}/images/admin/icons/accept.png +0 -0
- data/{public → app/assets}/images/admin/icons/add.gif +0 -0
- data/{public → app/assets}/images/admin/icons/add.png +0 -0
- data/{public → app/assets}/images/admin/icons/arrow-down.gif +0 -0
- data/{public → app/assets}/images/admin/icons/cross.png +0 -0
- data/{public → app/assets}/images/admin/icons/delete.gif +0 -0
- data/{public → app/assets}/images/admin/icons/delete.png +0 -0
- data/{public → app/assets}/images/admin/icons/drag.gif +0 -0
- data/{public → app/assets}/images/admin/icons/edit.gif +0 -0
- data/{public → app/assets}/images/admin/icons/edit.png +0 -0
- data/{public → app/assets}/images/admin/icons/email.png +0 -0
- data/{public → app/assets}/images/admin/icons/error.png +0 -0
- data/{public → app/assets}/images/admin/icons/exclamation.png +0 -0
- data/{public → app/assets}/images/admin/icons/feed.png +0 -0
- data/{public → app/assets}/images/admin/icons/pdf.png +0 -0
- data/{public → app/assets}/images/admin/icons/reorder.gif +0 -0
- data/{public → app/assets}/images/admin/icons/search.gif +0 -0
- data/{public → app/assets}/images/admin/icons/send-email.png +0 -0
- data/{public → app/assets}/images/admin/icons/stop.png +0 -0
- data/app/assets/images/admin/icons/switch.png +0 -0
- data/{public → app/assets}/images/admin/icons/tick.png +0 -0
- data/{public → app/assets}/images/admin/icons/up.gif +0 -0
- data/{public → app/assets}/images/admin/icons/xls.png +0 -0
- data/{public/images → app/assets/images/admin}/progress.gif +0 -0
- data/{public/images → app/assets/images/creditcards}/amex_cid.gif +0 -0
- data/{public/images → app/assets/images/creditcards}/creditcard.gif +0 -0
- data/{public/images → app/assets/images/creditcards}/discover_cid.gif +0 -0
- data/{public/images → app/assets/images/creditcards}/master_cid.jpg +0 -0
- data/{public/images → app/assets/images/creditcards}/visa_cid.gif +0 -0
- data/{public → app/assets}/images/favicon.ico +0 -0
- data/{public/images → app/assets/images/icons}/add-to-cart.png +0 -0
- data/{public/images → app/assets/images/icons}/checkout.png +0 -0
- data/app/assets/images/icons/delete.png +0 -0
- data/{public/images → app/assets/images/icons}/update.png +0 -0
- data/app/assets/images/noimage/mini.png +0 -0
- data/app/assets/images/noimage/product.png +0 -0
- data/app/assets/images/noimage/small.png +0 -0
- data/{public → app/assets}/images/spinner.gif +0 -0
- data/{public → app/assets}/javascripts/admin/address_states.js +4 -4
- data/{public/javascripts/admin.js → app/assets/javascripts/admin/admin.js.erb} +90 -93
- data/app/assets/javascripts/admin/calculator.js +15 -0
- data/{public → app/assets}/javascripts/admin/checkouts/edit.js +13 -13
- data/app/assets/javascripts/admin/gateway.js +13 -0
- data/app/assets/javascripts/admin/images/index.js +10 -0
- data/app/assets/javascripts/admin/images/new.js +5 -0
- data/app/assets/javascripts/admin/nested-attribute.js +23 -0
- data/app/assets/javascripts/admin/orders/edit.js +15 -0
- data/app/assets/javascripts/admin/orders/edit_form.js +16 -0
- data/{public → app/assets}/javascripts/admin/payments/new.js +0 -0
- data/app/assets/javascripts/admin/products.js +23 -0
- data/app/assets/javascripts/admin/spree_core.js +10 -0
- data/app/assets/javascripts/admin/taxonomy.js +206 -0
- data/app/assets/javascripts/admin/underscore-min.js +26 -0
- data/app/assets/javascripts/admin/zone.js +44 -0
- data/app/assets/javascripts/store/cart.js +11 -0
- data/app/assets/javascripts/store/checkout.js +77 -0
- data/app/assets/javascripts/store/product.js +49 -0
- data/app/assets/javascripts/store/spree_core.js +6 -0
- data/{public/stylesheets/admin/admin-forms.css → app/assets/stylesheets/admin/admin-form.css.erb} +27 -16
- data/{public → app/assets}/stylesheets/admin/admin-reset.css +0 -0
- data/{public/stylesheets/admin/admin-tables.css → app/assets/stylesheets/admin/admin-tables.css.erb} +3 -2
- data/{public → app/assets}/stylesheets/admin/admin-typography.css +2 -2
- data/{public/stylesheets/admin/admin.css → app/assets/stylesheets/admin/admin.css.erb} +22 -46
- data/{public/stylesheets/admin/autocomplete.css → app/assets/stylesheets/admin/edit_checkouts.css} +6 -7
- data/{public → app/assets}/stylesheets/admin/grids.css +107 -107
- data/app/assets/stylesheets/admin/spree_core.css +16 -0
- data/{public → app/assets}/stylesheets/admin/token-input.css +0 -0
- data/app/assets/stylesheets/store/reset.css +175 -0
- data/app/assets/stylesheets/store/screen.css +122 -0
- data/app/assets/stylesheets/store/spree_core.css +5 -0
- data/app/controllers/admin/base_controller.rb +3 -32
- data/app/controllers/admin/general_settings_controller.rb +14 -15
- data/app/controllers/admin/line_items_controller.rb +1 -1
- data/app/controllers/admin/mail_methods_controller.rb +13 -0
- data/app/controllers/admin/option_types_controller.rb +1 -2
- data/app/controllers/admin/orders_controller.rb +9 -8
- data/app/controllers/admin/product_groups_controller.rb +1 -2
- data/app/controllers/admin/products_controller.rb +4 -6
- data/app/controllers/admin/prototypes_controller.rb +1 -0
- data/app/controllers/admin/resource_controller.rb +7 -1
- data/app/controllers/admin/shipments_controller.rb +1 -1
- data/app/controllers/admin/states_controller.rb +1 -1
- data/app/controllers/admin/tax_categories_controller.rb +6 -0
- data/app/controllers/admin/taxons_controller.rb +0 -9
- data/app/controllers/admin/users_controller.rb +9 -5
- data/app/controllers/admin/variants_controller.rb +22 -0
- data/app/controllers/admin/zones_controller.rb +1 -1
- data/app/controllers/checkout_controller.rb +6 -0
- data/app/controllers/content_controller.rb +1 -1
- data/app/controllers/home_controller.rb +10 -0
- data/app/controllers/orders_controller.rb +11 -7
- data/app/controllers/products_controller.rb +0 -1
- data/app/helpers/admin/base_helper.rb +4 -8
- data/app/helpers/admin/navigation_helper.rb +9 -2
- data/app/helpers/checkout_helper.rb +7 -3
- data/app/helpers/hook_helper.rb +5 -15
- data/app/helpers/products_helper.rb +4 -0
- data/app/helpers/spree/base_helper.rb +55 -12
- data/app/helpers/taxons_helper.rb +0 -16
- data/app/mailers/test_mailer.rb +10 -0
- data/app/models/activator.rb +27 -0
- data/app/models/adjustment.rb +32 -12
- data/app/models/app_configuration.rb +7 -6
- data/app/models/calculator/vat.rb +27 -43
- data/app/models/creditcard.rb +23 -34
- data/app/models/gateway.rb +1 -0
- data/app/models/image.rb +7 -2
- data/app/models/order.rb +30 -17
- data/app/models/payment.rb +5 -11
- data/app/models/payment_method.rb +0 -4
- data/app/models/payment_method/check.rb +0 -4
- data/app/models/product.rb +22 -9
- data/app/models/product_group.rb +4 -8
- data/app/models/product_scope.rb +1 -1
- data/app/models/shipment.rb +1 -6
- data/app/models/tax_category.rb +6 -0
- data/app/models/tax_rate.rb +10 -0
- data/app/models/taxon.rb +3 -3
- data/app/models/zone.rb +4 -4
- data/app/views/admin/adjustments/_adjustments_table.html.erb +3 -3
- data/app/views/admin/adjustments/edit.html.erb +1 -1
- data/app/views/admin/adjustments/new.html.erb +1 -1
- data/app/views/admin/configurations/index.html.erb +54 -56
- data/app/views/admin/general_settings/edit.html.erb +13 -38
- data/app/views/admin/general_settings/show.html.erb +13 -23
- data/app/views/admin/images/_form.html.erb +4 -4
- data/app/views/admin/images/edit.html.erb +4 -4
- data/app/views/admin/images/index.html.erb +7 -21
- data/app/views/admin/images/new.html.erb +8 -18
- data/app/views/admin/inventory_settings/edit.html.erb +3 -3
- data/app/views/admin/inventory_units/adjust.html.erb +2 -2
- data/app/views/admin/line_items/create.js.erb +4 -0
- data/app/views/admin/mail_methods/_form.html.erb +3 -6
- data/app/views/admin/mail_methods/edit.html.erb +3 -3
- data/app/views/admin/mail_methods/index.html.erb +17 -21
- data/app/views/admin/mail_methods/new.html.erb +3 -3
- data/app/views/admin/option_types/_available.html.erb +5 -4
- data/app/views/admin/option_types/_option_value_fields.html.erb +1 -1
- data/app/views/admin/option_types/_selected.html.erb +6 -6
- data/app/views/admin/option_types/edit.html.erb +4 -4
- data/app/views/admin/option_types/index.html.erb +6 -6
- data/app/views/admin/option_types/{new.erb → new.html.erb} +1 -1
- data/app/views/admin/option_types/new.js.erb +2 -0
- data/app/views/admin/option_types/selected.html.erb +1 -1
- data/app/views/admin/orders/_add_product.html.erb +4 -4
- data/app/views/admin/orders/_form.html.erb +31 -42
- data/app/views/admin/orders/_line_item.html.erb +10 -15
- data/app/views/admin/orders/_user_form.html.erb +11 -6
- data/app/views/admin/orders/edit.html.erb +12 -16
- data/app/views/admin/orders/history.html.erb +3 -3
- data/app/views/admin/orders/index.html.erb +33 -45
- data/app/views/admin/orders/new.html.erb +5 -6
- data/app/views/admin/orders/show.html.erb +7 -9
- data/app/views/admin/orders/user.html.erb +2 -7
- data/app/views/admin/payment_methods/_form.html.erb +8 -8
- data/app/views/admin/payment_methods/edit.html.erb +1 -1
- data/app/views/admin/payment_methods/index.html.erb +19 -28
- data/app/views/admin/payment_methods/new.html.erb +2 -2
- data/app/views/admin/payments/_form.html.erb +1 -1
- data/app/views/admin/payments/_list.html.erb +2 -2
- data/app/views/admin/payments/_transaction_list.html.erb +3 -3
- data/app/views/admin/payments/credit.html.erb +1 -1
- data/app/views/admin/payments/index.html.erb +1 -1
- data/app/views/admin/payments/new.html.erb +2 -2
- data/app/views/admin/payments/show.html.erb +1 -1
- data/app/views/admin/payments/source_forms/_gateway.html.erb +6 -6
- data/app/views/admin/payments/source_views/_gateway.html.erb +1 -1
- data/app/views/admin/product_groups/_preview.html.erb +8 -8
- data/app/views/admin/product_groups/_product_scope.html.erb +5 -5
- data/app/views/admin/product_groups/edit.html.erb +6 -9
- data/app/views/admin/product_groups/index.html.erb +6 -6
- data/app/views/admin/product_groups/new.html.erb +2 -2
- data/app/views/admin/product_groups/show.html.erb +4 -4
- data/app/views/admin/product_groups/update.js.erb +5 -1
- data/app/views/admin/product_properties/_product_property_fields.html.erb +1 -1
- data/app/views/admin/product_properties/index.html.erb +11 -11
- data/app/views/admin/products/_form.html.erb +75 -72
- data/app/views/admin/products/_option_types.html.erb +34 -34
- data/app/views/admin/products/_properties_form.erb +2 -2
- data/app/views/admin/products/edit.html.erb +2 -3
- data/app/views/admin/products/index.html.erb +25 -34
- data/app/views/admin/products/{new.erb → new.html.erb} +4 -5
- data/app/views/admin/products/new.js.erb +3 -0
- data/app/views/admin/properties/_form.html.erb +13 -10
- data/app/views/admin/properties/edit.html.erb +1 -1
- data/app/views/admin/properties/index.html.erb +5 -5
- data/app/views/admin/properties/{new.erb → new.html.erb} +2 -2
- data/app/views/admin/properties/new.js.erb +2 -0
- data/app/views/admin/prototypes/_form.html.erb +18 -18
- data/app/views/admin/prototypes/_prototypes.html.erb +22 -0
- data/app/views/admin/prototypes/available.js.erb +2 -0
- data/app/views/admin/prototypes/edit.html.erb +1 -1
- data/app/views/admin/prototypes/index.html.erb +6 -6
- data/app/views/admin/prototypes/{new.erb → new.html.erb} +2 -2
- data/app/views/admin/prototypes/new.js.erb +2 -0
- data/app/views/admin/reports/index.html.erb +2 -2
- data/app/views/admin/reports/sales_total.html.erb +1 -1
- data/app/views/admin/return_authorizations/_form.html.erb +2 -2
- data/app/views/admin/return_authorizations/edit.html.erb +4 -4
- data/app/views/admin/return_authorizations/index.html.erb +5 -5
- data/app/views/admin/return_authorizations/new.html.erb +2 -2
- data/app/views/admin/shared/_address.html.erb +1 -1
- data/app/views/admin/shared/_address_form.html.erb +3 -4
- data/app/views/admin/shared/_calculator_fields.html.erb +3 -3
- data/app/views/admin/shared/_configuration_menu.html.erb +13 -14
- data/app/views/admin/shared/_destroy.js.erb +1 -1
- data/app/views/admin/shared/_edit_resource_links.html.erb +1 -1
- data/app/views/admin/shared/_group_from_products_form.html.erb +1 -1
- data/app/views/admin/shared/_head.html.erb +26 -0
- data/app/views/admin/shared/_new_adjustment_button.html.erb +4 -4
- data/app/views/admin/shared/_new_resource_links.html.erb +1 -1
- data/app/views/admin/shared/_order_details.html.erb +0 -1
- data/app/views/admin/shared/_order_tabs.html.erb +42 -47
- data/app/views/admin/shared/_product_sub_menu.html.erb +6 -8
- data/app/views/admin/shared/_product_tabs.html.erb +19 -23
- data/app/views/admin/shared/_report_criteria.html.erb +2 -2
- data/app/views/admin/shared/_show_resource_links.html.erb +2 -2
- data/app/views/admin/shared/_tabs.html.erb +1 -1
- data/app/views/admin/shipments/_form.html.erb +37 -41
- data/app/views/admin/shipments/edit.html.erb +13 -15
- data/app/views/admin/shipments/index.html.erb +21 -30
- data/app/views/admin/shipments/new.html.erb +6 -6
- data/app/views/admin/shipping_categories/_form.html.erb +2 -2
- data/app/views/admin/shipping_categories/edit.html.erb +1 -1
- data/app/views/admin/shipping_categories/index.html.erb +5 -5
- data/app/views/admin/shipping_categories/new.html.erb +1 -1
- data/app/views/admin/shipping_methods/_form.html.erb +4 -5
- data/app/views/admin/shipping_methods/edit.html.erb +7 -7
- data/app/views/admin/shipping_methods/index.html.erb +13 -22
- data/app/views/admin/shipping_methods/new.html.erb +7 -7
- data/app/views/admin/states/_state_list.html.erb +6 -6
- data/app/views/admin/states/edit.html.erb +1 -1
- data/app/views/admin/states/index.html.erb +3 -3
- data/app/views/admin/states/{new.erb → new.html.erb} +1 -1
- data/app/views/admin/states/new.js.erb +2 -0
- data/app/views/admin/tax_categories/index.html.erb +7 -7
- data/app/views/admin/tax_categories/new.html.erb +1 -1
- data/app/views/admin/tax_rates/_form.html.erb +5 -5
- data/app/views/admin/tax_rates/edit.html.erb +1 -1
- data/app/views/admin/tax_rates/index.html.erb +5 -5
- data/app/views/admin/tax_rates/new.html.erb +1 -1
- data/app/views/admin/tax_settings/edit.html.erb +10 -4
- data/app/views/admin/tax_settings/show.html.erb +8 -4
- data/app/views/admin/taxonomies/_form.html.erb +2 -2
- data/app/views/admin/taxonomies/_js_head.html.erb +0 -1
- data/app/views/admin/taxonomies/_list.html.erb +3 -3
- data/app/views/admin/taxonomies/edit.erb +2 -2
- data/app/views/admin/taxonomies/index.html.erb +4 -4
- data/app/views/admin/taxonomies/new.html.erb +2 -2
- data/app/views/admin/taxons/_form.html.erb +2 -2
- data/app/views/admin/taxons/_taxon_table.html.erb +10 -10
- data/app/views/admin/taxons/available.js.erb +7 -14
- data/app/views/admin/taxons/edit.html.erb +2 -2
- data/app/views/admin/taxons/selected.html.erb +9 -9
- data/app/views/admin/trackers/_form.html.erb +7 -6
- data/app/views/admin/trackers/edit.html.erb +1 -1
- data/app/views/admin/trackers/index.html.erb +8 -13
- data/app/views/admin/trackers/new.html.erb +1 -1
- data/app/views/admin/users/_form.html.erb +13 -14
- data/app/views/admin/users/edit.html.erb +7 -7
- data/app/views/admin/users/index.html.erb +20 -34
- data/app/views/admin/users/new.html.erb +7 -7
- data/app/views/admin/users/show.html.erb +2 -2
- data/app/views/admin/variants/_form.html.erb +6 -6
- data/app/views/admin/variants/edit.html.erb +3 -3
- data/app/views/admin/variants/index.html.erb +6 -6
- data/app/views/admin/variants/new.html.erb +8 -0
- data/app/views/admin/variants/new.js.erb +2 -0
- data/app/views/admin/zones/_country_member.html.erb +1 -1
- data/app/views/admin/zones/_form.html.erb +1 -1
- data/app/views/admin/zones/_member_type.html.erb +2 -2
- data/app/views/admin/zones/_state_member.html.erb +2 -2
- data/app/views/admin/zones/_zone_member.html.erb +2 -2
- data/app/views/admin/zones/edit.html.erb +1 -1
- data/app/views/admin/zones/index.html.erb +8 -9
- data/app/views/admin/zones/new.html.erb +1 -1
- data/app/views/checkout/_address.html.erb +125 -134
- data/app/views/checkout/_confirm.html.erb +2 -2
- data/app/views/checkout/_delivery.html.erb +8 -4
- data/app/views/checkout/_payment.html.erb +7 -7
- data/app/views/checkout/_summary.html.erb +6 -5
- data/app/views/checkout/edit.html.erb +6 -8
- data/app/views/checkout/payment/_gateway.html.erb +5 -5
- data/app/views/checkout/registration.html.erb +3 -3
- data/app/views/content/cvv.html.erb +5 -5
- data/app/views/home/index.html.erb +10 -0
- data/app/views/layouts/admin.html.erb +16 -23
- data/app/views/layouts/spree_application.html.erb +30 -44
- data/app/views/orders/_form.html.erb +8 -10
- data/app/views/orders/_line_item.html.erb +17 -32
- data/app/views/orders/edit.html.erb +20 -18
- data/app/views/orders/show.html.erb +2 -2
- data/app/views/products/_cart_form.html.erb +42 -47
- data/app/views/products/_properties.html.erb +5 -4
- data/app/views/products/_taxons.html.erb +10 -12
- data/app/views/products/_thumbnails.html.erb +14 -35
- data/app/views/products/index.html.erb +6 -9
- data/app/views/products/show.html.erb +18 -23
- data/app/views/shared/_error_messages.html.erb +1 -1
- data/app/views/shared/_filters.html.erb +1 -1
- data/app/views/shared/_head.html.erb +3 -6
- data/app/views/shared/_nav_bar.html.erb +3 -2
- data/app/views/shared/_order_details.html.erb +31 -41
- data/app/views/shared/_products.html.erb +10 -16
- data/app/views/shared/_store_menu.html.erb +2 -2
- data/app/views/shared/_taxonomies.html.erb +3 -14
- data/app/views/taxons/_taxon.html.erb +1 -1
- data/app/views/taxons/show.html.erb +6 -6
- data/app/views/test_mailer/test_email.text.erb +4 -0
- data/config/initializers/deprecation_checker.rb +7 -0
- data/config/initializers/disable_paperclip_log.rb +2 -0
- data/config/initializers/form_builder.rb +0 -4
- data/config/initializers/sprockets_precompile_patch.rb +16 -0
- data/config/initializers/workarounds_for_ruby19.rb +1 -1
- data/config/locales/en.yml +55 -24
- data/config/routes.rb +9 -8
- data/db/default/roles.yml +1 -3
- data/db/migrate/20100419194457_fix_existing_coupon_credits.rb +9 -0
- data/db/migrate/20110329141434_create_activators.rb +21 -0
- data/db/migrate/20110418151136_eligible_for_adjustments.rb +9 -0
- data/db/seeds.rb +4 -2
- data/lib/custom_fixtures.rb +64 -3
- data/lib/generators/spree/dummy/dummy_generator.rb +105 -0
- data/lib/generators/spree/dummy/templates/cucumber/cucumber.rb +38 -0
- data/lib/generators/spree/dummy/templates/rails/application.rb +10 -0
- data/lib/generators/spree/dummy/templates/rails/boot.rb +6 -0
- data/lib/generators/spree/dummy/templates/rails/database.yml +30 -0
- data/lib/generators/spree/dummy/templates/rails/routes.rb +3 -0
- data/lib/generators/spree/sandbox/sandbox_generator.rb +27 -0
- data/lib/generators/spree/site/site_generator.rb +79 -0
- data/lib/generators/spree/site/templates/app/assets/javascripts/admin/all.js +16 -0
- data/lib/generators/spree/site/templates/app/assets/javascripts/store/all.js +16 -0
- data/lib/generators/spree/site/templates/app/assets/stylesheets/admin/all.css +17 -0
- data/lib/generators/spree/site/templates/app/assets/stylesheets/store/all.css +17 -0
- data/lib/scopes.rb +1 -1
- data/lib/spree/calculated_adjustments.rb +8 -3
- data/lib/spree/search/base.rb +1 -5
- data/lib/spree_base.rb +12 -0
- data/lib/spree_core.rb +9 -6
- data/lib/spree_core/ext/active_record.rb +1 -1
- data/lib/spree_core/preferences/model_hooks.rb +7 -3
- data/lib/spree_core/railtie.rb +19 -3
- data/lib/spree_core/testing_support/common_rake.rb +12 -0
- data/lib/spree_core/testing_support/factories/activator_factory.rb +6 -0
- data/lib/spree_core/testing_support/factories/adjustment_factory.rb +1 -0
- data/lib/spree_core/testing_support/factories/calculator_factory.rb +6 -0
- data/lib/spree_core/testing_support/factories/order_factory.rb +7 -6
- data/lib/spree_core/testing_support/factories/product_factory.rb +6 -0
- data/lib/spree_core/testing_support/factories/user_factory.rb +14 -10
- data/lib/spree_core/testing_support/factories/zone_factory.rb +1 -1
- data/lib/spree_core/theme_support.rb +0 -3
- data/lib/spree_core/theme_support/hook_listener.rb +112 -35
- data/lib/spree_core/version.rb +1 -1
- data/lib/subclass_registration.rb +21 -0
- data/lib/tasks/assets.rake +58 -0
- data/lib/tasks/core.rake +18 -11
- data/lib/tasks/install.rake +4 -12
- data/{public → vendor/assets}/images/datepicker/cal.gif +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_flat_0_eeeeee_40x100.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_flat_55_ffffff_40x100.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_highlight-soft_100_f6f6f6_1x100.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_highlight-soft_25_0073ea_1x100.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_highlight-soft_50_dddddd_1x100.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-icons_0073ea_256x240.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-icons_454545_256x240.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-icons_666666_256x240.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-icons_ff0084_256x240.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-icons_ffffff_256x240.png +0 -0
- data/{public → vendor/assets}/javascripts/jquery.alerts/images/help.gif +0 -0
- data/{public → vendor/assets}/javascripts/jquery.alerts/images/important.gif +0 -0
- data/{public → vendor/assets}/javascripts/jquery.alerts/images/info.gif +0 -0
- data/{public → vendor/assets}/javascripts/jquery.alerts/images/title.gif +0 -0
- data/{public → vendor/assets}/javascripts/jquery.alerts/jquery.alerts.css +0 -0
- data/{public → vendor/assets}/javascripts/jquery.alerts/jquery.alerts.js +0 -0
- data/{public → vendor/assets}/javascripts/jquery.alerts/jquery.alerts.spree.css +0 -0
- data/{public → vendor/assets}/javascripts/jquery.autocomplete.min.js +0 -0
- data/vendor/assets/javascripts/jquery.cookie.js +41 -0
- data/{public → vendor/assets}/javascripts/jquery.delayedobserver.js +0 -0
- data/{public/javascripts/jsTree → vendor/assets/javascripts/jquery.jstree}/jquery.jstree.js +4544 -3510
- data/{public/javascripts/jsTree → vendor/assets/javascripts/jquery.jstree}/themes/apple/bg.jpg +0 -0
- data/{public/javascripts/jsTree → vendor/assets/javascripts/jquery.jstree}/themes/apple/d.png +0 -0
- data/{public/javascripts/jsTree → vendor/assets/javascripts/jquery.jstree}/themes/apple/dot_for_ie.gif +0 -0
- data/{public/javascripts/jsTree → vendor/assets/javascripts/jquery.jstree}/themes/apple/style.css +2 -1
- data/{public/javascripts/jsTree → vendor/assets/javascripts/jquery.jstree}/themes/apple/throbber.gif +0 -0
- data/vendor/assets/javascripts/jquery.tokeninput.js +860 -0
- data/vendor/assets/javascripts/jquery.validate/additional-methods.min.js +28 -0
- data/vendor/assets/javascripts/jquery.validate/jquery.validate.min.js +51 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ar.js +24 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_bg.js +23 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ca.js +23 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_cn.js +23 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_cs.js +23 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_da.js +20 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_de.js +21 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_el.js +24 -0
- data/{public/javascripts → vendor/assets/javascripts/jquery.validate}/localization/messages_es.js +22 -23
- data/vendor/assets/javascripts/jquery.validate/localization/messages_fa.js +23 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_fi.js +21 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_fr.js +23 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ge.js +23 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_he.js +23 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_hu.js +21 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_it.js +23 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ja.js +23 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_kk.js +23 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_lt.js +23 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_lv.js +23 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_nl.js +23 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_no.js +23 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_pl.js +23 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ptbr.js +30 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ptpt.js +23 -0
- data/{public/javascripts → vendor/assets/javascripts/jquery.validate}/localization/messages_ro.js +22 -23
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ru.js +23 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_se.js +23 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_si.js +23 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_sk.js +21 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_sr.js +23 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_th.js +23 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_tr.js +24 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_tw.js +24 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ua.js +24 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_vi.js +23 -0
- data/vendor/assets/javascripts/jquery.validate/localization/methods_de.js +12 -0
- data/vendor/assets/javascripts/jquery.validate/localization/methods_nl.js +9 -0
- data/vendor/assets/javascripts/jquery.validate/localization/methods_pt.js +9 -0
- data/vendor/assets/stylesheets/jquery-ui.datepicker.css.erb +357 -0
- metadata +358 -462
- data/app/models/spree/alert.rb +0 -13
- data/app/stylesheets/_buttons.less +0 -80
- data/app/stylesheets/_cart.less +0 -24
- data/app/stylesheets/_checkout.less +0 -76
- data/app/stylesheets/_checkout_progress.less +0 -62
- data/app/stylesheets/_colors.less +0 -16
- data/app/stylesheets/_forms.less +0 -50
- data/app/stylesheets/_layout.less +0 -77
- data/app/stylesheets/_messages.less +0 -32
- data/app/stylesheets/_mixins.less +0 -71
- data/app/stylesheets/_navigation.less +0 -130
- data/app/stylesheets/_prices.less +0 -18
- data/app/stylesheets/_product_details.less +0 -56
- data/app/stylesheets/_product_lists.less +0 -66
- data/app/stylesheets/_registration.less +0 -24
- data/app/stylesheets/_reset.less +0 -69
- data/app/stylesheets/_typography.less +0 -158
- data/app/stylesheets/screen.less +0 -13
- data/app/views/admin/extensions/index.html.erb +0 -23
- data/app/views/admin/product_scopes/_form.html.erb +0 -106
- data/app/views/admin/prototypes/available.html.erb +0 -22
- data/app/views/admin/shared/_alert.html.erb +0 -6
- data/app/views/admin/variants/new.erb +0 -11
- data/app/views/shared/_additional_field.html.erb +0 -7
- data/app/views/shared/_admin_head.html.erb +0 -34
- data/app/views/shared/_basic_layout.html.erb +0 -44
- data/app/views/shared/_edit_resource_links.html.erb +0 -1
- data/app/views/shared/_footer.html.erb +0 -13
- data/app/views/shared/_method_error_message.html.erb +0 -4
- data/app/views/shared/_new_resource_links.html.erb +0 -1
- data/app/views/shared/_show_resource_links.html.erb +0 -3
- data/app/views/shared/_test_hook.html.erb +0 -1
- data/config/initializers/load_unobtrusive_date_picker.rb +0 -8
- data/db/migrate/20101026184833_migrate_adjustments.rb +0 -9
- data/lib/generators/spree_core/upgrade_generator.rb +0 -23
- data/lib/generators/templates/config/initializers/%file_name%.rb.tt +0 -1
- data/lib/generators/templates/config/locales/%current_locale%.yml.tt +0 -2
- data/lib/generators/templates/config/routes.rb +0 -3
- data/lib/spree_core/theme_support/hook.rb +0 -51
- data/lib/spree_core/theme_support/hook_modifier.rb +0 -35
- data/lib/spree_core/theme_support/more_patches.rb +0 -118
- data/lib/tasks/common.rb +0 -30
- data/lib/tasks/themes.rake +0 -34
- data/public/images/admin/tabs/off-left.png +0 -0
- data/public/images/admin/tabs/off-right.png +0 -0
- data/public/images/admin/tabs/on-left.png +0 -0
- data/public/images/admin/tabs/on-right.png +0 -0
- data/public/images/ajax_loader.gif +0 -0
- data/public/images/bg-button-hover.png +0 -0
- data/public/images/bg-button-pressed.png +0 -0
- data/public/images/bg-button.gif +0 -0
- data/public/images/bg-button.png +0 -0
- data/public/images/blue/left_01.png +0 -0
- data/public/images/blue/right_01.png +0 -0
- data/public/images/body-back.png +0 -0
- data/public/images/bottom_shine.png +0 -0
- data/public/images/breadcrumb.gif +0 -0
- data/public/images/button-dark-hover.png +0 -0
- data/public/images/button-dark.png +0 -0
- data/public/images/buttons/bg-button-hover.png +0 -0
- data/public/images/buttons/bg-button-pressed.png +0 -0
- data/public/images/buttons/bg-button.gif +0 -0
- data/public/images/buttons/bg-button.png +0 -0
- data/public/images/buttons/blue/left_01.png +0 -0
- data/public/images/buttons/blue/right_01.png +0 -0
- data/public/images/buttons/button-dark-hover.png +0 -0
- data/public/images/buttons/button-dark.png +0 -0
- data/public/images/buttons/drag-handle-green.png +0 -0
- data/public/images/buttons/green/left_01.png +0 -0
- data/public/images/buttons/green/right_01.png +0 -0
- data/public/images/buttons/left_01.png +0 -0
- data/public/images/buttons/left_01_small.png +0 -0
- data/public/images/buttons/orange/left_03.png +0 -0
- data/public/images/buttons/orange/right_03.png +0 -0
- data/public/images/buttons/right_01.png +0 -0
- data/public/images/buttons/right_01_small.png +0 -0
- data/public/images/buttons/sxsw-ribbon-v1.png +0 -0
- data/public/images/buttons/top-shine.png +0 -0
- data/public/images/calendar_date_select/calendar.gif +0 -0
- data/public/images/cart-empty.png +0 -0
- data/public/images/cart-empty_x32.png +0 -0
- data/public/images/cart-full.png +0 -0
- data/public/images/cart-full_x32.png +0 -0
- data/public/images/datepicker/backstripes.gif +0 -0
- data/public/images/datepicker/bg_header.jpg +0 -0
- data/public/images/datepicker/bullet1.gif +0 -0
- data/public/images/datepicker/bullet2.gif +0 -0
- data/public/images/datepicker/gradient-e5e5e5-ffffff.gif +0 -0
- data/public/images/drag-handle-green.png +0 -0
- data/public/images/green/left_01.png +0 -0
- data/public/images/green/right_01.png +0 -0
- data/public/images/grid.png +0 -0
- data/public/images/left_01.png +0 -0
- data/public/images/left_01_small.png +0 -0
- data/public/images/menu-current.png +0 -0
- data/public/images/menu-hover.png +0 -0
- data/public/images/noimage/mini.jpg +0 -0
- data/public/images/noimage/product.jpg +0 -0
- data/public/images/noimage/small.jpg +0 -0
- data/public/images/openid-inputicon.gif +0 -0
- data/public/images/orange/left_03.png +0 -0
- data/public/images/orange/right_03.png +0 -0
- data/public/images/reorder.jpg +0 -0
- data/public/images/right_01.png +0 -0
- data/public/images/right_01_small.png +0 -0
- data/public/images/separator.png +0 -0
- data/public/images/shadow-top.png +0 -0
- data/public/images/shadow_top.png +0 -0
- data/public/images/spree.jpg +0 -0
- data/public/images/spree/progress.gif +0 -0
- data/public/images/spree/spinner.gif +0 -0
- data/public/images/spree/spree.jpg +0 -0
- data/public/images/step-progress/completed-completed.gif +0 -0
- data/public/images/step-progress/completed-current.gif +0 -0
- data/public/images/step-progress/completed-first.gif +0 -0
- data/public/images/step-progress/current-first.gif +0 -0
- data/public/images/step-progress/current-incomplete.gif +0 -0
- data/public/images/step-progress/current-right.gif +0 -0
- data/public/images/step-progress/incomplete-incomplete.gif +0 -0
- data/public/images/step-progress/incomplete-right.gif +0 -0
- data/public/images/steps/1.png +0 -0
- data/public/images/steps/1_small.png +0 -0
- data/public/images/steps/2.png +0 -0
- data/public/images/steps/2_small.png +0 -0
- data/public/images/steps/3.png +0 -0
- data/public/images/steps/3_small.png +0 -0
- data/public/images/steps/4.png +0 -0
- data/public/images/steps/4_small.png +0 -0
- data/public/images/steps/5.png +0 -0
- data/public/images/steps/5_small.png +0 -0
- data/public/images/steps/6.png +0 -0
- data/public/images/steps/6_small.png +0 -0
- data/public/images/sxsw-ribbon-v1.png +0 -0
- data/public/images/tab_bottom.gif +0 -0
- data/public/images/tile-header.png +0 -0
- data/public/images/tile-slider.png +0 -0
- data/public/images/top-shine.png +0 -0
- data/public/images/tree-nav-icons/bullet.gif +0 -0
- data/public/images/tree-nav-icons/minus.gif +0 -0
- data/public/images/tree-nav-icons/plus.gif +0 -0
- data/public/images/tree-nav-icons/treeview-loading.gif +0 -0
- data/public/images/tree-nav-icons/treeview-sprite.gif +0 -0
- data/public/images/wrapper-back-2.png +0 -0
- data/public/images/wrapper-back.png +0 -0
- data/public/images/yui-menubaritem_submenuindicator.png +0 -0
- data/public/images/yui-menubaritem_submenuindicator_disabled.png +0 -0
- data/public/images/yui-menuitem_checkbox.png +0 -0
- data/public/images/yui-menuitem_checkbox_disabled.png +0 -0
- data/public/images/yui-menuitem_submenuindicator.png +0 -0
- data/public/images/yui-menuitem_submenuindicator_disabled.png +0 -0
- data/public/images/yui-sprite.png +0 -0
- data/public/javascripts/additional-methods.js +0 -236
- data/public/javascripts/admin/orders/edit.js +0 -23
- data/public/javascripts/admin/orders/edit_form.js +0 -16
- data/public/javascripts/admin/unobtrusive_handlers.js +0 -43
- data/public/javascripts/application.js +0 -12
- data/public/javascripts/calculator.js +0 -15
- data/public/javascripts/checkout.js +0 -75
- data/public/javascripts/datepicker.js +0 -1445
- data/public/javascripts/gateway.js +0 -13
- data/public/javascripts/jquery-1.4.2.min.js +0 -154
- data/public/javascripts/jquery-ui.js +0 -188
- data/public/javascripts/jquery.cookie.js +0 -96
- data/public/javascripts/jquery.suggest.js +0 -276
- data/public/javascripts/jquery.template.js +0 -255
- data/public/javascripts/jquery.tokeninput.js +0 -618
- data/public/javascripts/jquery.validate.min.js +0 -16
- data/public/javascripts/lang/af.js +0 -40
- data/public/javascripts/lang/ar.js +0 -50
- data/public/javascripts/lang/de.js +0 -40
- data/public/javascripts/lang/du.js +0 -40
- data/public/javascripts/lang/en.js +0 -42
- data/public/javascripts/lang/es.js +0 -41
- data/public/javascripts/lang/fi.js +0 -40
- data/public/javascripts/lang/fr.js +0 -44
- data/public/javascripts/lang/gr.js +0 -40
- data/public/javascripts/lang/he.js +0 -49
- data/public/javascripts/lang/it.js +0 -13
- data/public/javascripts/lang/nl.js +0 -40
- data/public/javascripts/lang/no.js +0 -40
- data/public/javascripts/lang/pt.js +0 -50
- data/public/javascripts/lang/ro.js +0 -40
- data/public/javascripts/lang/ru.js +0 -40
- data/public/javascripts/lang/sp.js +0 -40
- data/public/javascripts/lang/sv.js +0 -41
- data/public/javascripts/lang/ua.js +0 -40
- data/public/javascripts/localization/messages_cn.js +0 -24
- data/public/javascripts/localization/messages_cs.js +0 -23
- data/public/javascripts/localization/messages_da.js +0 -21
- data/public/javascripts/localization/messages_de.js +0 -21
- data/public/javascripts/localization/messages_fr.js +0 -23
- data/public/javascripts/localization/messages_hu.js +0 -21
- data/public/javascripts/localization/messages_it.js +0 -26
- data/public/javascripts/localization/messages_kk.js +0 -23
- data/public/javascripts/localization/messages_nl.js +0 -23
- data/public/javascripts/localization/messages_no.js +0 -23
- data/public/javascripts/localization/messages_pl.js +0 -23
- data/public/javascripts/localization/messages_ptbr.js +0 -30
- data/public/javascripts/localization/messages_ru.js +0 -23
- data/public/javascripts/localization/messages_se.js +0 -23
- data/public/javascripts/localization/messages_sk.js +0 -21
- data/public/javascripts/localization/messages_tr.js +0 -24
- data/public/javascripts/localization/messages_tw.js +0 -24
- data/public/javascripts/localization/messages_ua.js +0 -24
- data/public/javascripts/nested-attribute.js +0 -26
- data/public/javascripts/open_id.js +0 -15
- data/public/javascripts/product.js +0 -49
- data/public/javascripts/rails.js +0 -127
- data/public/javascripts/taxonomy.js +0 -201
- data/public/javascripts/zone.js +0 -39
- data/public/stylesheets/admin/dashboard.css +0 -143
- data/public/stylesheets/admin/edit_checkouts.css +0 -57
- data/public/stylesheets/admin/reset-fonts-grids-2-6-0.css +0 -7
- data/public/stylesheets/admin/yui-includes.css +0 -14
- data/public/stylesheets/datepicker.css +0 -263
- data/public/stylesheets/jquery.autocomplete.css +0 -48
- data/public/stylesheets/screen.css +0 -916
@@ -2,6 +2,8 @@ class AppConfiguration < Configuration
|
|
2
2
|
|
3
3
|
preference :site_name, :string, :default => 'Spree Demo Site'
|
4
4
|
preference :default_seo_title, :string, :default => ''
|
5
|
+
preference :default_meta_description, :string, :default => 'Spree demo site'
|
6
|
+
preference :default_meta_keywords, :string, :default => 'spree, demo'
|
5
7
|
preference :site_url, :string, :default => 'demo.spreecommerce.com'
|
6
8
|
preference :default_locale, :string, :default => 'en'
|
7
9
|
preference :allow_locale_switching, :boolean, :default => true
|
@@ -13,12 +15,12 @@ class AppConfiguration < Configuration
|
|
13
15
|
preference :show_descendents, :boolean, :default => true
|
14
16
|
preference :show_zero_stock_products, :boolean, :default => true
|
15
17
|
preference :orders_per_page, :integer, :default => 15
|
16
|
-
preference :show_only_complete_orders_by_default, :boolean, :default =>
|
18
|
+
preference :show_only_complete_orders_by_default, :boolean, :default => true
|
17
19
|
preference :admin_products_per_page, :integer, :default => 10
|
18
20
|
preference :admin_pgroup_preview_size, :integer, :default => 10
|
19
21
|
preference :products_per_page, :integer, :default => 10
|
20
|
-
preference :logo, :string, :default => '
|
21
|
-
preference :stylesheets, :string, :default => 'screen' # Comma separate multiple stylesheets, e.g. 'screen,mystyle'
|
22
|
+
preference :logo, :string, :default => 'admin/bg/spree_50.png'
|
23
|
+
preference :stylesheets, :string, :default => 'reset,screen' # Comma separate multiple stylesheets, e.g. 'screen,mystyle'
|
22
24
|
preference :admin_interface_logo, :string, :default => "admin/bg/spree_50.png"
|
23
25
|
preference :allow_ssl_in_production, :boolean, :default => true
|
24
26
|
preference :allow_ssl_in_development_and_test, :boolean, :default => false
|
@@ -27,6 +29,7 @@ class AppConfiguration < Configuration
|
|
27
29
|
preference :alternative_shipping_phone, :boolean, :default => false # Request extra phone for ship addr
|
28
30
|
preference :shipping_instructions, :boolean, :default => false # Request instructions/info for shipping
|
29
31
|
preference :show_price_inc_vat, :boolean, :default => false
|
32
|
+
preference :shipment_inc_vat, :boolean, :default => false
|
30
33
|
preference :auto_capture, :boolean, :default => false # automatically capture the creditcard (as opposed to just authorize and capture later)
|
31
34
|
preference :address_requires_state, :boolean, :default => true # should state/state_name be required
|
32
35
|
preference :checkout_zone, :string, :default => nil # replace with the name of a zone if you would like to limit the countries
|
@@ -35,9 +38,7 @@ class AppConfiguration < Configuration
|
|
35
38
|
preference :use_content_controller, :boolean, :default => true
|
36
39
|
preference :allow_checkout_on_gateway_error, :boolean, :default => false
|
37
40
|
preference :select_taxons_from_tree, :boolean, :default => false # provide opportunity to select taxons from tree instead of search with autocomplete
|
38
|
-
preference :
|
39
|
-
preference :dismissed_spree_alerts, :string, :default => ''
|
40
|
-
preference :last_check_for_spree_alerts, :string, :default => nil
|
41
|
+
preference :max_level_in_taxons_menu, :integer, :default => 1 # maximum nesting level in taxons menu
|
41
42
|
|
42
43
|
validates :name, :presence => true, :uniqueness => true
|
43
44
|
|
@@ -9,55 +9,39 @@ class Calculator::Vat < Calculator
|
|
9
9
|
TaxRate.register_calculator(self)
|
10
10
|
end
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
origin = Country.find(Spree::Config[:default_country_id])
|
15
|
-
calcs = Calculator::Vat.includes(:calculable => :zone).select {
|
16
|
-
|vat| vat.calculable.zone.country_list.include?(origin)
|
17
|
-
}
|
18
|
-
calcs.collect { |calc| calc.calculable }
|
19
|
-
end
|
12
|
+
def self.calculate_tax_on(product_or_variant)
|
13
|
+
product = product_or_variant.try(:product) || product_or_variant
|
20
14
|
|
21
|
-
|
22
|
-
|
23
|
-
# note: there is a bug with associations in rails 2.1 model caching so we're using this hack
|
24
|
-
# (see http://rails.lighthouseapp.com/projects/8994/tickets/785-caching-models-fails-in-development)
|
25
|
-
cache_hack = rates.first.respond_to?(:tax_category_id)
|
26
|
-
|
27
|
-
taxable_totals = {}
|
28
|
-
order.line_items.each do |line_item|
|
29
|
-
next unless tax_category = line_item.variant.product.tax_category
|
30
|
-
next unless rate = rates.find { | vat_rate | vat_rate.tax_category_id == tax_category.id } if cache_hack
|
31
|
-
next unless rate = rates.find { | vat_rate | vat_rate.tax_category == tax_category } unless cache_hack
|
32
|
-
taxable_totals[tax_category] ||= 0
|
33
|
-
taxable_totals[tax_category] += line_item.price * rate.amount * line_item.quantity
|
34
|
-
end
|
15
|
+
(product_or_variant.price * product.effective_tax_rate).round(2, BigDecimal::ROUND_HALF_UP)
|
16
|
+
end
|
35
17
|
|
36
|
-
|
18
|
+
# computes vat for line_items associated with order, and tax rate and
|
19
|
+
# now coupon discounts are taken into account in tax calcs
|
20
|
+
# and tax is added to shipment if :shipment_inc_vat is set
|
21
|
+
# coupons and shipment are applied if this object is the rate for the default category
|
22
|
+
# (also items with no category get this rate applied)
|
23
|
+
def compute(order)
|
24
|
+
rate = self.calculable
|
37
25
|
tax = 0
|
38
|
-
taxable_totals.values.each do |total|
|
39
|
-
tax += total
|
40
|
-
end
|
41
|
-
tax
|
42
|
-
end
|
43
26
|
|
44
|
-
|
45
|
-
|
46
|
-
|
27
|
+
if rate.tax_category.is_default
|
28
|
+
order.adjustments.each do | adjust |
|
29
|
+
next if adjust.originator_type == "TaxRate"
|
30
|
+
next if adjust.originator_type == "ShippingMethod" and not Spree::Config[:shipment_inc_vat]
|
47
31
|
|
48
|
-
|
49
|
-
|
50
|
-
|
32
|
+
tax += (adjust.amount * rate.amount).round(2, BigDecimal::ROUND_HALF_UP)
|
33
|
+
end
|
34
|
+
end
|
51
35
|
|
52
|
-
|
53
|
-
|
36
|
+
order.line_items.each do | line_item|
|
37
|
+
if line_item.product.tax_category #only apply this calculator to products assigned this rates category
|
38
|
+
next unless line_item.product.tax_category == rate.tax_category
|
39
|
+
else
|
40
|
+
next unless rate.tax_category.is_default # and apply to products with no category, if this is the default rate
|
41
|
+
end
|
42
|
+
tax += (line_item.price * rate.amount).round(2, BigDecimal::ROUND_HALF_UP) * line_item.quantity
|
43
|
+
end
|
54
44
|
|
55
|
-
|
56
|
-
def compute(order)
|
57
|
-
rate = self.calculable
|
58
|
-
line_items = order.line_items.select { |i| i.product.tax_category == rate.tax_category }
|
59
|
-
line_items.inject(0) {|sum, line_item|
|
60
|
-
sum += (line_item.price * rate.amount * line_item.quantity)
|
61
|
-
}
|
45
|
+
tax
|
62
46
|
end
|
63
47
|
end
|
data/app/models/creditcard.rb
CHANGED
@@ -2,7 +2,6 @@ class Creditcard < ActiveRecord::Base
|
|
2
2
|
has_many :payments, :as => :source
|
3
3
|
|
4
4
|
before_save :set_last_digits
|
5
|
-
after_validation :set_card_type
|
6
5
|
|
7
6
|
attr_accessor :number, :verification_value
|
8
7
|
|
@@ -23,20 +22,7 @@ class Creditcard < ActiveRecord::Base
|
|
23
22
|
verification_value.to_s.gsub!(/\s/,'') unless number.nil?
|
24
23
|
self.last_digits ||= number.to_s.length <= 4 ? number : number.to_s.slice(-4..-1)
|
25
24
|
end
|
26
|
-
|
27
|
-
# cheap hack to get to the type? method from deep within ActiveMerchant without stomping on
|
28
|
-
# potentially existing methods in CreditCard
|
29
|
-
class CardDetector
|
30
|
-
class << self
|
31
|
-
include ActiveMerchant::Billing::CreditCardMethods::ClassMethods
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
# sets self.cc_type while we still have the card number
|
36
|
-
def set_card_type
|
37
|
-
self.cc_type ||= CardDetector.type?(self.number)
|
38
|
-
end
|
39
|
-
|
25
|
+
|
40
26
|
def name?
|
41
27
|
first_name? && last_name?
|
42
28
|
end
|
@@ -86,7 +72,7 @@ class Creditcard < ActiveRecord::Base
|
|
86
72
|
payment.avs_response = response.avs_result['code']
|
87
73
|
payment.pend
|
88
74
|
else
|
89
|
-
payment.
|
75
|
+
payment.failure
|
90
76
|
gateway_error(response)
|
91
77
|
end
|
92
78
|
rescue ActiveMerchant::ConnectionError
|
@@ -106,7 +92,7 @@ class Creditcard < ActiveRecord::Base
|
|
106
92
|
payment.avs_response = response.avs_result['code']
|
107
93
|
payment.complete
|
108
94
|
else
|
109
|
-
payment.
|
95
|
+
payment.failure
|
110
96
|
gateway_error(response) unless response.success?
|
111
97
|
end
|
112
98
|
rescue ActiveMerchant::ConnectionError
|
@@ -121,10 +107,10 @@ class Creditcard < ActiveRecord::Base
|
|
121
107
|
if payment_gateway.payment_profiles_supported?
|
122
108
|
# Gateways supporting payment profiles will need access to creditcard object because this stores the payment profile information
|
123
109
|
# so supply the authorization itself as well as the creditcard, rather than just the authorization code
|
124
|
-
response = payment_gateway.capture(payment, self, minimal_gateway_options(payment))
|
110
|
+
response = payment_gateway.capture(payment, self, minimal_gateway_options(payment, false))
|
125
111
|
else
|
126
112
|
# Standard ActiveMerchant capture usage
|
127
|
-
response = payment_gateway.capture((payment.amount * 100).round, payment.response_code, minimal_gateway_options(payment))
|
113
|
+
response = payment_gateway.capture((payment.amount * 100).round, payment.response_code, minimal_gateway_options(payment, false))
|
128
114
|
end
|
129
115
|
|
130
116
|
record_log payment, response
|
@@ -133,7 +119,7 @@ class Creditcard < ActiveRecord::Base
|
|
133
119
|
payment.response_code = response.authorization
|
134
120
|
payment.complete
|
135
121
|
else
|
136
|
-
payment.
|
122
|
+
payment.failure
|
137
123
|
gateway_error(response)
|
138
124
|
end
|
139
125
|
rescue ActiveMerchant::ConnectionError
|
@@ -144,7 +130,7 @@ class Creditcard < ActiveRecord::Base
|
|
144
130
|
payment_gateway = payment.payment_method
|
145
131
|
check_environment(payment_gateway)
|
146
132
|
|
147
|
-
response = payment_gateway.void(payment.response_code, minimal_gateway_options(payment))
|
133
|
+
response = payment_gateway.void(payment.response_code, minimal_gateway_options(payment, false))
|
148
134
|
record_log payment, response
|
149
135
|
|
150
136
|
if response.success?
|
@@ -162,11 +148,10 @@ class Creditcard < ActiveRecord::Base
|
|
162
148
|
check_environment(payment_gateway)
|
163
149
|
|
164
150
|
amount = payment.credit_allowed >= payment.order.outstanding_balance.abs ? payment.order.outstanding_balance.abs : payment.credit_allowed.abs
|
165
|
-
|
166
151
|
if payment_gateway.payment_profiles_supported?
|
167
|
-
response = payment_gateway.credit((amount * 100).round, self, payment.response_code, minimal_gateway_options(payment))
|
152
|
+
response = payment_gateway.credit((amount * 100).round, self, payment.response_code, minimal_gateway_options(payment, false))
|
168
153
|
else
|
169
|
-
response = payment_gateway.credit((amount * 100).round, payment.response_code, minimal_gateway_options(payment))
|
154
|
+
response = payment_gateway.credit((amount * 100).round, payment.response_code, minimal_gateway_options(payment, false))
|
170
155
|
end
|
171
156
|
|
172
157
|
record_log payment, response
|
@@ -242,19 +227,23 @@ class Creditcard < ActiveRecord::Base
|
|
242
227
|
# Generates a minimal set of gateway options. There appears to be some issues with passing in
|
243
228
|
# a billing address when authorizing/voiding a previously captured transaction. So omits these
|
244
229
|
# options in this case since they aren't necessary.
|
245
|
-
def minimal_gateway_options(payment)
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
230
|
+
def minimal_gateway_options(payment, totals=true)
|
231
|
+
|
232
|
+
options = {:email => payment.order.email,
|
233
|
+
:customer => payment.order.email,
|
234
|
+
:ip => payment.order.ip_address,
|
235
|
+
:order_id => payment.order.number}
|
236
|
+
if totals
|
237
|
+
options.merge!({ :shipping => payment.order.ship_total * 100,
|
238
|
+
:tax => payment.order.tax_total * 100,
|
239
|
+
:subtotal => payment.order.item_total * 100 })
|
240
|
+
end
|
241
|
+
options
|
253
242
|
end
|
254
243
|
|
255
244
|
def spree_cc_type
|
256
|
-
return "visa" if
|
257
|
-
self.
|
245
|
+
return "visa" if ENV['RAILS_ENV'] == "development"
|
246
|
+
self.class.type?(number)
|
258
247
|
end
|
259
248
|
|
260
249
|
# Saftey check to make sure we're not accidentally performing operations on a live gateway.
|
data/app/models/gateway.rb
CHANGED
@@ -17,6 +17,7 @@ class Gateway < PaymentMethod
|
|
17
17
|
|
18
18
|
def provider
|
19
19
|
gateway_options = options
|
20
|
+
gateway_options.delete :login if gateway_options.has_key?(:login) and gateway_options[:login].nil?
|
20
21
|
ActiveMerchant::Billing::Base.gateway_mode = gateway_options[:server].to_sym
|
21
22
|
@provider ||= provider_class.new(gateway_options)
|
22
23
|
end
|
data/app/models/image.rb
CHANGED
@@ -3,13 +3,18 @@ class Image < Asset
|
|
3
3
|
has_attached_file :attachment,
|
4
4
|
:styles => { :mini => '48x48>', :small => '100x100>', :product => '240x240>', :large => '600x600>' },
|
5
5
|
:default_style => :product,
|
6
|
-
:url => "/
|
7
|
-
:path => ":rails_root/public/
|
6
|
+
:url => "/spree/products/:id/:style/:basename.:extension",
|
7
|
+
:path => ":rails_root/public/spree/products/:id/:style/:basename.:extension"
|
8
8
|
|
9
9
|
# save the w,h of the original image (from which others can be calculated)
|
10
10
|
# we need to look at the write-queue for images which have not been saved yet
|
11
11
|
after_post_process :find_dimensions
|
12
12
|
|
13
|
+
#used by admin products autocomplete
|
14
|
+
def mini_url
|
15
|
+
attachment.url(:mini, false)
|
16
|
+
end
|
17
|
+
|
13
18
|
def find_dimensions
|
14
19
|
temporary = attachment.queued_for_write[:original]
|
15
20
|
filename = temporary.path unless temporary.nil?
|
data/app/models/order.rb
CHANGED
@@ -25,6 +25,7 @@ class Order < ActiveRecord::Base
|
|
25
25
|
|
26
26
|
before_create :create_user
|
27
27
|
before_create :generate_order_number
|
28
|
+
after_create :create_tax_charge!
|
28
29
|
|
29
30
|
# TODO: validate the format of the email as well (but we can't rely on authlogic anymore to help with validation)
|
30
31
|
validates :email, :presence => true, :format => /^([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})$/i, :if => :require_email
|
@@ -69,18 +70,24 @@ class Order < ActiveRecord::Base
|
|
69
70
|
line_items.count > 0
|
70
71
|
end
|
71
72
|
|
73
|
+
# Is this a free order in which case the payment step should be skipped
|
74
|
+
def payment_required?
|
75
|
+
total.to_f > 0.0
|
76
|
+
end
|
77
|
+
|
72
78
|
# Indicates the number of items in the order
|
73
79
|
def item_count
|
74
80
|
line_items.map(&:quantity).sum
|
75
81
|
end
|
76
82
|
|
77
83
|
# order state machine (see http://github.com/pluginaweek/state_machine/tree/master for details)
|
78
|
-
state_machine :initial =>
|
84
|
+
state_machine :initial => :cart, :use_transactions => false do
|
79
85
|
|
80
86
|
event :next do
|
81
87
|
transition :from => 'cart', :to => 'address'
|
82
88
|
transition :from => 'address', :to => 'delivery'
|
83
|
-
transition :from => 'delivery', :to => 'payment'
|
89
|
+
transition :from => 'delivery', :to => 'payment', :if => :payment_required?
|
90
|
+
transition :from => 'delivery', :to => 'complete'
|
84
91
|
transition :from => 'confirm', :to => 'complete'
|
85
92
|
|
86
93
|
# note: some payment methods will not support a confirm step
|
@@ -257,9 +264,18 @@ class Order < ActiveRecord::Base
|
|
257
264
|
|
258
265
|
# Creates a new tax charge if applicable. Uses the highest possible matching rate and destroys any previous
|
259
266
|
# tax charges if they were created by rates that no longer apply.
|
267
|
+
# for the vat case adjutments according to default country are created
|
260
268
|
def create_tax_charge!
|
261
269
|
adjustments.tax.each {|e| e.destroy }
|
262
|
-
TaxRate.match(ship_address)
|
270
|
+
matching_rates = TaxRate.match(ship_address)
|
271
|
+
if matching_rates.empty? and Spree::Config[:show_price_inc_vat]
|
272
|
+
# somebody may be able to make the search shorter here , some unremember bug caused this
|
273
|
+
matching_rates = TaxRate.all.select{|rate| # get all rates that apply to default country
|
274
|
+
rate.zone.country_list.collect{|c| c.id}.include?(Spree::Config[:default_country_id]) }
|
275
|
+
end
|
276
|
+
matching_rates.each do |rate|
|
277
|
+
rate.create_adjustment( "#{I18n.t(:vat)} #{rate.amount*100}%" , self, self, true)
|
278
|
+
end
|
263
279
|
end
|
264
280
|
|
265
281
|
# Creates a new shipment (adjustment is created by shipment model)
|
@@ -283,11 +299,6 @@ class Order < ActiveRecord::Base
|
|
283
299
|
self.outstanding_balance != 0
|
284
300
|
end
|
285
301
|
|
286
|
-
def destroy_inapplicable_adjustments
|
287
|
-
destroyed = adjustments.reject(&:applicable?).map(&:destroy)
|
288
|
-
adjustments.reload if destroyed.any?
|
289
|
-
end
|
290
|
-
|
291
302
|
def name
|
292
303
|
if (address = bill_address || ship_address)
|
293
304
|
"#{address.firstname} #{address.lastname}"
|
@@ -419,10 +430,10 @@ class Order < ActiveRecord::Base
|
|
419
430
|
#
|
420
431
|
# The +payment_state+ value helps with reporting, etc. since it provides a quick and easy way to locate Orders needing attention.
|
421
432
|
def update_payment_state
|
422
|
-
if payment_total < total
|
433
|
+
if round_money(payment_total) < round_money(total)
|
423
434
|
self.payment_state = "balance_due"
|
424
435
|
self.payment_state = "failed" if payments.present? and payments.last.state == "failed"
|
425
|
-
elsif payment_total > total
|
436
|
+
elsif round_money(payment_total) > round_money(total)
|
426
437
|
self.payment_state = "credit_owed"
|
427
438
|
else
|
428
439
|
self.payment_state = "paid"
|
@@ -432,12 +443,16 @@ class Order < ActiveRecord::Base
|
|
432
443
|
self.state_events.create({
|
433
444
|
:previous_state => old_payment_state,
|
434
445
|
:next_state => self.payment_state,
|
435
|
-
:name => "payment"
|
446
|
+
:name => "payment",
|
436
447
|
:user_id => (User.respond_to?(:current) && User.current && User.current.id) || self.user_id
|
437
448
|
})
|
438
449
|
end
|
439
450
|
end
|
440
451
|
|
452
|
+
def round_money(n)
|
453
|
+
(n*100).round / 100.0
|
454
|
+
end
|
455
|
+
|
441
456
|
# Updates the following Order total values:
|
442
457
|
#
|
443
458
|
# +payment_total+ The total value of all finalized Payments (NOTE: non-finalized Payments are excluded)
|
@@ -448,17 +463,15 @@ class Order < ActiveRecord::Base
|
|
448
463
|
# update_adjustments
|
449
464
|
self.payment_total = payments.completed.map(&:amount).sum
|
450
465
|
self.item_total = line_items.map(&:amount).sum
|
451
|
-
self.adjustment_total = adjustments.map(&:amount).sum
|
466
|
+
self.adjustment_total = adjustments.eligible.map(&:amount).sum
|
452
467
|
self.total = item_total + adjustment_total
|
453
468
|
end
|
454
469
|
|
455
470
|
# Updates each of the Order adjustments. This is intended to be called from an Observer so that the Order can
|
456
|
-
# respond to external changes to LineItem, Shipment, other Adjustments, etc.
|
457
|
-
#
|
471
|
+
# respond to external changes to LineItem, Shipment, other Adjustments, etc.
|
472
|
+
# Adjustments will check if they are still eligible. Ineligible adjustments are preserved but not counted
|
473
|
+
# towards adjustment_total.
|
458
474
|
def update_adjustments
|
459
|
-
# separate into adjustments to keep and adjustements to toss
|
460
|
-
obsolete_adjustments = adjustments.select{|adjustment| !adjustment.applicable?}
|
461
|
-
obsolete_adjustments.each(&:destroy)
|
462
475
|
self.adjustments.reload.each(&:update!)
|
463
476
|
end
|
464
477
|
|
data/app/models/payment.rb
CHANGED
@@ -26,7 +26,7 @@ class Payment < ActiveRecord::Base
|
|
26
26
|
transition :from => ['checkout', 'pending', 'completed'], :to => 'processing'
|
27
27
|
end
|
28
28
|
# When processing during checkout fails
|
29
|
-
event :
|
29
|
+
event :failure do
|
30
30
|
transition :from => 'processing', :to => 'failed'
|
31
31
|
end
|
32
32
|
# With card payments this represents authorizing the payment
|
@@ -62,22 +62,16 @@ class Payment < ActiveRecord::Base
|
|
62
62
|
end
|
63
63
|
|
64
64
|
# With nested attributes, Rails calls build_[association_name] for the nested model which won't work for a polymorphic association
|
65
|
-
def build_source(params)
|
65
|
+
def build_source(params, opts)
|
66
66
|
if payment_method and payment_method.payment_source_class
|
67
67
|
self.source = payment_method.payment_source_class.new(params)
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
71
71
|
def process!
|
72
|
-
if
|
73
|
-
|
74
|
-
|
75
|
-
started_processing!
|
76
|
-
source.process!(self) # source is responsible for updating the payment state when it's done processing
|
77
|
-
end
|
78
|
-
else
|
79
|
-
raise Spree::GatewayError.new(I18n.t(:payment_processing_failed))
|
80
|
-
end
|
72
|
+
if !processing? and source and source.respond_to?(:process!)
|
73
|
+
started_processing!
|
74
|
+
source.process!(self) # source is responsible for updating the payment state when it's done processing
|
81
75
|
end
|
82
76
|
end
|
83
77
|
|