kkt_shoppe 1.1.0
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/kkt_shoppe/chosen-sprite.png +0 -0
- data/app/assets/images/kkt_shoppe/chosen-sprite@2x.png +0 -0
- data/app/assets/images/kkt_shoppe/document.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/bag.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/balance.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/box.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/building.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/chart.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/chat.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/checkbox.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/checkbox2.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/cloud.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/cone.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/credit_card.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/currency.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/edit.svg +14 -0
- data/app/assets/images/kkt_shoppe/icons/flowchart.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/gift.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/globe.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/id.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/id2.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/locked.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/report.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/search.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/support.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/tags.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/toolbox.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/unlocked.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/wallet.svg +1 -0
- data/app/assets/images/kkt_shoppe/kkt_shoppe.svg +25 -0
- data/app/assets/images/kkt_shoppe/logo.svg +47 -0
- data/app/assets/images/kkt_shoppe/move.svg +1 -0
- data/app/assets/images/kkt_shoppe/square.svg +9 -0
- data/app/assets/images/kkt_shoppe/statuses/accepted.svg +14 -0
- data/app/assets/images/kkt_shoppe/statuses/paid.svg +16 -0
- data/app/assets/images/kkt_shoppe/statuses/received.svg +15 -0
- data/app/assets/images/kkt_shoppe/statuses/rejected.svg +14 -0
- data/app/assets/images/kkt_shoppe/statuses/shipped.svg +14 -0
- data/app/assets/images/kkt_shoppe/table-tear-off.png +0 -0
- data/app/assets/javascripts/kkt_shoppe/application.coffee +123 -0
- data/app/assets/javascripts/kkt_shoppe/chosen.jquery.js +1166 -0
- data/app/assets/javascripts/kkt_shoppe/jquery_ui.js +6 -0
- data/app/assets/javascripts/kkt_shoppe/mousetrap.js +9 -0
- data/app/assets/javascripts/kkt_shoppe/order_form.coffee +47 -0
- data/app/assets/stylesheets/kkt_shoppe/application.scss +601 -0
- data/app/assets/stylesheets/kkt_shoppe/chosen.scss +424 -0
- data/app/assets/stylesheets/kkt_shoppe/dialog.scss +25 -0
- data/app/assets/stylesheets/kkt_shoppe/elements.scss +79 -0
- data/app/assets/stylesheets/kkt_shoppe/printable.scss +67 -0
- data/app/assets/stylesheets/kkt_shoppe/reset.scss +93 -0
- data/app/assets/stylesheets/kkt_shoppe/sub.scss +106 -0
- data/app/assets/stylesheets/kkt_shoppe/variables.scss +1 -0
- data/app/controllers/kkt_shoppe/addresses_controller.rb +47 -0
- data/app/controllers/kkt_shoppe/application_controller.rb +46 -0
- data/app/controllers/kkt_shoppe/attachments_controller.rb +14 -0
- data/app/controllers/kkt_shoppe/countries_controller.rb +47 -0
- data/app/controllers/kkt_shoppe/customers_controller.rb +55 -0
- data/app/controllers/kkt_shoppe/dashboard_controller.rb +9 -0
- data/app/controllers/kkt_shoppe/delivery_service_prices_controller.rb +45 -0
- data/app/controllers/kkt_shoppe/delivery_services_controller.rb +47 -0
- data/app/controllers/kkt_shoppe/orders_controller.rb +119 -0
- data/app/controllers/kkt_shoppe/payments_controller.rb +33 -0
- data/app/controllers/kkt_shoppe/product_categories_controller.rb +47 -0
- data/app/controllers/kkt_shoppe/product_category_localisations_controller.rb +58 -0
- data/app/controllers/kkt_shoppe/product_localisations_controller.rb +58 -0
- data/app/controllers/kkt_shoppe/products_controller.rb +58 -0
- data/app/controllers/kkt_shoppe/sessions_controller.rb +34 -0
- data/app/controllers/kkt_shoppe/settings_controller.rb +16 -0
- data/app/controllers/kkt_shoppe/stock_level_adjustments_controller.rb +40 -0
- data/app/controllers/kkt_shoppe/tax_rates_controller.rb +49 -0
- data/app/controllers/kkt_shoppe/users_controller.rb +53 -0
- data/app/controllers/kkt_shoppe/variants_controller.rb +50 -0
- data/app/helpers/kkt_shoppe/application_helper.rb +60 -0
- data/app/helpers/kkt_shoppe/product_category_helper.rb +36 -0
- data/app/mailers/kkt_shoppe/order_mailer.rb +25 -0
- data/app/mailers/kkt_shoppe/user_mailer.rb +10 -0
- data/app/models/kkt_shoppe/address.rb +44 -0
- data/app/models/kkt_shoppe/country.rb +27 -0
- data/app/models/kkt_shoppe/customer.rb +41 -0
- data/app/models/kkt_shoppe/delivery_service.rb +33 -0
- data/app/models/kkt_shoppe/delivery_service_price.rb +31 -0
- data/app/models/kkt_shoppe/order/actions.rb +94 -0
- data/app/models/kkt_shoppe/order/billing.rb +105 -0
- data/app/models/kkt_shoppe/order/delivery.rb +229 -0
- data/app/models/kkt_shoppe/order/states.rb +69 -0
- data/app/models/kkt_shoppe/order.rb +100 -0
- data/app/models/kkt_shoppe/order_item.rb +239 -0
- data/app/models/kkt_shoppe/payment.rb +86 -0
- data/app/models/kkt_shoppe/product/product_attributes.rb +20 -0
- data/app/models/kkt_shoppe/product/variants.rb +51 -0
- data/app/models/kkt_shoppe/product.rb +189 -0
- data/app/models/kkt_shoppe/product_attribute.rb +66 -0
- data/app/models/kkt_shoppe/product_categorization.rb +14 -0
- data/app/models/kkt_shoppe/product_category.rb +75 -0
- data/app/models/kkt_shoppe/setting.rb +68 -0
- data/app/models/kkt_shoppe/stock_level_adjustment.rb +19 -0
- data/app/models/kkt_shoppe/tax_rate.rb +46 -0
- data/app/models/kkt_shoppe/user.rb +49 -0
- data/app/validators/permalink_validator.rb +7 -0
- data/app/views/kkt_shoppe/addresses/_form.html.haml +33 -0
- data/app/views/kkt_shoppe/addresses/edit.html.haml +5 -0
- data/app/views/kkt_shoppe/addresses/new.html.haml +5 -0
- data/app/views/kkt_shoppe/countries/_form.html.haml +35 -0
- data/app/views/kkt_shoppe/countries/edit.html.haml +6 -0
- data/app/views/kkt_shoppe/countries/index.html.haml +25 -0
- data/app/views/kkt_shoppe/countries/new.html.haml +7 -0
- data/app/views/kkt_shoppe/customers/_addresses.html.haml +20 -0
- data/app/views/kkt_shoppe/customers/_form.html.haml +30 -0
- data/app/views/kkt_shoppe/customers/_search_form.html.haml +13 -0
- data/app/views/kkt_shoppe/customers/edit.html.haml +5 -0
- data/app/views/kkt_shoppe/customers/index.html.haml +32 -0
- data/app/views/kkt_shoppe/customers/new.html.haml +5 -0
- data/app/views/kkt_shoppe/customers/show.html.haml +53 -0
- data/app/views/kkt_shoppe/delivery_service_prices/_form.html.haml +44 -0
- data/app/views/kkt_shoppe/delivery_service_prices/edit.html.haml +6 -0
- data/app/views/kkt_shoppe/delivery_service_prices/index.html.haml +23 -0
- data/app/views/kkt_shoppe/delivery_service_prices/new.html.haml +6 -0
- data/app/views/kkt_shoppe/delivery_services/_form.html.haml +38 -0
- data/app/views/kkt_shoppe/delivery_services/edit.html.haml +9 -0
- data/app/views/kkt_shoppe/delivery_services/index.html.haml +27 -0
- data/app/views/kkt_shoppe/delivery_services/new.html.haml +6 -0
- data/app/views/kkt_shoppe/order_mailer/accepted.text.erb +12 -0
- data/app/views/kkt_shoppe/order_mailer/received.text.erb +9 -0
- data/app/views/kkt_shoppe/order_mailer/rejected.text.erb +10 -0
- data/app/views/kkt_shoppe/order_mailer/shipped.text.erb +16 -0
- data/app/views/kkt_shoppe/orders/_form.html.haml +58 -0
- data/app/views/kkt_shoppe/orders/_order_details.html.haml +57 -0
- data/app/views/kkt_shoppe/orders/_order_items.html.haml +38 -0
- data/app/views/kkt_shoppe/orders/_order_items_form.html.haml +61 -0
- data/app/views/kkt_shoppe/orders/_payments_form.html.haml +15 -0
- data/app/views/kkt_shoppe/orders/_payments_table.html.haml +37 -0
- data/app/views/kkt_shoppe/orders/_search_form.html.haml +24 -0
- data/app/views/kkt_shoppe/orders/_status_bar.html.haml +35 -0
- data/app/views/kkt_shoppe/orders/despatch_note.html.haml +45 -0
- data/app/views/kkt_shoppe/orders/edit.html.haml +21 -0
- data/app/views/kkt_shoppe/orders/index.html.haml +39 -0
- data/app/views/kkt_shoppe/orders/new.html.haml +14 -0
- data/app/views/kkt_shoppe/orders/show.html.haml +25 -0
- data/app/views/kkt_shoppe/payments/refund.html.haml +13 -0
- data/app/views/kkt_shoppe/product_categories/_form.html.haml +50 -0
- data/app/views/kkt_shoppe/product_categories/edit.html.haml +8 -0
- data/app/views/kkt_shoppe/product_categories/index.html.haml +27 -0
- data/app/views/kkt_shoppe/product_categories/new.html.haml +6 -0
- data/app/views/kkt_shoppe/product_category_localisations/form.html.haml +29 -0
- data/app/views/kkt_shoppe/product_category_localisations/index.html.haml +26 -0
- data/app/views/kkt_shoppe/product_localisations/form.html.haml +32 -0
- data/app/views/kkt_shoppe/product_localisations/index.html.haml +26 -0
- data/app/views/kkt_shoppe/products/_form.html.haml +118 -0
- data/app/views/kkt_shoppe/products/_table.html.haml +42 -0
- data/app/views/kkt_shoppe/products/edit.html.haml +9 -0
- data/app/views/kkt_shoppe/products/import.html.haml +67 -0
- data/app/views/kkt_shoppe/products/index.html.haml +9 -0
- data/app/views/kkt_shoppe/products/new.html.haml +7 -0
- data/app/views/kkt_shoppe/sessions/new.html.haml +12 -0
- data/app/views/kkt_shoppe/sessions/reset.html.haml +12 -0
- data/app/views/kkt_shoppe/settings/edit.html.haml +19 -0
- data/app/views/kkt_shoppe/shared/error.html.haml +6 -0
- data/app/views/kkt_shoppe/stock_level_adjustments/index.html.haml +40 -0
- data/app/views/kkt_shoppe/tax_rates/form.html.haml +28 -0
- data/app/views/kkt_shoppe/tax_rates/index.html.haml +17 -0
- data/app/views/kkt_shoppe/user_mailer/new_password.text.erb +9 -0
- data/app/views/kkt_shoppe/users/_form.html.haml +27 -0
- data/app/views/kkt_shoppe/users/edit.html.haml +5 -0
- data/app/views/kkt_shoppe/users/index.html.haml +17 -0
- data/app/views/kkt_shoppe/users/new.html.haml +7 -0
- data/app/views/kkt_shoppe/variants/form.html.haml +68 -0
- data/app/views/kkt_shoppe/variants/index.html.haml +33 -0
- data/app/views/layouts/kkt_shoppe/application.html.haml +34 -0
- data/app/views/layouts/kkt_shoppe/printable.html.haml +11 -0
- data/app/views/layouts/kkt_shoppe/sub.html.haml +10 -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_kkt_shoppe_initial_schema.rb +175 -0
- data/db/migrate/20131024201501_add_address_type_to_kkt_shoppe_tax_rates.rb +5 -0
- data/db/migrate/20131024204815_create_kkt_shoppe_payments.rb +32 -0
- data/db/migrate/20131102143930_remove_default_on_order_item_weight.rb +9 -0
- data/db/migrate/20141013192427_create_kkt_shoppe_customers.rb +14 -0
- data/db/migrate/20141026175622_add_indexes_to_kkt_shoppe_order_items.rb +6 -0
- data/db/migrate/20141026175943_add_indexes_to_kkt_shoppe_orders.rb +7 -0
- data/db/migrate/20141026180333_add_indexes_to_kkt_shoppe_payments.rb +6 -0
- data/db/migrate/20141026180835_add_indexes_to_kkt_shoppe_product_attributes.rb +7 -0
- data/db/migrate/20141026180952_add_indexes_to_kkt_shoppe_product_categories.rb +5 -0
- data/db/migrate/20141026181040_add_indexes_to_kkt_shoppe_products.rb +8 -0
- data/db/migrate/20141026181312_add_indexes_to_kkt_shoppe_settings.rb +5 -0
- data/db/migrate/20141026181354_add_indexes_to_kkt_shoppe_stock_level_adjustments.rb +6 -0
- data/db/migrate/20141026181559_add_indexes_to_kkt_shoppe_users.rb +5 -0
- data/db/migrate/20141026181716_add_indexes_to_kkt_shoppe_delivery_services.rb +9 -0
- data/db/migrate/20141026181717_allow_multiple_kkt_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_kkt_shoppe_addresses.rb +17 -0
- data/db/migrate/20150315215633_add_customer_to_kkt_shoppe_orders.rb +5 -0
- data/db/migrate/20150513171350_create_kkt_shoppe_product_category_translation_table.rb +17 -0
- data/db/migrate/20150519173350_create_kkt_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/kkt_shoppe/associated_countries.rb +20 -0
- data/lib/kkt_shoppe/country_importer.rb +15 -0
- data/lib/kkt_shoppe/default_navigation.rb +21 -0
- data/lib/kkt_shoppe/engine.rb +55 -0
- data/lib/kkt_shoppe/error.rb +21 -0
- data/lib/kkt_shoppe/errors/inappropriate_delivery_service.rb +6 -0
- data/lib/kkt_shoppe/errors/insufficient_stock_to_fulfil.rb +15 -0
- data/lib/kkt_shoppe/errors/invalid_configuration.rb +6 -0
- data/lib/kkt_shoppe/errors/not_enough_stock.rb +15 -0
- data/lib/kkt_shoppe/errors/payment_declined.rb +6 -0
- data/lib/kkt_shoppe/errors/refund_failed.rb +6 -0
- data/lib/kkt_shoppe/errors/unorderable_item.rb +6 -0
- data/lib/kkt_shoppe/navigation_manager.rb +81 -0
- data/lib/kkt_shoppe/orderable_item.rb +39 -0
- data/lib/kkt_shoppe/settings.rb +26 -0
- data/lib/kkt_shoppe/settings_loader.rb +16 -0
- data/lib/kkt_shoppe/setup_generator.rb +10 -0
- data/lib/kkt_shoppe/version.rb +3 -0
- data/lib/kkt_shoppe/view_helpers.rb +16 -0
- data/lib/kkt_shoppe.rb +60 -0
- data/lib/tasks/kylekthompson_shoppe.rake +29 -0
- metadata +662 -0
@@ -0,0 +1,38 @@
|
|
1
|
+
= form_for @delivery_service do |f|
|
2
|
+
= f.error_messages
|
3
|
+
= field_set_tag t('kkt_shoppe.delivery_services.details') do
|
4
|
+
.splitContainer
|
5
|
+
%dl.half
|
6
|
+
%dt= f.label :name, t('kkt_shoppe.delivery_services.name')
|
7
|
+
%dd= f.text_field :name, :class => 'focus text'
|
8
|
+
%dl.half
|
9
|
+
%dt= f.label :code, t('kkt_shoppe.delivery_services.code')
|
10
|
+
%dd= f.text_field :code, :class => 'text'
|
11
|
+
.splitContainer
|
12
|
+
%dl.half
|
13
|
+
%dt= f.label :active, t('kkt_shoppe.delivery_services.active')
|
14
|
+
%dd.checkbox
|
15
|
+
= f.check_box :active
|
16
|
+
= f.label :active, t('kkt_shoppe.delivery_services.active_info')
|
17
|
+
%dl.half
|
18
|
+
%dt= f.label :default, t('kkt_shoppe.delivery_services.default')
|
19
|
+
%dd.checkbox
|
20
|
+
= f.check_box :default
|
21
|
+
= f.label :default, t('kkt_shoppe.delivery_services.default_info')
|
22
|
+
|
23
|
+
= field_set_tag t('kkt_shoppe.delivery_services.courier') do
|
24
|
+
.splitContainer
|
25
|
+
%dl.half
|
26
|
+
%dt= f.label :courier, t('kkt_shoppe.delivery_services.courier_name')
|
27
|
+
%dd= f.text_field :courier, :class => 'text'
|
28
|
+
%dl.half
|
29
|
+
%dt= f.label :tracking_url, t('kkt_shoppe.delivery_services.tracking_url')
|
30
|
+
%dd
|
31
|
+
= f.text_field :tracking_url, :class => 'text'
|
32
|
+
%p.help= t('kkt_shoppe.delivery_services.tracking_url_help_html')
|
33
|
+
|
34
|
+
%p.submit
|
35
|
+
- unless @delivery_service.new_record?
|
36
|
+
%span.right= link_to t('kkt_shoppe.delete'), [@delivery_service], :class => 'button purple', :method => :delete, :data => {:confirm => t('kkt_shoppe.delivery_services.delete_confirmation')}
|
37
|
+
= f.submit t('kkt_shoppe.submit'), :class => 'button green'
|
38
|
+
= link_to t('kkt_shoppe.cancel'), :delivery_services, :class => 'button'
|
@@ -0,0 +1,9 @@
|
|
1
|
+
- @page_title = t('kkt_shoppe.delivery_services.delivery_services')
|
2
|
+
|
3
|
+
= content_for :header do
|
4
|
+
%p.buttons
|
5
|
+
= link_to t('kkt_shoppe.delivery_services.prices'), [@delivery_service, :delivery_service_prices], :class => 'button'
|
6
|
+
= link_to t('kkt_shoppe.delivery_services.back'), :delivery_services, :class => 'button'
|
7
|
+
%h2.delivery_services= t('kkt_shoppe.delivery_services.delivery_services')
|
8
|
+
|
9
|
+
= render 'form'
|
@@ -0,0 +1,27 @@
|
|
1
|
+
- @page_title = t('kkt_shoppe.delivery_services.delivery_services')
|
2
|
+
|
3
|
+
= content_for :header do
|
4
|
+
%p.buttons= link_to t('kkt_shoppe.delivery_services.new'), :new_delivery_service, :class => 'button green'
|
5
|
+
%h2.delivery_services= t('kkt_shoppe.delivery_services.delivery_services')
|
6
|
+
|
7
|
+
.table
|
8
|
+
%table.data
|
9
|
+
%thead
|
10
|
+
%tr
|
11
|
+
%th= t('kkt_shoppe.delivery_services.name')
|
12
|
+
%th= t('kkt_shoppe.delivery_services.prices')
|
13
|
+
%th= t('kkt_shoppe.delivery_services.courier')
|
14
|
+
%th= t('kkt_shoppe.delivery_services.active?')
|
15
|
+
%th= t('kkt_shoppe.delivery_services.default?')
|
16
|
+
%tbody
|
17
|
+
- if @delivery_services.empty?
|
18
|
+
%tr.empty
|
19
|
+
%td{:colspan => 5}= t('kkt_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('kkt_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('kkt_shoppe.delivery_services.delivery_services')
|
2
|
+
|
3
|
+
= content_for :header do
|
4
|
+
%p.buttons= link_to t('kkt_shoppe.delivery_services.back'), :delivery_services, :class => 'button'
|
5
|
+
%h2.delivery_services= t('kkt_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
|
+
<%=KktShoppe.settings.store_name%>
|
12
|
+
<%=KktShoppe.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
|
+
<%=KktShoppe.settings.store_name%>
|
10
|
+
<%=KktShoppe.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
|
+
<%=KktShoppe.settings.store_name%>
|
16
|
+
<%=KktShoppe.settings.email_address%>
|
@@ -0,0 +1,58 @@
|
|
1
|
+
= field_set_tag t('kkt_shoppe.orders.billing_address') do
|
2
|
+
%dl
|
3
|
+
%dt= f.label :customer_id, t('kkt_shoppe.orders.customer')
|
4
|
+
%dd= f.collection_select :customer_id, KktShoppe::Customer.ordered, :id, :name, {:include_blank => true}, {:data => {:placeholder => t('kkt_shoppe.orders.select_customer')}}
|
5
|
+
.splitContainer
|
6
|
+
%dl.third
|
7
|
+
%dt= f.label :first_name, t('kkt_shoppe.orders.first_name')
|
8
|
+
%dd= f.text_field :first_name, :class => 'focus text'
|
9
|
+
%dl.third
|
10
|
+
%dt= f.label :last_name, t('kkt_shoppe.orders.last_name')
|
11
|
+
%dd= f.text_field :last_name, :class => 'text'
|
12
|
+
%dl.third
|
13
|
+
%dt= f.label :company, t('kkt_shoppe.orders.company')
|
14
|
+
%dd= f.text_field :company, :class => 'text'
|
15
|
+
%dl
|
16
|
+
%dt= f.label :billing_address1, t('kkt_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('kkt_shoppe.orders.post_code')
|
24
|
+
%dd= f.text_field :billing_postcode, :class => 'text'
|
25
|
+
%dl.half
|
26
|
+
%dt= f.label :billing_country_id, t('kkt_shoppe.orders.country')
|
27
|
+
%dd= f.collection_select :billing_country_id, KktShoppe::Country.ordered, :id, :name, {:include_blank => true}, {:data => {:placeholder => t('kkt_shoppe.orders.select_country')}}
|
28
|
+
|
29
|
+
.splitContainer
|
30
|
+
%dl.third
|
31
|
+
%dt= f.label :email_address, t('kkt_shoppe.orders.email_address')
|
32
|
+
%dd= f.text_field :email_address, :class => 'text'
|
33
|
+
%dl.third
|
34
|
+
%dt= f.label :phone_number, t('kkt_shoppe.orders.phone_number')
|
35
|
+
%dd= f.text_field :phone_number, :class => 'text'
|
36
|
+
%dl.third
|
37
|
+
%dt= f.label :separate_delivery_address, t('kkt_shoppe.orders.separate_delivery_address')
|
38
|
+
%dd.checkbox
|
39
|
+
= f.check_box :separate_delivery_address
|
40
|
+
= f.label :separate_delivery_address, t('kkt_shoppe.orders.use_separate_delivery_address?')
|
41
|
+
|
42
|
+
= field_set_tag t('kkt_shoppe.orders.delivery_address'), :class => 'delivery' do
|
43
|
+
%dl
|
44
|
+
%dt= f.label :delivery_name, t('kkt_shoppe.orders.delivery_name')
|
45
|
+
%dd= f.text_field :delivery_name, :class => 'text'
|
46
|
+
%dl
|
47
|
+
%dt= f.label :delivery_address1, t('kkt_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('kkt_shoppe.orders.post_code')
|
55
|
+
%dd= f.text_field :delivery_postcode, :class => 'text'
|
56
|
+
%dl.half
|
57
|
+
%dt= f.label :delivery_country_id, t('kkt_shoppe.orders.country')
|
58
|
+
%dd= f.collection_select :delivery_country_id, KktShoppe::Country.ordered, :id, :name, {:include_blank => true}, {:data => {:placeholder => t('kkt_shoppe.orders.select_country')}}
|
@@ -0,0 +1,57 @@
|
|
1
|
+
.details
|
2
|
+
.left
|
3
|
+
%dl
|
4
|
+
%dt= t('kkt_shoppe.orders.name')
|
5
|
+
%dd= @order.full_name
|
6
|
+
%dt= t('kkt_shoppe.orders.company')
|
7
|
+
%dd= @order.company.blank? ? '-' : @order.company
|
8
|
+
%dt
|
9
|
+
- if @order.separate_delivery_address?
|
10
|
+
= t('kkt_shoppe.orders.billing_address')
|
11
|
+
- else
|
12
|
+
= t('kkt_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('kkt_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('kkt_shoppe.orders.email_address')
|
32
|
+
%dd= mail_to @order.email_address
|
33
|
+
%dt= t('kkt_shoppe.orders.telephone')
|
34
|
+
%dd= @order.phone_number
|
35
|
+
%dt= t('kkt_shoppe.orders.weight')
|
36
|
+
%dd= number_to_weight @order.total_weight
|
37
|
+
- if @order.received?
|
38
|
+
%dt= t('kkt_shoppe.orders.build_time')
|
39
|
+
%dd= distance_of_time_in_words(@order.created_at, @order.received_at)
|
40
|
+
- if @order.invoiced?
|
41
|
+
%dt= t('kkt_shoppe.orders.invoice_number')
|
42
|
+
%dd= @order.invoice_number
|
43
|
+
%dt= t('kkt_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('kkt_shoppe.orders.consignment_number')
|
49
|
+
%dd= text_field_tag 'consignment_number', '', :class => 'text'
|
50
|
+
%dl.form
|
51
|
+
%dd= submit_tag t('kkt_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('kkt_shoppe.orders.accept'), [:accept, @order], :method => :post, :class => 'button green'
|
57
|
+
= link_to t('kkt_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('kkt_shoppe.orders.qty')
|
7
|
+
%th= t('kkt_shoppe.orders.item')
|
8
|
+
%th= t('kkt_shoppe.orders.sku')
|
9
|
+
%th.money= t('kkt_shoppe.orders.cost')
|
10
|
+
%th.money= t('kkt_shoppe.orders.price')
|
11
|
+
%th.money= KktShoppe.settings.tax_name
|
12
|
+
%th.money= t('kkt_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('kkt_shoppe.orders.product')
|
5
|
+
%th.qty= t('kkt_shoppe.orders.quantity')
|
6
|
+
%th.stock= t('kkt_shoppe.orders.stock')
|
7
|
+
%th.price= t('kkt_shoppe.orders.unit_price')
|
8
|
+
%th.tax= t('kkt_shoppe.orders.tax')
|
9
|
+
%th.total= t('kkt_shoppe.orders.sub_total')
|
10
|
+
%th.weight= t('kkt_shoppe.orders.weight')
|
11
|
+
%tbody
|
12
|
+
- products = KktShoppe::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('kkt_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('kkt_shoppe.orders.missing_delivery_service')
|
34
|
+
- else
|
35
|
+
%td.none-needed{:colspan => 7 }= t('kkt_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('kkt_shoppe.orders.sla_warning')
|
@@ -0,0 +1,15 @@
|
|
1
|
+
= form_for [@order, KktShoppe::Payment.new(:amount => @order.balance)] do |f|
|
2
|
+
%dl.text
|
3
|
+
%dt= f.label :method, t('kkt_shoppe.orders.method')
|
4
|
+
%dd= f.text_field :method, :class => 'text'
|
5
|
+
%dl.text
|
6
|
+
%dt= f.label :reference, t('kkt_shoppe.orders.reference')
|
7
|
+
%dd= f.text_field :reference, :class => 'text'
|
8
|
+
%dl.amount
|
9
|
+
%dt= f.label :amount, t('kkt_shoppe.orders.amount')
|
10
|
+
%dd
|
11
|
+
.moneyInput
|
12
|
+
.currency= KktShoppe.settings.currency_unit.html_safe
|
13
|
+
= f.text_field :amount, :class => 'text'
|
14
|
+
%dl.submit
|
15
|
+
%dd= f.submit t('kkt_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('kkt_shoppe.orders.id')
|
7
|
+
%th= t('kkt_shoppe.orders.type')
|
8
|
+
%th= t('kkt_shoppe.orders.method')
|
9
|
+
%th= t('kkt_shoppe.orders.reference')
|
10
|
+
%th= t('kkt_shoppe.orders.amount')
|
11
|
+
%th= t('kkt_shoppe.orders.refunded?')
|
12
|
+
%th
|
13
|
+
%tbody
|
14
|
+
- for payment in @payments
|
15
|
+
%tr
|
16
|
+
%td= payment.id
|
17
|
+
%td
|
18
|
+
= payment.refund? ? t('kkt_shoppe.orders.refund') : t('kkt_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('kkt_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('kkt_shoppe.orders.refund'), [:refund, @order, payment], :class => 'button purple button-mini', :rel => 'dialog'
|
34
|
+
- else
|
35
|
+
= link_to t('kkt_shoppe.delete'), [@order, payment], :class => 'button purple button-mini', :data => {:confirm => t('kkt_shoppe.orders.payment_remove_confirmation') }, :method => :delete
|
36
|
+
- else
|
37
|
+
%p.notice= t('kkt_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('kkt_shoppe.orders.order_number')
|
5
|
+
%dd= f.text_field :id_eq
|
6
|
+
%dt= f.label :first_name_or_last_name_or_company_cont, t('kkt_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('kkt_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('kkt_shoppe.orders.consignment_number')
|
11
|
+
%dd= f.text_field :consignment_number_cont
|
12
|
+
%dt= f.label :received_at_eq, t('kkt_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('kkt_shoppe.orders.email_address')
|
19
|
+
%dd= f.text_field :email_address_cont
|
20
|
+
%dt= f.label :phone_number_cont, t('kkt_shoppe.orders.phone_number')
|
21
|
+
%dd= f.text_field :phone_number_cont
|
22
|
+
%dt= f.label :status_eq, t('kkt_shoppe.orders.status')
|
23
|
+
%dd= f.select :status_eq, [nil] + KktShoppe::Order::STATUSES.map { |s| [t("kkt_shoppe.orders.statuses.#{s}"), s]}
|
24
|
+
%dd= f.submit t('kkt_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('kkt_shoppe.orders.order_received')
|
6
|
+
%p
|
7
|
+
= t('kkt_shoppe.orders.status_bar.on_date', on: @order.received_at.to_s(:short))
|
8
|
+
= t('kkt_shoppe.orders.status_bar.from_ip', ip: @order.ip_address)
|
9
|
+
|
10
|
+
- if @order.accepted?
|
11
|
+
%li.accepted
|
12
|
+
%h4= t('kkt_shoppe.orders.order_accepted')
|
13
|
+
%p
|
14
|
+
= t('kkt_shoppe.orders.status_bar.on_date', on: @order.accepted_at.to_s(:short))
|
15
|
+
- if @order.accepter
|
16
|
+
= t('kkt_shoppe.orders.status_bar.by_user', user: @order.accepter.short_name)
|
17
|
+
|
18
|
+
- elsif @order.rejected?
|
19
|
+
%li.rejected
|
20
|
+
%h4= t('kkt_shoppe.orders.order_rejected')
|
21
|
+
%p
|
22
|
+
= t('kkt_shoppe.orders.status_bar.on_date', on: @order.rejected_at.to_s(:short))
|
23
|
+
- if @order.rejecter
|
24
|
+
= t('kkt_shoppe.orders.status_bar.by_user', user: @order.rejecter.short_name)
|
25
|
+
|
26
|
+
- if @order.shipped?
|
27
|
+
%li.shipped
|
28
|
+
%h4= t('kkt_shoppe.orders.order_shipped')
|
29
|
+
%p
|
30
|
+
= t('kkt_shoppe.orders.status_bar.on_date', on: @order.shipped_at.to_s(:short))
|
31
|
+
= t('kkt_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('kkt_shoppe.orders.status_bar.tracking_url'), @order.courier_tracking_url
|
34
|
+
- else
|
35
|
+
%p= t('kkt_shoppe.orders.status_bar.consignment_no_html', consignment_number: @order.consignment_number)
|
@@ -0,0 +1,45 @@
|
|
1
|
+
- @page_title = "#{t('kkt_shoppe.orders.despatch_note.order_number')} #{@order.number}"
|
2
|
+
|
3
|
+
.despatchNote
|
4
|
+
%header
|
5
|
+
%h1= KktShoppe.settings.store_name
|
6
|
+
%h2= t("kkt_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("kkt_shoppe.orders.despatch_note.order_number")
|
19
|
+
%th= t("kkt_shoppe.orders.despatch_note.order_placed")
|
20
|
+
%th= t("kkt_shoppe.orders.despatch_note.total_weight")
|
21
|
+
%th= t("kkt_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("kkt_shoppe.orders.despatch_note.quantity")
|
32
|
+
%th= t("kkt_shoppe.orders.despatch_note.product")
|
33
|
+
%th= t("kkt_shoppe.orders.despatch_note.sku")
|
34
|
+
%th= t("kkt_shoppe.orders.despatch_note.weight")
|
35
|
+
%th= t("kkt_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('kkt_shoppe.orders.despatch_note.footer', :default => "Thank you for your order!")
|
@@ -0,0 +1,21 @@
|
|
1
|
+
- @page_title = "#{t('kkt_shoppe.orders.edit_order')} ##{@order.number}"
|
2
|
+
|
3
|
+
= content_for :header do
|
4
|
+
%p.buttons
|
5
|
+
= link_to t('kkt_shoppe.orders.back_to_order'), @order, :class => 'button grey'
|
6
|
+
%h2.orders "#{t('kkt_shoppe.orders.edit_order')} <b>##{@order.number}</b>"
|
7
|
+
|
8
|
+
= form_for @order, :html => {:class => 'orderForm'} do |f|
|
9
|
+
= f.error_messages
|
10
|
+
= render 'form', :f => f
|
11
|
+
|
12
|
+
= field_set_tag t('kkt_shoppe.orders.notes') do
|
13
|
+
%dl
|
14
|
+
%dd= f.text_area :notes, :class => 'text'
|
15
|
+
|
16
|
+
= field_set_tag t('kkt_shoppe.orders.ordered_products'), :class => 'padded' do
|
17
|
+
= render 'order_items_form', :f => f
|
18
|
+
|
19
|
+
%p.submit
|
20
|
+
= f.submit t('kkt_shoppe.orders.save_order') , :class => 'button green'
|
21
|
+
= link_to t('kkt_shoppe.cancel'), @order, :class => 'button'
|
@@ -0,0 +1,39 @@
|
|
1
|
+
- @page_title = t('kkt_shoppe.orders.orders')
|
2
|
+
|
3
|
+
= content_for :header do
|
4
|
+
%p.buttons
|
5
|
+
= link_to t('kkt_shoppe.orders.new_order'), :new_order, :class => 'button green'
|
6
|
+
= link_to t('kkt_shoppe.orders.search_orders'), '#', :class => 'button', :rel => 'searchOrders'
|
7
|
+
%h2.orders
|
8
|
+
= t('kkt_shoppe.orders.orders')
|
9
|
+
%span= page_entries_info @orders
|
10
|
+
|
11
|
+
= render 'search_form'
|
12
|
+
|
13
|
+
.table
|
14
|
+
%table.data
|
15
|
+
%thead
|
16
|
+
%tr
|
17
|
+
%th= t('kkt_shoppe.orders.number')
|
18
|
+
%th= t('kkt_shoppe.orders.customer')
|
19
|
+
%th= t('kkt_shoppe.orders.status')
|
20
|
+
%th= t('kkt_shoppe.orders.products')
|
21
|
+
%th= t('kkt_shoppe.orders.total')
|
22
|
+
%th= t('kkt_shoppe.orders.payment')
|
23
|
+
%tbody
|
24
|
+
- if @orders.empty?
|
25
|
+
%tr.empty
|
26
|
+
%td{:colspan => 6}= t('kkt_shoppe.orders.no_orders')
|
27
|
+
- else
|
28
|
+
- for order in @orders
|
29
|
+
%tr
|
30
|
+
%td= link_to order.number, order
|
31
|
+
%td= order.customer_name
|
32
|
+
%td= status_tag order.status
|
33
|
+
%td
|
34
|
+
%ul
|
35
|
+
- for item in order.order_items
|
36
|
+
%li #{item.quantity} x #{item.ordered_item.full_name}
|
37
|
+
%td= number_to_currency order.total
|
38
|
+
%td= boolean_tag order.paid_in_full?, nil, :true_text => number_to_currency(order.amount_paid), :false_text => number_to_currency(order.amount_paid)
|
39
|
+
= paginate @orders
|
@@ -0,0 +1,14 @@
|
|
1
|
+
- @page_title = t('kkt_shoppe.orders.new_order')
|
2
|
+
|
3
|
+
= content_for :header do
|
4
|
+
%p.buttons= link_to t('kkt_shoppe.orders.back_to_orders'), :orders, :class => 'button grey'
|
5
|
+
%h2.orders= t('kkt_shoppe.orders.new_order')
|
6
|
+
|
7
|
+
= form_for @order, :html => {:class => 'orderForm newOrder'} do |f|
|
8
|
+
= f.error_messages
|
9
|
+
= render 'form', :f => f
|
10
|
+
= field_set_tag t('kkt_shoppe.orders.ordered_products'), :class => 'padded' do
|
11
|
+
= render 'order_items_form', :f => f
|
12
|
+
%p.submit
|
13
|
+
= f.submit t('kkt_shoppe.orders.create_order'), :class => 'button green'
|
14
|
+
= link_to t('kkt_shoppe.cancel'), :orders, :class => 'button grey'
|
@@ -0,0 +1,25 @@
|
|
1
|
+
- @page_title = "#{t('kkt_shoppe.orders.order')} ##{@order.number}"
|
2
|
+
|
3
|
+
= content_for :header do
|
4
|
+
%p.buttons
|
5
|
+
= link_to t('kkt_shoppe.edit'), [:edit, @order], :class => 'button'
|
6
|
+
- if @order.accepted?
|
7
|
+
= link_to t('kkt_shoppe.orders.despatch_note.despatch_note'), [:despatch_note, @order], :class => 'button', :rel => 'print'
|
8
|
+
= link_to t('kkt_shoppe.orders.back_to_orders'), :orders, :class => 'button grey'
|
9
|
+
%h2.orders= t('kkt_shoppe.orders.order_no_html', order_number: @order.number)
|
10
|
+
|
11
|
+
#order
|
12
|
+
|
13
|
+
- if @order.received?
|
14
|
+
= render 'order_details'
|
15
|
+
= render 'status_bar'
|
16
|
+
- else
|
17
|
+
%p.warning= t('kkt_shoppe.orders.in_progress_warning')
|
18
|
+
|
19
|
+
= field_set_tag t('kkt_shoppe.orders.order_items'), :class => 'padded' do
|
20
|
+
= render 'order_items'
|
21
|
+
|
22
|
+
- if @order.received?
|
23
|
+
= field_set_tag t('kkt_shoppe.orders.payments'), :class => 'padded orderPayments' do
|
24
|
+
= render 'payments_table'
|
25
|
+
= render 'payments_form'
|
@@ -0,0 +1,13 @@
|
|
1
|
+
|
2
|
+
= form_tag [:refund, @order, @payment], :class => 'refundForm' do
|
3
|
+
%h2= t('kkt_shoppe.refund.issue_refund')
|
4
|
+
%p.intro
|
5
|
+
= t('kkt_shoppe.refund.intro_html', amount: number_to_currency(@payment.refundable_amount))
|
6
|
+
|
7
|
+
.moneyInput
|
8
|
+
.currency= KktShoppe.settings.currency_unit.html_safe
|
9
|
+
= text_field_tag 'amount', @payment.refundable_amount, :class => 'text'
|
10
|
+
%p.submit
|
11
|
+
= submit_tag t('kkt_shoppe.refund.refund'), :class => 'button green'
|
12
|
+
= link_to t('kkt_shoppe.close'), '#', :class => 'button grey', :rel => 'closeDialog'
|
13
|
+
|