kylekthompson-shoppe 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +55 -0
- data/Rakefile +36 -0
- data/app/assets/images/shoppe/chosen-sprite.png +0 -0
- data/app/assets/images/shoppe/chosen-sprite@2x.png +0 -0
- data/app/assets/images/shoppe/document.svg +1 -0
- data/app/assets/images/shoppe/icons/bag.svg +1 -0
- data/app/assets/images/shoppe/icons/balance.svg +1 -0
- data/app/assets/images/shoppe/icons/box.svg +1 -0
- data/app/assets/images/shoppe/icons/building.svg +1 -0
- data/app/assets/images/shoppe/icons/chart.svg +1 -0
- data/app/assets/images/shoppe/icons/chat.svg +1 -0
- data/app/assets/images/shoppe/icons/checkbox.svg +1 -0
- data/app/assets/images/shoppe/icons/checkbox2.svg +1 -0
- data/app/assets/images/shoppe/icons/cloud.svg +1 -0
- data/app/assets/images/shoppe/icons/cone.svg +1 -0
- data/app/assets/images/shoppe/icons/credit_card.svg +1 -0
- data/app/assets/images/shoppe/icons/currency.svg +1 -0
- data/app/assets/images/shoppe/icons/edit.svg +14 -0
- data/app/assets/images/shoppe/icons/flowchart.svg +1 -0
- data/app/assets/images/shoppe/icons/gift.svg +1 -0
- data/app/assets/images/shoppe/icons/globe.svg +1 -0
- data/app/assets/images/shoppe/icons/id.svg +1 -0
- data/app/assets/images/shoppe/icons/id2.svg +1 -0
- data/app/assets/images/shoppe/icons/locked.svg +1 -0
- data/app/assets/images/shoppe/icons/report.svg +1 -0
- data/app/assets/images/shoppe/icons/search.svg +1 -0
- data/app/assets/images/shoppe/icons/support.svg +1 -0
- data/app/assets/images/shoppe/icons/tags.svg +1 -0
- data/app/assets/images/shoppe/icons/toolbox.svg +1 -0
- data/app/assets/images/shoppe/icons/unlocked.svg +1 -0
- data/app/assets/images/shoppe/icons/wallet.svg +1 -0
- data/app/assets/images/shoppe/logo.svg +47 -0
- data/app/assets/images/shoppe/move.svg +1 -0
- data/app/assets/images/shoppe/shoppe.svg +25 -0
- data/app/assets/images/shoppe/square.svg +9 -0
- data/app/assets/images/shoppe/statuses/accepted.svg +14 -0
- data/app/assets/images/shoppe/statuses/paid.svg +16 -0
- data/app/assets/images/shoppe/statuses/received.svg +15 -0
- data/app/assets/images/shoppe/statuses/rejected.svg +14 -0
- data/app/assets/images/shoppe/statuses/shipped.svg +14 -0
- data/app/assets/images/shoppe/table-tear-off.png +0 -0
- data/app/assets/javascripts/shoppe/application.coffee +123 -0
- data/app/assets/javascripts/shoppe/chosen.jquery.js +1166 -0
- data/app/assets/javascripts/shoppe/jquery_ui.js +6 -0
- data/app/assets/javascripts/shoppe/mousetrap.js +9 -0
- data/app/assets/javascripts/shoppe/order_form.coffee +47 -0
- data/app/assets/stylesheets/shoppe/application.scss +601 -0
- data/app/assets/stylesheets/shoppe/chosen.scss +424 -0
- data/app/assets/stylesheets/shoppe/dialog.scss +25 -0
- data/app/assets/stylesheets/shoppe/elements.scss +79 -0
- data/app/assets/stylesheets/shoppe/printable.scss +67 -0
- data/app/assets/stylesheets/shoppe/reset.scss +93 -0
- data/app/assets/stylesheets/shoppe/sub.scss +106 -0
- data/app/assets/stylesheets/shoppe/variables.scss +1 -0
- data/app/controllers/shoppe/addresses_controller.rb +47 -0
- data/app/controllers/shoppe/application_controller.rb +46 -0
- data/app/controllers/shoppe/attachments_controller.rb +14 -0
- data/app/controllers/shoppe/countries_controller.rb +47 -0
- data/app/controllers/shoppe/customers_controller.rb +55 -0
- data/app/controllers/shoppe/dashboard_controller.rb +9 -0
- data/app/controllers/shoppe/delivery_service_prices_controller.rb +45 -0
- data/app/controllers/shoppe/delivery_services_controller.rb +47 -0
- data/app/controllers/shoppe/orders_controller.rb +119 -0
- data/app/controllers/shoppe/payments_controller.rb +33 -0
- data/app/controllers/shoppe/product_categories_controller.rb +47 -0
- data/app/controllers/shoppe/product_category_localisations_controller.rb +58 -0
- data/app/controllers/shoppe/product_localisations_controller.rb +58 -0
- data/app/controllers/shoppe/products_controller.rb +58 -0
- data/app/controllers/shoppe/sessions_controller.rb +34 -0
- data/app/controllers/shoppe/settings_controller.rb +16 -0
- data/app/controllers/shoppe/stock_level_adjustments_controller.rb +40 -0
- data/app/controllers/shoppe/tax_rates_controller.rb +49 -0
- data/app/controllers/shoppe/users_controller.rb +53 -0
- data/app/controllers/shoppe/variants_controller.rb +50 -0
- data/app/helpers/shoppe/application_helper.rb +60 -0
- data/app/helpers/shoppe/product_category_helper.rb +36 -0
- data/app/mailers/shoppe/order_mailer.rb +25 -0
- data/app/mailers/shoppe/user_mailer.rb +10 -0
- data/app/models/shoppe/address.rb +44 -0
- data/app/models/shoppe/country.rb +27 -0
- data/app/models/shoppe/customer.rb +41 -0
- data/app/models/shoppe/delivery_service.rb +33 -0
- data/app/models/shoppe/delivery_service_price.rb +31 -0
- data/app/models/shoppe/order.rb +100 -0
- data/app/models/shoppe/order/actions.rb +94 -0
- data/app/models/shoppe/order/billing.rb +105 -0
- data/app/models/shoppe/order/delivery.rb +229 -0
- data/app/models/shoppe/order/states.rb +69 -0
- data/app/models/shoppe/order_item.rb +239 -0
- data/app/models/shoppe/payment.rb +86 -0
- data/app/models/shoppe/product.rb +189 -0
- data/app/models/shoppe/product/product_attributes.rb +20 -0
- data/app/models/shoppe/product/variants.rb +51 -0
- data/app/models/shoppe/product_attribute.rb +66 -0
- data/app/models/shoppe/product_categorization.rb +14 -0
- data/app/models/shoppe/product_category.rb +75 -0
- data/app/models/shoppe/setting.rb +68 -0
- data/app/models/shoppe/stock_level_adjustment.rb +19 -0
- data/app/models/shoppe/tax_rate.rb +46 -0
- data/app/models/shoppe/user.rb +49 -0
- data/app/validators/permalink_validator.rb +7 -0
- data/app/views/layouts/shoppe/application.html.haml +34 -0
- data/app/views/layouts/shoppe/printable.html.haml +11 -0
- data/app/views/layouts/shoppe/sub.html.haml +10 -0
- data/app/views/shoppe/addresses/_form.html.haml +33 -0
- data/app/views/shoppe/addresses/edit.html.haml +5 -0
- data/app/views/shoppe/addresses/new.html.haml +5 -0
- data/app/views/shoppe/countries/_form.html.haml +35 -0
- data/app/views/shoppe/countries/edit.html.haml +6 -0
- data/app/views/shoppe/countries/index.html.haml +25 -0
- data/app/views/shoppe/countries/new.html.haml +7 -0
- data/app/views/shoppe/customers/_addresses.html.haml +20 -0
- data/app/views/shoppe/customers/_form.html.haml +30 -0
- data/app/views/shoppe/customers/_search_form.html.haml +13 -0
- data/app/views/shoppe/customers/edit.html.haml +5 -0
- data/app/views/shoppe/customers/index.html.haml +32 -0
- data/app/views/shoppe/customers/new.html.haml +5 -0
- data/app/views/shoppe/customers/show.html.haml +53 -0
- data/app/views/shoppe/delivery_service_prices/_form.html.haml +44 -0
- data/app/views/shoppe/delivery_service_prices/edit.html.haml +6 -0
- data/app/views/shoppe/delivery_service_prices/index.html.haml +23 -0
- data/app/views/shoppe/delivery_service_prices/new.html.haml +6 -0
- data/app/views/shoppe/delivery_services/_form.html.haml +38 -0
- data/app/views/shoppe/delivery_services/edit.html.haml +9 -0
- data/app/views/shoppe/delivery_services/index.html.haml +27 -0
- data/app/views/shoppe/delivery_services/new.html.haml +6 -0
- data/app/views/shoppe/order_mailer/accepted.text.erb +12 -0
- data/app/views/shoppe/order_mailer/received.text.erb +9 -0
- data/app/views/shoppe/order_mailer/rejected.text.erb +10 -0
- data/app/views/shoppe/order_mailer/shipped.text.erb +16 -0
- data/app/views/shoppe/orders/_form.html.haml +58 -0
- data/app/views/shoppe/orders/_order_details.html.haml +57 -0
- data/app/views/shoppe/orders/_order_items.html.haml +38 -0
- data/app/views/shoppe/orders/_order_items_form.html.haml +61 -0
- data/app/views/shoppe/orders/_payments_form.html.haml +15 -0
- data/app/views/shoppe/orders/_payments_table.html.haml +37 -0
- data/app/views/shoppe/orders/_search_form.html.haml +24 -0
- data/app/views/shoppe/orders/_status_bar.html.haml +35 -0
- data/app/views/shoppe/orders/despatch_note.html.haml +45 -0
- data/app/views/shoppe/orders/edit.html.haml +21 -0
- data/app/views/shoppe/orders/index.html.haml +39 -0
- data/app/views/shoppe/orders/new.html.haml +14 -0
- data/app/views/shoppe/orders/show.html.haml +25 -0
- data/app/views/shoppe/payments/refund.html.haml +13 -0
- data/app/views/shoppe/product_categories/_form.html.haml +50 -0
- data/app/views/shoppe/product_categories/edit.html.haml +8 -0
- data/app/views/shoppe/product_categories/index.html.haml +27 -0
- data/app/views/shoppe/product_categories/new.html.haml +6 -0
- data/app/views/shoppe/product_category_localisations/form.html.haml +29 -0
- data/app/views/shoppe/product_category_localisations/index.html.haml +26 -0
- data/app/views/shoppe/product_localisations/form.html.haml +32 -0
- data/app/views/shoppe/product_localisations/index.html.haml +26 -0
- data/app/views/shoppe/products/_form.html.haml +118 -0
- data/app/views/shoppe/products/_table.html.haml +42 -0
- data/app/views/shoppe/products/edit.html.haml +9 -0
- data/app/views/shoppe/products/import.html.haml +67 -0
- data/app/views/shoppe/products/index.html.haml +9 -0
- data/app/views/shoppe/products/new.html.haml +7 -0
- data/app/views/shoppe/sessions/new.html.haml +12 -0
- data/app/views/shoppe/sessions/reset.html.haml +12 -0
- data/app/views/shoppe/settings/edit.html.haml +19 -0
- data/app/views/shoppe/shared/error.html.haml +6 -0
- data/app/views/shoppe/stock_level_adjustments/index.html.haml +40 -0
- data/app/views/shoppe/tax_rates/form.html.haml +28 -0
- data/app/views/shoppe/tax_rates/index.html.haml +17 -0
- data/app/views/shoppe/user_mailer/new_password.text.erb +9 -0
- data/app/views/shoppe/users/_form.html.haml +27 -0
- data/app/views/shoppe/users/edit.html.haml +5 -0
- data/app/views/shoppe/users/index.html.haml +17 -0
- data/app/views/shoppe/users/new.html.haml +7 -0
- data/app/views/shoppe/variants/form.html.haml +68 -0
- data/app/views/shoppe/variants/index.html.haml +33 -0
- data/config/locales/de.yml +653 -0
- data/config/locales/en.yml +744 -0
- data/config/locales/es.yml +653 -0
- data/config/locales/pl.yml +662 -0
- data/config/locales/pt-BR.yml +655 -0
- data/config/routes.rb +53 -0
- data/db/countries.txt +252 -0
- data/db/migrate/20130926094549_create_shoppe_initial_schema.rb +175 -0
- data/db/migrate/20131024201501_add_address_type_to_shoppe_tax_rates.rb +5 -0
- data/db/migrate/20131024204815_create_shoppe_payments.rb +32 -0
- data/db/migrate/20131102143930_remove_default_on_order_item_weight.rb +9 -0
- data/db/migrate/20141013192427_create_shoppe_customers.rb +14 -0
- data/db/migrate/20141026175622_add_indexes_to_shoppe_order_items.rb +6 -0
- data/db/migrate/20141026175943_add_indexes_to_shoppe_orders.rb +7 -0
- data/db/migrate/20141026180333_add_indexes_to_shoppe_payments.rb +6 -0
- data/db/migrate/20141026180835_add_indexes_to_shoppe_product_attributes.rb +7 -0
- data/db/migrate/20141026180952_add_indexes_to_shoppe_product_categories.rb +5 -0
- data/db/migrate/20141026181040_add_indexes_to_shoppe_products.rb +8 -0
- data/db/migrate/20141026181312_add_indexes_to_shoppe_settings.rb +5 -0
- data/db/migrate/20141026181354_add_indexes_to_shoppe_stock_level_adjustments.rb +6 -0
- data/db/migrate/20141026181559_add_indexes_to_shoppe_users.rb +5 -0
- data/db/migrate/20141026181716_add_indexes_to_shoppe_delivery_services.rb +9 -0
- data/db/migrate/20141026181717_allow_multiple_shoppe_products_per_shoppe_product_category.rb +46 -0
- data/db/migrate/20141026181718_add_nested_to_product_categories.rb +30 -0
- data/db/migrate/20141027215005_create_shoppe_addresses.rb +17 -0
- data/db/migrate/20150315215633_add_customer_to_shoppe_orders.rb +5 -0
- data/db/migrate/20150513171350_create_shoppe_product_category_translation_table.rb +17 -0
- data/db/migrate/20150519173350_create_shoppe_product_translation_table.rb +18 -0
- data/db/schema.rb +308 -0
- data/db/seeds.rb +137 -0
- data/db/seeds_data/poe400.jpg +0 -0
- data/db/seeds_data/snom-870-blk.jpg +0 -0
- data/db/seeds_data/snom-870-grey.jpg +0 -0
- data/db/seeds_data/snom-mm2.jpg +0 -0
- data/db/seeds_data/spa303.jpg +0 -0
- data/db/seeds_data/t18p.jpg +0 -0
- data/db/seeds_data/t20p.jpg +0 -0
- data/db/seeds_data/t22p.jpg +0 -0
- data/db/seeds_data/t26p.jpg +0 -0
- data/db/seeds_data/t41pn.jpg +0 -0
- data/db/seeds_data/t46gn.jpg +0 -0
- data/db/seeds_data/w52p.jpg +0 -0
- data/db/seeds_data/yhs32.jpg +0 -0
- data/lib/shoppe.rb +60 -0
- data/lib/shoppe/associated_countries.rb +20 -0
- data/lib/shoppe/country_importer.rb +15 -0
- data/lib/shoppe/default_navigation.rb +21 -0
- data/lib/shoppe/engine.rb +55 -0
- data/lib/shoppe/error.rb +21 -0
- data/lib/shoppe/errors/inappropriate_delivery_service.rb +6 -0
- data/lib/shoppe/errors/insufficient_stock_to_fulfil.rb +15 -0
- data/lib/shoppe/errors/invalid_configuration.rb +6 -0
- data/lib/shoppe/errors/not_enough_stock.rb +15 -0
- data/lib/shoppe/errors/payment_declined.rb +6 -0
- data/lib/shoppe/errors/refund_failed.rb +6 -0
- data/lib/shoppe/errors/unorderable_item.rb +6 -0
- data/lib/shoppe/navigation_manager.rb +81 -0
- data/lib/shoppe/orderable_item.rb +39 -0
- data/lib/shoppe/settings.rb +26 -0
- data/lib/shoppe/settings_loader.rb +16 -0
- data/lib/shoppe/setup_generator.rb +10 -0
- data/lib/shoppe/version.rb +3 -0
- data/lib/shoppe/view_helpers.rb +16 -0
- data/lib/tasks/shoppe.rake +29 -0
- metadata +662 -0
@@ -0,0 +1,9 @@
|
|
1
|
+
- @page_title = t('shoppe.delivery_services.delivery_services')
|
2
|
+
|
3
|
+
= content_for :header do
|
4
|
+
%p.buttons
|
5
|
+
= link_to t('shoppe.delivery_services.prices'), [@delivery_service, :delivery_service_prices], :class => 'button'
|
6
|
+
= link_to t('shoppe.delivery_services.back'), :delivery_services, :class => 'button'
|
7
|
+
%h2.delivery_services= t('shoppe.delivery_services.delivery_services')
|
8
|
+
|
9
|
+
= render 'form'
|
@@ -0,0 +1,27 @@
|
|
1
|
+
- @page_title = t('shoppe.delivery_services.delivery_services')
|
2
|
+
|
3
|
+
= content_for :header do
|
4
|
+
%p.buttons= link_to t('shoppe.delivery_services.new'), :new_delivery_service, :class => 'button green'
|
5
|
+
%h2.delivery_services= t('shoppe.delivery_services.delivery_services')
|
6
|
+
|
7
|
+
.table
|
8
|
+
%table.data
|
9
|
+
%thead
|
10
|
+
%tr
|
11
|
+
%th= t('shoppe.delivery_services.name')
|
12
|
+
%th= t('shoppe.delivery_services.prices')
|
13
|
+
%th= t('shoppe.delivery_services.courier')
|
14
|
+
%th= t('shoppe.delivery_services.active?')
|
15
|
+
%th= t('shoppe.delivery_services.default?')
|
16
|
+
%tbody
|
17
|
+
- if @delivery_services.empty?
|
18
|
+
%tr.empty
|
19
|
+
%td{:colspan => 5}= t('shoppe.delivery_services.no_services')
|
20
|
+
- else
|
21
|
+
- for delivery_service in @delivery_services
|
22
|
+
%tr
|
23
|
+
%td= link_to delivery_service.name, [:edit, delivery_service]
|
24
|
+
%td= link_to t('shoppe.delivery_services.set_prices'), [delivery_service, :delivery_service_prices]
|
25
|
+
%td= delivery_service.courier
|
26
|
+
%td= boolean_tag delivery_service.active?
|
27
|
+
%td= boolean_tag delivery_service.default?
|
@@ -0,0 +1,6 @@
|
|
1
|
+
- @page_title = t('shoppe.delivery_services.delivery_services')
|
2
|
+
|
3
|
+
= content_for :header do
|
4
|
+
%p.buttons= link_to t('shoppe.delivery_services.back'), :delivery_services, :class => 'button'
|
5
|
+
%h2.delivery_services= t('shoppe.delivery_services.delivery_services')
|
6
|
+
= render 'form'
|
@@ -0,0 +1,12 @@
|
|
1
|
+
Hello <%=@order.first_name%>!
|
2
|
+
|
3
|
+
Re: Order #<%=@order.number%>
|
4
|
+
|
5
|
+
We're pleased to let you know that we have accepted your order and your payment of <%=number_to_currency @order.total%> has been taken from your card successfully.
|
6
|
+
|
7
|
+
We will e-mail you again when we ship your order from our warehouse.
|
8
|
+
|
9
|
+
Many thanks,
|
10
|
+
|
11
|
+
<%=Shoppe.settings.store_name%>
|
12
|
+
<%=Shoppe.settings.email_address%>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
Hello <%=@order.first_name%>!
|
2
|
+
|
3
|
+
Re: Order #<%=@order.number%>
|
4
|
+
|
5
|
+
Unfortunately, this attached order was rejected. This is most likely due to our over-zealous fraud system so if you wish to continue with this order, please drop us an email or give us a call.
|
6
|
+
|
7
|
+
Many thanks,
|
8
|
+
|
9
|
+
<%=Shoppe.settings.store_name%>
|
10
|
+
<%=Shoppe.settings.email_address%>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
Hello <%=@order.first_name%>!
|
2
|
+
|
3
|
+
Re: Order #<%=@order.number%>
|
4
|
+
|
5
|
+
We're pleased to let you know your order has been shipped and
|
6
|
+
will be with you shortly!
|
7
|
+
|
8
|
+
<% if @order.delivery_service && @order.courier_tracking_url -%>
|
9
|
+
You can the delivery online at:
|
10
|
+
<%=@order.courier_tracking_url%>
|
11
|
+
<% end -%>
|
12
|
+
|
13
|
+
Many thanks,
|
14
|
+
|
15
|
+
<%=Shoppe.settings.store_name%>
|
16
|
+
<%=Shoppe.settings.email_address%>
|
@@ -0,0 +1,58 @@
|
|
1
|
+
= field_set_tag t('shoppe.orders.billing_address') do
|
2
|
+
%dl
|
3
|
+
%dt= f.label :customer_id, t('shoppe.orders.customer')
|
4
|
+
%dd= f.collection_select :customer_id, Shoppe::Customer.ordered, :id, :name, {:include_blank => true}, {:data => {:placeholder => t('shoppe.orders.select_customer')}}
|
5
|
+
.splitContainer
|
6
|
+
%dl.third
|
7
|
+
%dt= f.label :first_name, t('shoppe.orders.first_name')
|
8
|
+
%dd= f.text_field :first_name, :class => 'focus text'
|
9
|
+
%dl.third
|
10
|
+
%dt= f.label :last_name, t('shoppe.orders.last_name')
|
11
|
+
%dd= f.text_field :last_name, :class => 'text'
|
12
|
+
%dl.third
|
13
|
+
%dt= f.label :company, t('shoppe.orders.company')
|
14
|
+
%dd= f.text_field :company, :class => 'text'
|
15
|
+
%dl
|
16
|
+
%dt= f.label :billing_address1, t('shoppe.orders.address')
|
17
|
+
%dd.space= f.text_field :billing_address1, :class => 'text'
|
18
|
+
%dd.space= f.text_field :billing_address2, :class => 'text'
|
19
|
+
%dd.space= f.text_field :billing_address3, :class => 'text'
|
20
|
+
%dd.space= f.text_field :billing_address4, :class => 'text'
|
21
|
+
.splitContainer
|
22
|
+
%dl.half
|
23
|
+
%dt= f.label :billing_postcode, t('shoppe.orders.post_code')
|
24
|
+
%dd= f.text_field :billing_postcode, :class => 'text'
|
25
|
+
%dl.half
|
26
|
+
%dt= f.label :billing_country_id, t('shoppe.orders.country')
|
27
|
+
%dd= f.collection_select :billing_country_id, Shoppe::Country.ordered, :id, :name, {:include_blank => true}, {:data => {:placeholder => t('shoppe.orders.select_country')}}
|
28
|
+
|
29
|
+
.splitContainer
|
30
|
+
%dl.third
|
31
|
+
%dt= f.label :email_address, t('shoppe.orders.email_address')
|
32
|
+
%dd= f.text_field :email_address, :class => 'text'
|
33
|
+
%dl.third
|
34
|
+
%dt= f.label :phone_number, t('shoppe.orders.phone_number')
|
35
|
+
%dd= f.text_field :phone_number, :class => 'text'
|
36
|
+
%dl.third
|
37
|
+
%dt= f.label :separate_delivery_address, t('shoppe.orders.separate_delivery_address')
|
38
|
+
%dd.checkbox
|
39
|
+
= f.check_box :separate_delivery_address
|
40
|
+
= f.label :separate_delivery_address, t('shoppe.orders.use_separate_delivery_address?')
|
41
|
+
|
42
|
+
= field_set_tag t('shoppe.orders.delivery_address'), :class => 'delivery' do
|
43
|
+
%dl
|
44
|
+
%dt= f.label :delivery_name, t('shoppe.orders.delivery_name')
|
45
|
+
%dd= f.text_field :delivery_name, :class => 'text'
|
46
|
+
%dl
|
47
|
+
%dt= f.label :delivery_address1, t('shoppe.orders.address')
|
48
|
+
%dd.space= f.text_field :delivery_address1, :class => 'text'
|
49
|
+
%dd.space= f.text_field :delivery_address2, :class => 'text'
|
50
|
+
%dd.space= f.text_field :delivery_address3, :class => 'text'
|
51
|
+
%dd.space= f.text_field :delivery_address4, :class => 'text'
|
52
|
+
.splitContainer
|
53
|
+
%dl.half
|
54
|
+
%dt= f.label :delivery_postcode, t('shoppe.orders.post_code')
|
55
|
+
%dd= f.text_field :delivery_postcode, :class => 'text'
|
56
|
+
%dl.half
|
57
|
+
%dt= f.label :delivery_country_id, t('shoppe.orders.country')
|
58
|
+
%dd= f.collection_select :delivery_country_id, Shoppe::Country.ordered, :id, :name, {:include_blank => true}, {:data => {:placeholder => t('shoppe.orders.select_country')}}
|
@@ -0,0 +1,57 @@
|
|
1
|
+
.details
|
2
|
+
.left
|
3
|
+
%dl
|
4
|
+
%dt= t('shoppe.orders.name')
|
5
|
+
%dd= @order.full_name
|
6
|
+
%dt= t('shoppe.orders.company')
|
7
|
+
%dd= @order.company.blank? ? '-' : @order.company
|
8
|
+
%dt
|
9
|
+
- if @order.separate_delivery_address?
|
10
|
+
= t('shoppe.orders.billing_address')
|
11
|
+
- else
|
12
|
+
= t('shoppe.orders.billing_delivery_address')
|
13
|
+
|
14
|
+
%dd= @order.billing_address1
|
15
|
+
%dd= @order.billing_address2
|
16
|
+
%dd= @order.billing_address3
|
17
|
+
%dd= @order.billing_address4
|
18
|
+
%dd= @order.billing_postcode
|
19
|
+
%dd= @order.billing_country.try(:name)
|
20
|
+
- if @order.separate_delivery_address?
|
21
|
+
%dt= t('shoppe.orders.delivery_address')
|
22
|
+
%dd= @order.delivery_name
|
23
|
+
%dd= @order.delivery_address1
|
24
|
+
%dd= @order.delivery_address2
|
25
|
+
%dd= @order.delivery_address3
|
26
|
+
%dd= @order.delivery_address4
|
27
|
+
%dd= @order.delivery_postcode
|
28
|
+
%dd= @order.delivery_country.try(:name)
|
29
|
+
.right
|
30
|
+
%dl
|
31
|
+
%dt= t('shoppe.orders.email_address')
|
32
|
+
%dd= mail_to @order.email_address
|
33
|
+
%dt= t('shoppe.orders.telephone')
|
34
|
+
%dd= @order.phone_number
|
35
|
+
%dt= t('shoppe.orders.weight')
|
36
|
+
%dd= number_to_weight @order.total_weight
|
37
|
+
- if @order.received?
|
38
|
+
%dt= t('shoppe.orders.build_time')
|
39
|
+
%dd= distance_of_time_in_words(@order.created_at, @order.received_at)
|
40
|
+
- if @order.invoiced?
|
41
|
+
%dt= t('shoppe.orders.invoice_number')
|
42
|
+
%dd= @order.invoice_number
|
43
|
+
%dt= t('shoppe.orders.order_balance')
|
44
|
+
%dd= boolean_tag @order.paid_in_full?, nil, :true_text => number_to_currency(@order.balance), :false_text => number_to_currency(@order.balance)
|
45
|
+
- if @order.accepted? && !@order.shipped?
|
46
|
+
= form_tag [:ship, @order] do
|
47
|
+
%dl.form
|
48
|
+
%dt.padding= label_tag 'consignment_number', t('shoppe.orders.consignment_number')
|
49
|
+
%dd= text_field_tag 'consignment_number', '', :class => 'text'
|
50
|
+
%dl.form
|
51
|
+
%dd= submit_tag t('shoppe.orders.mark_as_shipped') , :class => 'button green button-mini'
|
52
|
+
|
53
|
+
- unless @order.accepted? || @order.rejected?
|
54
|
+
%dl.form
|
55
|
+
%dd
|
56
|
+
= link_to t('shoppe.orders.accept'), [:accept, @order], :method => :post, :class => 'button green'
|
57
|
+
= link_to t('shoppe.orders.reject'), [:reject, @order], :method => :post, :class => 'button purple'
|
@@ -0,0 +1,38 @@
|
|
1
|
+
.order_items
|
2
|
+
.table
|
3
|
+
%table.data
|
4
|
+
%thead
|
5
|
+
%tr
|
6
|
+
%th.qty= t('shoppe.orders.qty')
|
7
|
+
%th= t('shoppe.orders.item')
|
8
|
+
%th= t('shoppe.orders.sku')
|
9
|
+
%th.money= t('shoppe.orders.cost')
|
10
|
+
%th.money= t('shoppe.orders.price')
|
11
|
+
%th.money= Shoppe.settings.tax_name
|
12
|
+
%th.money= t('shoppe.orders.sub_total')
|
13
|
+
%tbody
|
14
|
+
- for item in @order.order_items
|
15
|
+
%tr
|
16
|
+
%td.qty= item.quantity
|
17
|
+
%td.product= item.ordered_item.full_name
|
18
|
+
%td.sku= item.ordered_item.sku
|
19
|
+
%td.money= number_to_currency item.total_cost
|
20
|
+
%td.money= number_to_currency item.sub_total
|
21
|
+
%td.money= number_to_currency item.tax_amount
|
22
|
+
%td.money= number_to_currency item.total
|
23
|
+
- if @order.delivery_service
|
24
|
+
%td.qty
|
25
|
+
%td.product= link_to @order.delivery_service.name, [:edit, @order.delivery_service]
|
26
|
+
%td.sku
|
27
|
+
%td.money= number_to_currency @order.delivery_cost_price
|
28
|
+
%td.money= number_to_currency @order.delivery_price
|
29
|
+
%td.money= number_to_currency @order.delivery_tax_amount
|
30
|
+
%td.money= number_to_currency @order.delivery_price + @order.delivery_tax_amount
|
31
|
+
%tfoot
|
32
|
+
%tr
|
33
|
+
%td.qty= @order.total_items
|
34
|
+
%td{:colspan => 2}
|
35
|
+
%td.money= number_to_currency @order.total_cost
|
36
|
+
%td.money= number_to_currency @order.total_before_tax
|
37
|
+
%td.money= number_to_currency @order.tax
|
38
|
+
%td.money= number_to_currency @order.total
|
@@ -0,0 +1,61 @@
|
|
1
|
+
%table.data.orderItems
|
2
|
+
%thead
|
3
|
+
%tr
|
4
|
+
%th.product= t('shoppe.orders.product')
|
5
|
+
%th.qty= t('shoppe.orders.quantity')
|
6
|
+
%th.stock= t('shoppe.orders.stock')
|
7
|
+
%th.price= t('shoppe.orders.unit_price')
|
8
|
+
%th.tax= t('shoppe.orders.tax')
|
9
|
+
%th.total= t('shoppe.orders.sub_total')
|
10
|
+
%th.weight= t('shoppe.orders.weight')
|
11
|
+
%tbody
|
12
|
+
- products = Shoppe::Product.ordered
|
13
|
+
= f.fields_for :order_items do |of|
|
14
|
+
= of.hidden_field :ordered_item_type
|
15
|
+
%tr.item{:class => of.object.ordered_item ? 'existing' : 'new'}
|
16
|
+
%td.product{:colspan => of.object.ordered_item ? nil : 7}= of.collection_select :ordered_item_id, products, :id, :full_name, {:include_blank => true}, {:data => {:placeholder => t('shoppe.orders.add_item')}}
|
17
|
+
- if of.object.ordered_item
|
18
|
+
%td.qty= of.text_field :quantity, :class => 'text'
|
19
|
+
%td.stock{:class => @order.new_record? && !of.object.in_stock? ? 'oos' : ''}= of.object.ordered_item.stock
|
20
|
+
%td.money-input
|
21
|
+
.moneyInput
|
22
|
+
= of.text_field :unit_price, :placeholder => number_to_currency(of.object.unit_price, :unit => ''), :class =>'text short'
|
23
|
+
%td.money-input
|
24
|
+
.moneyInput
|
25
|
+
= of.text_field :tax_amount, :placeholder => number_to_currency(of.object.tax_amount, :unit => ''), :class =>'text short'
|
26
|
+
%td
|
27
|
+
.moneyInput
|
28
|
+
= text_field_tag '_', number_to_currency(of.object.total, :unit => ''), :disabled => true, :class => 'text short'
|
29
|
+
%td= of.text_field :weight, :placeholder => of.object.weight, :class =>'text short'
|
30
|
+
- if @order.available_delivery_services.empty?
|
31
|
+
%tr.delivery
|
32
|
+
- if @order.delivery_required?
|
33
|
+
%td.none{:colspan => 7}= t('shoppe.orders.missing_delivery_service')
|
34
|
+
- else
|
35
|
+
%td.none-needed{:colspan => 7 }= t('shoppe.orders.no_delivery_required')
|
36
|
+
- else
|
37
|
+
%tr.delivery
|
38
|
+
%td.product= f.collection_select :delivery_service_id, @order.available_delivery_services, :id, :name
|
39
|
+
%td
|
40
|
+
%td
|
41
|
+
%td.money-input
|
42
|
+
.moneyInput
|
43
|
+
= f.text_field :delivery_price, :placeholder => number_to_currency(@order.delivery_price, :unit => ''), :class =>'text short'
|
44
|
+
%td.money-input
|
45
|
+
.moneyInput
|
46
|
+
= f.text_field :delivery_tax_amount, :placeholder => number_to_currency(@order.delivery_tax_amount, :unit => ''), :class => 'text short'
|
47
|
+
%td.money.total= text_field_tag '_', number_to_currency(@order.delivery_price + @order.delivery_tax_amount, :unit => ''), :class => 'text short', :disabled => true
|
48
|
+
%td
|
49
|
+
%tfoot
|
50
|
+
%tr
|
51
|
+
%td
|
52
|
+
%td
|
53
|
+
%td
|
54
|
+
%td= text_field_tag '_', number_to_currency(@order.total_before_tax, :unit => ''), :class => 'text short', :disabled => true
|
55
|
+
%td= text_field_tag '_', number_to_currency(@order.tax, :unit => ''), :class => 'text short', :disabled => true
|
56
|
+
%td= text_field_tag '_', number_to_currency(@order.total, :unit => ''), :class => 'text short', :disabled => true
|
57
|
+
%td.weight= text_field_tag '_', number_to_currency(@order.total_weight, :unit => ''), :class => 'text short', :disabled => true
|
58
|
+
|
59
|
+
- unless @order.new_record?
|
60
|
+
%p.slaWarning
|
61
|
+
= t('shoppe.orders.sla_warning')
|
@@ -0,0 +1,15 @@
|
|
1
|
+
= form_for [@order, Shoppe::Payment.new(:amount => @order.balance)] do |f|
|
2
|
+
%dl.text
|
3
|
+
%dt= f.label :method, t('shoppe.orders.method')
|
4
|
+
%dd= f.text_field :method, :class => 'text'
|
5
|
+
%dl.text
|
6
|
+
%dt= f.label :reference, t('shoppe.orders.reference')
|
7
|
+
%dd= f.text_field :reference, :class => 'text'
|
8
|
+
%dl.amount
|
9
|
+
%dt= f.label :amount, t('shoppe.orders.amount')
|
10
|
+
%dd
|
11
|
+
.moneyInput
|
12
|
+
.currency= Shoppe.settings.currency_unit.html_safe
|
13
|
+
= f.text_field :amount, :class => 'text'
|
14
|
+
%dl.submit
|
15
|
+
%dd= f.submit t('shoppe.orders.add_payment') , :class => 'button green'
|
@@ -0,0 +1,37 @@
|
|
1
|
+
- unless @payments.empty?
|
2
|
+
.table
|
3
|
+
%table.data
|
4
|
+
%thead
|
5
|
+
%tr
|
6
|
+
%th= t('shoppe.orders.id')
|
7
|
+
%th= t('shoppe.orders.type')
|
8
|
+
%th= t('shoppe.orders.method')
|
9
|
+
%th= t('shoppe.orders.reference')
|
10
|
+
%th= t('shoppe.orders.amount')
|
11
|
+
%th= t('shoppe.orders.refunded?')
|
12
|
+
%th
|
13
|
+
%tbody
|
14
|
+
- for payment in @payments
|
15
|
+
%tr
|
16
|
+
%td= payment.id
|
17
|
+
%td
|
18
|
+
= payment.refund? ? t('shoppe.orders.refund') : t('shoppe.orders.payment')
|
19
|
+
%span.float-right= boolean_tag payment.confirmed?
|
20
|
+
%td= payment.method
|
21
|
+
%td= link_to_if payment.transaction_url, payment.reference, payment.transaction_url
|
22
|
+
|
23
|
+
- if payment.refund?
|
24
|
+
%td{:colspan => 2}
|
25
|
+
%b= number_to_currency payment.amount
|
26
|
+
- if payment.parent_payment_id
|
27
|
+
#{t('shoppe.orders.from_payment')} ##{payment.parent_payment_id}
|
28
|
+
- else
|
29
|
+
%td= number_to_currency payment.amount
|
30
|
+
%td= boolean_tag payment.refunded?, nil, :true_text => number_to_currency(payment.amount_refunded)
|
31
|
+
%td.refund
|
32
|
+
- if payment.refundable?
|
33
|
+
= link_to t('shoppe.orders.refund'), [:refund, @order, payment], :class => 'button purple button-mini', :rel => 'dialog'
|
34
|
+
- else
|
35
|
+
= link_to t('shoppe.delete'), [@order, payment], :class => 'button purple button-mini', :data => {:confirm => t('shoppe.orders.payment_remove_confirmation') }, :method => :delete
|
36
|
+
- else
|
37
|
+
%p.notice= t('shoppe.orders.no_payments')
|
@@ -0,0 +1,24 @@
|
|
1
|
+
.orderSearch{:style => action_name == 'search' ? "display:block" : ''}
|
2
|
+
= search_form_for @query, :url => search_orders_path, :html => { :method => :post } do |f|
|
3
|
+
%dl.left
|
4
|
+
%dt= f.label :id_eq, t('shoppe.orders.order_number')
|
5
|
+
%dd= f.text_field :id_eq
|
6
|
+
%dt= f.label :first_name_or_last_name_or_company_cont, t('shoppe.orders.customer')
|
7
|
+
%dd= f.text_field :first_name_or_last_name_or_company_cont
|
8
|
+
%dt= f.label :address1_or_address2_or_address3_or_address4_or_postcode_cont, t('shoppe.orders.billing_address')
|
9
|
+
%dd= f.text_field :billing_address1_or_billing_address2_or_billing_address3_or_billing_address4_or_billing_postcode_cont
|
10
|
+
%dt= f.label :consignment_number_cont, t('shoppe.orders.consignment_number')
|
11
|
+
%dd= f.text_field :consignment_number_cont
|
12
|
+
%dt= f.label :received_at_eq, t('shoppe.orders.received_between')
|
13
|
+
%dd
|
14
|
+
= f.text_field :received_at_gteq, :class => 'small'
|
15
|
+
→
|
16
|
+
= f.text_field :received_at_lteq, :class => 'small'
|
17
|
+
%dl.right
|
18
|
+
%dt= f.label :email_address_cont, t('shoppe.orders.email_address')
|
19
|
+
%dd= f.text_field :email_address_cont
|
20
|
+
%dt= f.label :phone_number_cont, t('shoppe.orders.phone_number')
|
21
|
+
%dd= f.text_field :phone_number_cont
|
22
|
+
%dt= f.label :status_eq, t('shoppe.orders.status')
|
23
|
+
%dd= f.select :status_eq, [nil] + Shoppe::Order::STATUSES.map { |s| [t("shoppe.orders.statuses.#{s}"), s]}
|
24
|
+
%dd= f.submit t('shoppe.orders.search'), :class => 'button green button'
|
@@ -0,0 +1,35 @@
|
|
1
|
+
.status-bar
|
2
|
+
%ul
|
3
|
+
- if @order.received?
|
4
|
+
%li.received
|
5
|
+
%h4= t('shoppe.orders.order_received')
|
6
|
+
%p
|
7
|
+
= t('shoppe.orders.status_bar.on_date', on: @order.received_at.to_s(:short))
|
8
|
+
= t('shoppe.orders.status_bar.from_ip', ip: @order.ip_address)
|
9
|
+
|
10
|
+
- if @order.accepted?
|
11
|
+
%li.accepted
|
12
|
+
%h4= t('shoppe.orders.order_accepted')
|
13
|
+
%p
|
14
|
+
= t('shoppe.orders.status_bar.on_date', on: @order.accepted_at.to_s(:short))
|
15
|
+
- if @order.accepter
|
16
|
+
= t('shoppe.orders.status_bar.by_user', user: @order.accepter.short_name)
|
17
|
+
|
18
|
+
- elsif @order.rejected?
|
19
|
+
%li.rejected
|
20
|
+
%h4= t('shoppe.orders.order_rejected')
|
21
|
+
%p
|
22
|
+
= t('shoppe.orders.status_bar.on_date', on: @order.rejected_at.to_s(:short))
|
23
|
+
- if @order.rejecter
|
24
|
+
= t('shoppe.orders.status_bar.by_user', user: @order.rejecter.short_name)
|
25
|
+
|
26
|
+
- if @order.shipped?
|
27
|
+
%li.shipped
|
28
|
+
%h4= t('shoppe.orders.order_shipped')
|
29
|
+
%p
|
30
|
+
= t('shoppe.orders.status_bar.on_date', on: @order.shipped_at.to_s(:short))
|
31
|
+
= t('shoppe.orders.status_bar.by_user', user: @order.shipper.try(:short_name) || 'Unknown')
|
32
|
+
- if @order.delivery_service && @order.courier_tracking_url
|
33
|
+
%p= link_to t('shoppe.orders.status_bar.tracking_url'), @order.courier_tracking_url
|
34
|
+
- else
|
35
|
+
%p= t('shoppe.orders.status_bar.consignment_no_html', consignment_number: @order.consignment_number)
|
@@ -0,0 +1,45 @@
|
|
1
|
+
- @page_title = "#{t('shoppe.orders.despatch_note.order_number')} #{@order.number}"
|
2
|
+
|
3
|
+
.despatchNote
|
4
|
+
%header
|
5
|
+
%h1= Shoppe.settings.store_name
|
6
|
+
%h2= t("shoppe.orders.despatch_note.despatch_note")
|
7
|
+
.address
|
8
|
+
%p.name= @order.delivery_name
|
9
|
+
%p= @order.delivery_address1
|
10
|
+
%p= @order.delivery_address2
|
11
|
+
%p= @order.delivery_address3
|
12
|
+
%p= @order.delivery_address4
|
13
|
+
%p= @order.delivery_postcode
|
14
|
+
%p= @order.delivery_country.try(:name)
|
15
|
+
|
16
|
+
%table.details
|
17
|
+
%tr
|
18
|
+
%th= t("shoppe.orders.despatch_note.order_number")
|
19
|
+
%th= t("shoppe.orders.despatch_note.order_placed")
|
20
|
+
%th= t("shoppe.orders.despatch_note.total_weight")
|
21
|
+
%th= t("shoppe.orders.despatch_note.telephone")
|
22
|
+
%tr
|
23
|
+
%td= @order.number
|
24
|
+
%td= @order.received? ? @order.received_at.to_s(:long) : 'n/a'
|
25
|
+
%td= number_to_weight @order.total_weight
|
26
|
+
%td= @order.phone_number
|
27
|
+
|
28
|
+
%table.items
|
29
|
+
%thead
|
30
|
+
%tr
|
31
|
+
%th= t("shoppe.orders.despatch_note.quantity")
|
32
|
+
%th= t("shoppe.orders.despatch_note.product")
|
33
|
+
%th= t("shoppe.orders.despatch_note.sku")
|
34
|
+
%th= t("shoppe.orders.despatch_note.weight")
|
35
|
+
%th= t("shoppe.orders.despatch_note.packed?")
|
36
|
+
%tbody
|
37
|
+
- for item in @order.order_items
|
38
|
+
%tr
|
39
|
+
%td= item.quantity
|
40
|
+
%td= item.ordered_item.full_name
|
41
|
+
%td= item.ordered_item.sku
|
42
|
+
%td= number_to_weight item.weight
|
43
|
+
%td.check
|
44
|
+
|
45
|
+
%p.footer= t('shoppe.orders.despatch_note.footer', :default => "Thank you for your order!")
|