shoppe 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/shoppe/application.coffee +4 -0
- data/app/assets/stylesheets/shoppe/application.scss +3 -3
- data/app/controllers/shoppe/addresses_controller.rb +47 -0
- data/app/controllers/shoppe/customers_controller.rb +55 -0
- data/app/controllers/shoppe/orders_controller.rb +29 -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 +1 -1
- data/app/models/shoppe/address.rb +44 -0
- data/app/models/shoppe/customer.rb +41 -0
- data/app/models/shoppe/order.rb +7 -0
- data/app/models/shoppe/product.rb +6 -3
- data/app/models/shoppe/product/variants.rb +1 -1
- data/app/models/shoppe/product_category.rb +3 -3
- 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/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/orders/_form.html.haml +3 -0
- data/app/views/shoppe/product_categories/_form.html.haml +1 -2
- data/app/views/shoppe/product_categories/edit.html.haml +3 -1
- data/app/views/shoppe/product_categories/index.html.haml +7 -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/edit.html.haml +1 -0
- data/app/views/shoppe/variants/form.html.haml +3 -1
- data/config/locales/en.yml +82 -1
- data/config/routes.rb +10 -1
- data/db/migrate/20141013192427_create_shoppe_customers.rb +14 -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 +42 -1
- data/lib/shoppe.rb +1 -0
- data/lib/shoppe/default_navigation.rb +1 -0
- data/lib/shoppe/version.rb +1 -1
- metadata +41 -2
@@ -5,7 +5,7 @@ module Shoppe
|
|
5
5
|
validate { errors.add :base, :can_belong_to_root if self.parent && self.parent.parent }
|
6
6
|
|
7
7
|
# Variants of the product
|
8
|
-
has_many :variants,
|
8
|
+
has_many :variants, :class_name => 'Shoppe::Product', :foreign_key => 'parent_id', :dependent => :destroy
|
9
9
|
|
10
10
|
# The parent product (only applies to variants)
|
11
11
|
belongs_to :parent, :class_name => 'Shoppe::Product', :foreign_key => 'parent_id'
|
@@ -23,15 +23,15 @@ module Shoppe
|
|
23
23
|
validates :name, :presence => true
|
24
24
|
validates :permalink, :presence => true, :uniqueness => {scope: :parent_id}, :permalink => true
|
25
25
|
|
26
|
-
# All categories ordered by their name ascending
|
27
|
-
scope :ordered, -> { order(:name) }
|
28
|
-
|
29
26
|
# Root (no parent) product categories only
|
30
27
|
scope :without_parent, -> { where(parent_id: nil) }
|
31
28
|
|
32
29
|
# No descendents
|
33
30
|
scope :except_descendants, ->(record) { where.not(id: (Array.new(record.descendants) << record).flatten) }
|
34
31
|
|
32
|
+
translates :name, :permalink, :description, :short_description
|
33
|
+
scope :ordered, -> { includes(:translations).order(:name) }
|
34
|
+
|
35
35
|
# Set the permalink on callback
|
36
36
|
before_validation :set_permalink, :set_ancestral_permalink
|
37
37
|
after_save :set_child_permalinks
|
@@ -0,0 +1,33 @@
|
|
1
|
+
= form_for @address, url: [@customer, @address] do |f|
|
2
|
+
= f.error_messages
|
3
|
+
|
4
|
+
= field_set_tag "Address Information" do
|
5
|
+
%dl
|
6
|
+
%dt= f.label :address_type
|
7
|
+
%dd= f.select :address_type, Shoppe::Address::TYPES, {}, :class => "chosen"
|
8
|
+
.splitContainer
|
9
|
+
%dl.third
|
10
|
+
%dt= f.label :address1
|
11
|
+
%dd= f.text_field :address1, :class => "text"
|
12
|
+
%dl.third
|
13
|
+
%dt= f.label :address2
|
14
|
+
%dd= f.text_field :address2, :class => "text"
|
15
|
+
%dl.third
|
16
|
+
%dt= f.label :address3
|
17
|
+
%dd= f.text_field :address3, :class => "text"
|
18
|
+
.splitContainer
|
19
|
+
%dl.third
|
20
|
+
%dt= f.label :address4
|
21
|
+
%dd= f.text_field :address4, :class => "text"
|
22
|
+
%dl.third
|
23
|
+
%dt= f.label :postcode
|
24
|
+
%dd= f.text_field :postcode, :class => "text"
|
25
|
+
%dl.third
|
26
|
+
%dt= f.label :country_id
|
27
|
+
%dd= f.collection_select :country_id, Shoppe::Country.ordered, :id, :name, {:include_blank => true}, {:class => 'chosen', :data => { :placeholder => t('shoppe.orders.select_country')}}
|
28
|
+
|
29
|
+
%p.submit
|
30
|
+
- unless @address.new_record?
|
31
|
+
%span.right= link_to t('shoppe.delete'), [@customer, @address], :class => 'button purple', :method => :delete, :data => {:confirm => "Are you sure you wish to remove this address?"}
|
32
|
+
= f.submit :class => 'button green', data: {disable_with: (@address.new_record? ? "Creating Address..." : "Updating Address...")}
|
33
|
+
= link_to t('shoppe.cancel'), :customers, :class => 'button'
|
@@ -0,0 +1,20 @@
|
|
1
|
+
.addresses
|
2
|
+
.table
|
3
|
+
%table.data
|
4
|
+
%thead
|
5
|
+
%tr
|
6
|
+
%th Type
|
7
|
+
%th Default
|
8
|
+
%th Address
|
9
|
+
%th
|
10
|
+
%tbody
|
11
|
+
- if @addresses.empty?
|
12
|
+
%tr.empty
|
13
|
+
%td{:colspan => 4} No addresses to display.
|
14
|
+
- else
|
15
|
+
- for address in @addresses
|
16
|
+
%tr
|
17
|
+
%td= address.address_type.capitalize
|
18
|
+
%td= boolean_tag address.default
|
19
|
+
%td= address.full_address
|
20
|
+
%td= link_to "Edit", edit_customer_address_path(@customer, address)
|
@@ -0,0 +1,30 @@
|
|
1
|
+
= form_for @customer do |f|
|
2
|
+
= f.error_messages
|
3
|
+
|
4
|
+
= field_set_tag "Customer Information" do
|
5
|
+
.splitContainer
|
6
|
+
%dl.third
|
7
|
+
%dt= f.label :first_name
|
8
|
+
%dd= f.text_field :first_name, :class => "text focus"
|
9
|
+
%dl.third
|
10
|
+
%dt= f.label :last_name
|
11
|
+
%dd= f.text_field :last_name, :class => "text"
|
12
|
+
%dl.third
|
13
|
+
%dt= f.label :company
|
14
|
+
%dd= f.text_field :company, :class => "text"
|
15
|
+
.splitContainer
|
16
|
+
%dl.third
|
17
|
+
%dt= f.label :email
|
18
|
+
%dd= f.text_field :email, :class => "text"
|
19
|
+
%dl.third
|
20
|
+
%dt= f.label :phone
|
21
|
+
%dd= f.text_field :phone, :class => "text"
|
22
|
+
%dl.third
|
23
|
+
%dt= f.label :mobile
|
24
|
+
%dd= f.text_field :mobile, :class => "text"
|
25
|
+
|
26
|
+
%p.submit
|
27
|
+
- unless @customer.new_record?
|
28
|
+
%span.right= link_to "Delete", @customer, :class => 'button purple', :method => :delete, :data => {:confirm => "Are you sure you wish to remove this product?"}
|
29
|
+
= f.submit :class => 'button green', data: {disable_with: (@customer.new_record? ? "Creating Customer..." : "Updating Customer...")}
|
30
|
+
= link_to "Cancel", :customers, :class => 'button'
|
@@ -0,0 +1,13 @@
|
|
1
|
+
.customerSearch{:style => action_name == 'search' ? "display:block" : ''}
|
2
|
+
= search_form_for @query, :url => search_customers_path, :html => { :method => :post } do |f|
|
3
|
+
%dl.left
|
4
|
+
%dt= f.label :first_name_or_last_name_or_company_cont, "First or Last Name"
|
5
|
+
%dd= f.text_field :first_name_or_last_name_or_company_cont
|
6
|
+
%dt= f.label :company_cont, "Company"
|
7
|
+
%dd= f.text_field :company_cont
|
8
|
+
%dl.right
|
9
|
+
%dt= f.label :email_cont, "Email Address"
|
10
|
+
%dd= f.text_field :email_cont
|
11
|
+
%dt= f.label :phone_cont, "Phone Number"
|
12
|
+
%dd= f.text_field :phone_cont
|
13
|
+
%dd= f.submit "Search", :class => 'button green button'
|
@@ -0,0 +1,32 @@
|
|
1
|
+
- @page_title = "Customers"
|
2
|
+
|
3
|
+
= content_for :header do
|
4
|
+
%p.buttons
|
5
|
+
= link_to "New Customer", :new_customer, class: "button green"
|
6
|
+
= link_to "Search Customers", '#', class: 'button', rel: "searchCustomers"
|
7
|
+
%h2.users Customers
|
8
|
+
|
9
|
+
= render "search_form"
|
10
|
+
|
11
|
+
.table
|
12
|
+
%table.data
|
13
|
+
%thead
|
14
|
+
%tr
|
15
|
+
%th Name
|
16
|
+
%th Company
|
17
|
+
%th Email
|
18
|
+
%th Phone
|
19
|
+
%th Mobile
|
20
|
+
%tbody
|
21
|
+
- if @customers.empty?
|
22
|
+
%tr.empty
|
23
|
+
%td{colspan: 5} No customers to display.
|
24
|
+
- else
|
25
|
+
- for customer in @customers
|
26
|
+
%tr
|
27
|
+
%td= link_to customer.full_name, customer
|
28
|
+
%td= link_to customer.company, customer
|
29
|
+
%td= customer.email
|
30
|
+
%td= customer.phone
|
31
|
+
%td= customer.mobile
|
32
|
+
= paginate @customers
|
@@ -0,0 +1,53 @@
|
|
1
|
+
- @page_title = "Customer - #{@customer.name}"
|
2
|
+
= content_for :header do
|
3
|
+
%p.buttons
|
4
|
+
= link_to "New Address", [:new, @customer, :address], class: "button"
|
5
|
+
= link_to "Edit", [:edit, @customer], class: "button"
|
6
|
+
%h2.users
|
7
|
+
Customer - #{@customer.name}
|
8
|
+
|
9
|
+
#customer
|
10
|
+
.details
|
11
|
+
.left
|
12
|
+
%dl
|
13
|
+
%dt Name
|
14
|
+
%dd= @customer.full_name
|
15
|
+
%dt Company
|
16
|
+
%dd= @customer.company.blank? ? '-' : @customer.company
|
17
|
+
.right
|
18
|
+
%dl
|
19
|
+
%dt Email Address
|
20
|
+
%dd= mail_to @customer.email
|
21
|
+
%dt Telephone
|
22
|
+
%dd= @customer.phone
|
23
|
+
%dt Mobile
|
24
|
+
%dd= @customer.mobile
|
25
|
+
|
26
|
+
= field_set_tag "Addresses", :class => 'padded' do
|
27
|
+
= render "addresses"
|
28
|
+
|
29
|
+
= field_set_tag t('shoppe.orders.orders'), :class => 'padded' do
|
30
|
+
.table
|
31
|
+
%table.data
|
32
|
+
%thead
|
33
|
+
%tr
|
34
|
+
%th= t('shoppe.orders.number')
|
35
|
+
%th= t('shoppe.orders.status')
|
36
|
+
%th= t('shoppe.orders.products')
|
37
|
+
%th= t('shoppe.orders.total')
|
38
|
+
%th= t('shoppe.orders.payment')
|
39
|
+
%tbody
|
40
|
+
- if @orders.empty?
|
41
|
+
%tr.empty
|
42
|
+
%td{:colspan => 6}= t('shoppe.orders.no_orders')
|
43
|
+
- else
|
44
|
+
- for order in @orders
|
45
|
+
%tr
|
46
|
+
%td= link_to order.number, order
|
47
|
+
%td= status_tag order.status
|
48
|
+
%td
|
49
|
+
%ul
|
50
|
+
- for item in order.order_items
|
51
|
+
%li #{item.quantity} x #{item.ordered_item.full_name}
|
52
|
+
%td= number_to_currency order.total
|
53
|
+
%td= boolean_tag order.paid_in_full?, nil, :true_text => number_to_currency(order.amount_paid), :false_text => number_to_currency(order.amount_paid)
|
@@ -1,4 +1,7 @@
|
|
1
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')}}
|
2
5
|
.splitContainer
|
3
6
|
%dl.third
|
4
7
|
%dt= f.label :first_name, t('shoppe.orders.first_name')
|
@@ -47,5 +47,4 @@
|
|
47
47
|
%p.submit
|
48
48
|
- unless @product_category.new_record?
|
49
49
|
%span.right= link_to t('shoppe.delete') , @product_category, :class => 'button purple', :method => :delete, :data => {:confirm => t('shoppe.product_category.delete_confirmation') }
|
50
|
-
= f.submit t('shoppe.submit'), :class => 'button green'
|
51
|
-
= link_to t('shoppe.cancel') , :product_categories, :class => 'button'
|
50
|
+
= f.submit t('shoppe.submit'), :class => 'button green'
|
@@ -1,6 +1,8 @@
|
|
1
1
|
- @page_title = t('shoppe.product_category.product_categories')
|
2
2
|
= content_for :header do
|
3
|
-
%p.buttons
|
3
|
+
%p.buttons
|
4
|
+
= link_to t('shoppe.localisations.localisations') , [@product_category, :localisations], :class => 'button'
|
5
|
+
= link_to t('shoppe.product_category.back_to_categories'), :product_categories, :class => 'button'
|
4
6
|
%h2.products= t('shoppe.product_category.product_categories')
|
5
7
|
= render 'form'
|
6
8
|
|
@@ -9,6 +9,8 @@
|
|
9
9
|
%thead
|
10
10
|
%tr
|
11
11
|
%th= t('shoppe.product_category.name')
|
12
|
+
- I18n.available_locales.each do |i|
|
13
|
+
%th
|
12
14
|
%tbody
|
13
15
|
- if @product_categories_without_parent.empty?
|
14
16
|
%tr.empty
|
@@ -17,4 +19,9 @@
|
|
17
19
|
- for cat in @product_categories_without_parent
|
18
20
|
%tr
|
19
21
|
%td= link_to cat.name, [:edit, cat]
|
22
|
+
- I18n.available_locales.each do |i|
|
23
|
+
- if cat.translations.where(locale: i).count >= 1
|
24
|
+
%td= link_to i, edit_product_category_localisation_path(cat, cat.translations.where(locale: i).first.id)
|
25
|
+
- else
|
26
|
+
%td= link_to i, new_product_category_localisation_path(cat, locale_field: i)
|
20
27
|
= nested_product_category_rows(cat)
|
@@ -0,0 +1,29 @@
|
|
1
|
+
- @page_title = "#{t('shoppe.localisations.localisations')} - #{@product_category.name}"
|
2
|
+
= content_for :header do
|
3
|
+
%p.buttons= link_to t('shoppe.localisations.back_to_localisations'), [@product_category, :localisations], :class => 'button'
|
4
|
+
%h2.products= t('shoppe.localisations.localisations_of', name: @product_category.name)
|
5
|
+
|
6
|
+
- loc = @localisation.new_record? ? :en : @localisation.locale.to_sym
|
7
|
+
- Globalize.with_locale(loc) do
|
8
|
+
= form_for [@product_category, @localisation], :url => @localisation.new_record? ? product_category_localisations_path(@product_category) : product_category_localisation_path(@product_category, @localisation), :html => {:multipart => true} do |f|
|
9
|
+
= f.error_messages
|
10
|
+
|
11
|
+
= field_set_tag t('shoppe.product_category.category_details') do
|
12
|
+
.splitContainer
|
13
|
+
%dl.half
|
14
|
+
%dt= f.label :name, t('shoppe.product_category.name')
|
15
|
+
%dd= f.text_field :name, :class => 'focus text'
|
16
|
+
%dl.half
|
17
|
+
%dt= f.label :locale
|
18
|
+
%dd= f.select :locale, I18n.available_locales, {selected: @localisation.locale || params[:locale_field]}, {class: "chosen"}
|
19
|
+
%dl
|
20
|
+
%dt= f.label :permalink, t('shoppe.product_category.permalink')
|
21
|
+
%dd= f.text_field :permalink, :class => 'text'
|
22
|
+
%dl.cleared
|
23
|
+
%dt= f.label :description, t('shoppe.product_category.description')
|
24
|
+
%dd= f.text_area :description, :class => 'text'
|
25
|
+
|
26
|
+
%p.submit
|
27
|
+
- unless @localisation.new_record?
|
28
|
+
%span.right= link_to t('shoppe.delete'), product_category_localisation_path(@product_category, @localisation), :class => 'button purple', :method => :delete, :data => {:confirm => t('shoppe.localisations.delete_confirmation')}
|
29
|
+
= f.submit t('shoppe.localisations.save_localisation'), :class => 'button green'
|
@@ -0,0 +1,26 @@
|
|
1
|
+
- @page_title = "#{t('shoppe.localisations.localisations')} - #{@product_category.name}"
|
2
|
+
|
3
|
+
= content_for :header do
|
4
|
+
%p.buttons
|
5
|
+
= link_to t('shoppe.localisations.back'), product_categories_path, :class => 'button'
|
6
|
+
= link_to t('shoppe.localisations.new_localisation'), [:new, @product_category, :localisation], :class => 'button green'
|
7
|
+
|
8
|
+
%h2.products= t('shoppe.localisations.localisations_of', name: @product_category.name)
|
9
|
+
|
10
|
+
.table
|
11
|
+
%table.data
|
12
|
+
%thead
|
13
|
+
%tr
|
14
|
+
%th{:width => '20%'}= t('shoppe.localisations.language')
|
15
|
+
%th{:width => '50%'}= t('shoppe.products.name')
|
16
|
+
%th{:width => '15%'}= t('shoppe.products.permalink')
|
17
|
+
%tbody
|
18
|
+
- if @localisations.empty?
|
19
|
+
%tr.empty
|
20
|
+
%td{:colspan => 4}= t('shoppe.localisations.no_localisations')
|
21
|
+
- else
|
22
|
+
- for localisation in @localisations
|
23
|
+
%tr
|
24
|
+
%td= localisation.locale
|
25
|
+
%td= link_to localisation.name, edit_product_category_localisation_path(@product_category, localisation)
|
26
|
+
%td= localisation.permalink
|
@@ -0,0 +1,32 @@
|
|
1
|
+
- @page_title = "#{t('shoppe.localisations.localisations')} - #{@product.name}"
|
2
|
+
= content_for :header do
|
3
|
+
%p.buttons= link_to t('shoppe.localisations.back_to_localisations'), [@product, :localisations], :class => 'button'
|
4
|
+
%h2.products= t('shoppe.localisations.localisations_of', name: @product.name)
|
5
|
+
|
6
|
+
- loc = @localisation.new_record? ? :en : @localisation.locale.to_sym
|
7
|
+
- Globalize.with_locale(loc) do
|
8
|
+
= form_for [@product, @localisation], :url => @localisation.new_record? ? product_localisations_path(@product) : product_localisation_path(@product, @localisation), :html => {:multipart => true} do |f|
|
9
|
+
= f.error_messages
|
10
|
+
|
11
|
+
= field_set_tag t('shoppe.product.category_details') do
|
12
|
+
.splitContainer
|
13
|
+
%dl.half
|
14
|
+
%dt= f.label :name, t('shoppe.product.name')
|
15
|
+
%dd= f.text_field :name, :class => 'focus text'
|
16
|
+
%dl.half
|
17
|
+
%dt= f.label :locale
|
18
|
+
%dd= f.select :locale, I18n.available_locales, {}, {class: "chosen"}
|
19
|
+
%dl
|
20
|
+
%dt= f.label :permalink, t('shoppe.product.permalink')
|
21
|
+
%dd= f.text_field :permalink, :class => 'text'
|
22
|
+
%dl.cleared
|
23
|
+
%dt= f.label :description, t('shoppe.product.description')
|
24
|
+
%dd= f.text_area :description, :class => 'text'
|
25
|
+
%dl.cleared
|
26
|
+
%dt= f.label :short_description, t('shoppe.product.short_description')
|
27
|
+
%dd= f.text_area :short_description, :class => 'text'
|
28
|
+
|
29
|
+
%p.submit
|
30
|
+
- unless @localisation.new_record?
|
31
|
+
%span.right= link_to t('shoppe.delete'), product_localisation_path(@product, @localisation), :class => 'button purple', :method => :delete, :data => {:confirm => t('shoppe.localisations.delete_confirmation')}
|
32
|
+
= f.submit t('shoppe.localisations.save_localisation'), :class => 'button green'
|
@@ -0,0 +1,26 @@
|
|
1
|
+
- @page_title = "#{t('shoppe.localisations.localisations')} - #{@product.name}"
|
2
|
+
|
3
|
+
= content_for :header do
|
4
|
+
%p.buttons
|
5
|
+
= link_to t('shoppe.localisations.back'), [:edit, @product], :class => 'button'
|
6
|
+
= link_to t('shoppe.localisations.new_localisation'), [:new, @product, :localisation], :class => 'button green'
|
7
|
+
|
8
|
+
%h2.products= t('shoppe.localisations.localisations_of', name: @product.name)
|
9
|
+
|
10
|
+
.table
|
11
|
+
%table.data
|
12
|
+
%thead
|
13
|
+
%tr
|
14
|
+
%th{:width => '20%'}= t('shoppe.localisations.language')
|
15
|
+
%th{:width => '50%'}= t('shoppe.products.name')
|
16
|
+
%th{:width => '15%'}= t('shoppe.products.permalink')
|
17
|
+
%tbody
|
18
|
+
- if @localisations.empty?
|
19
|
+
%tr.empty
|
20
|
+
%td{:colspan => 4}= t('shoppe.localisations.no_localisations')
|
21
|
+
- else
|
22
|
+
- for localisation in @localisations
|
23
|
+
%tr
|
24
|
+
%td= localisation.locale
|
25
|
+
%td= link_to localisation.name, edit_product_localisation_path(@product, localisation)
|
26
|
+
%td= localisation.permalink
|
@@ -1,6 +1,7 @@
|
|
1
1
|
- @page_title = t('shoppe.products.products')
|
2
2
|
= content_for :header do
|
3
3
|
%p.buttons
|
4
|
+
= link_to t('shoppe.localisations.localisations') , [@product, :localisations], :class => 'button'
|
4
5
|
= link_to t('shoppe.products.variants') , [@product, :variants], :class => 'button'
|
5
6
|
= link_to t('shoppe.products.stock_levels') , stock_level_adjustments_path(:item_id => @product.id, :item_type => @product.class), :class => 'button', :rel => 'dialog', :data => {:dialog_width => 700, :dialog_behavior => 'stockLevelAdjustments'}
|
6
7
|
= link_to t('shoppe.products.back_to_products') , :products, :class => 'button'
|
@@ -1,6 +1,8 @@
|
|
1
1
|
- @page_title = "#{t('shoppe.variants.variants')} - #{@product.name}"
|
2
2
|
= content_for :header do
|
3
|
-
%p.buttons
|
3
|
+
%p.buttons
|
4
|
+
= link_to t('shoppe.localisations.localisations') , [@variant, :localisations], :class => 'button'
|
5
|
+
= link_to t('shoppe.variants.back_to_variants'), [@product, :variants], :class => 'button'
|
4
6
|
%h2.products= t('shoppe.variants.variants_of', product:@product.name)
|
5
7
|
|
6
8
|
= form_for [@product, @variant], :url => @variant.new_record? ? product_variants_path(@product) : product_variant_path(@product, @variant), :html => {:multipart => true} do |f|
|
data/config/locales/en.yml
CHANGED
@@ -185,6 +185,65 @@ en:
|
|
185
185
|
edit: Edit
|
186
186
|
import: Import
|
187
187
|
remove: Remove
|
188
|
+
|
189
|
+
removed_it: "%{it} has been removed successfully"
|
190
|
+
save_settings: Save Settings
|
191
|
+
separate_delivery_address: Separate delivery address
|
192
|
+
service_available: Service will be available for use
|
193
|
+
service_default: Service will be used by default (if possible)
|
194
|
+
settings_title: Settings
|
195
|
+
settings_not_in_demo: You cannot make changes to settings in demo mode. Sorry about that.
|
196
|
+
set_prices: Set Prices
|
197
|
+
shoppe_back: Back to Shoppe
|
198
|
+
sku: SKU
|
199
|
+
status: Status
|
200
|
+
stock: Stock
|
201
|
+
stock_current: Current stock level is
|
202
|
+
stock_control: Stock Control
|
203
|
+
stock_control_enable: Enable stock control for this product?
|
204
|
+
stock_levels: Stock levels
|
205
|
+
stock_levels_for: Stock levels %{item}
|
206
|
+
stock_none: No stock
|
207
|
+
system_settings: System settings
|
208
|
+
tax_rate: Tax rate
|
209
|
+
tax_rate_apply_to: Apply to orders where the %{to} matches one of the countries below
|
210
|
+
tax_rate_delete_confirm: Are you sure you wish to remove this tax_rate?
|
211
|
+
tax_rate_details: Rate Details
|
212
|
+
tax_rate_new: New tax rate
|
213
|
+
tax_rate_note: Do NOT edit tax rates that are already in use.
|
214
|
+
Care should be taken when editing tax rates, as this may affect existing orders.
|
215
|
+
while creating a new tax rate, you must delete it and create a new one. When you delete a tax rate
|
216
|
+
it is not removed from the system, only deactivated, so existing orders stay unaffected.
|
217
|
+
tax_rates: Tax Rates
|
218
|
+
tax_rates_back: Back to tax rates
|
219
|
+
tax_none: No tax
|
220
|
+
telephone: Telephone
|
221
|
+
total: Total
|
222
|
+
total_weight: Total weight
|
223
|
+
tracking_url: Tracking URL
|
224
|
+
unknown: Unknown
|
225
|
+
updated_it: "%{it} has been updated successfully"
|
226
|
+
users: Users
|
227
|
+
users_back: Back to users
|
228
|
+
user_delete_confirm: Are you sure you wish to remove this user?
|
229
|
+
user_details: User Details
|
230
|
+
user: User
|
231
|
+
user_edit: Edit user
|
232
|
+
user_new: New User
|
233
|
+
user_not_in_demo: You cannot make changes to users in demo mode. Sorry about that.
|
234
|
+
user_not_yourself: You cannot remove yourself
|
235
|
+
variants: Variants
|
236
|
+
variants_back: Back to variants
|
237
|
+
variants_of: Variants of %{product}
|
238
|
+
variant_delete_confirm: Are you sure you wish to remove this variant?
|
239
|
+
variant_of: Variant of %{product}
|
240
|
+
variant_new: New variant
|
241
|
+
variant_save: Save Variant
|
242
|
+
value: Value
|
243
|
+
website_properties: Website Properties
|
244
|
+
weight: Weight
|
245
|
+
weight_allowance: Weight Allowance
|
246
|
+
|
188
247
|
submit: Submit
|
189
248
|
|
190
249
|
attachments:
|
@@ -318,6 +377,7 @@ en:
|
|
318
377
|
order_rejected: Order Rejected
|
319
378
|
order_shipped: Order Shipped
|
320
379
|
ordered_products: Ordered products
|
380
|
+
|
321
381
|
orders: Orders
|
322
382
|
payment: Payment
|
323
383
|
payment_remove_confirmation: Are you sure you wish to remove this payment?
|
@@ -339,6 +399,8 @@ en:
|
|
339
399
|
search: Search
|
340
400
|
search_orders: Search orders
|
341
401
|
select_country: Select a country
|
402
|
+
customer: Customer
|
403
|
+
select_customer: Select a customer or leave blank
|
342
404
|
separate_delivery_address: Separate delivery address
|
343
405
|
ship_notice: Order has been shipped successfully
|
344
406
|
sku: SKU
|
@@ -425,7 +487,7 @@ en:
|
|
425
487
|
featured?: Featured?
|
426
488
|
featured_info: If checked, this product will appear on your homepage
|
427
489
|
import_products: Import products
|
428
|
-
in_the_box: What's in the box?
|
490
|
+
in_the_box: "What's in the box?"
|
429
491
|
name: Name
|
430
492
|
new_product: New product
|
431
493
|
no_products: No products to display.
|
@@ -601,8 +663,27 @@ en:
|
|
601
663
|
destroy_notice: Payment has been removed successfully
|
602
664
|
refund_notice: Refund has been processed successfully.
|
603
665
|
|
666
|
+
localisations:
|
667
|
+
localisations: Localisations
|
668
|
+
back: Back
|
669
|
+
back_to_localisations: Back
|
670
|
+
localisations_of: Localisations of %{name}
|
671
|
+
product_information: Product Information
|
672
|
+
locales: Locales
|
673
|
+
choose_locale: Please choose a locale
|
674
|
+
save_localisation: Save Localisation
|
675
|
+
new_localisation: New Localisation
|
676
|
+
edit_localisation: Edit Localisation
|
677
|
+
localisation_created: Localisation created successfully
|
678
|
+
localisation_updated: Localisation updated successfully
|
679
|
+
localisation_destroyed: Localisation destroyed successfully
|
680
|
+
language: Language
|
681
|
+
no_localisations: No localisations to display.
|
682
|
+
delete_confirmation: Are you sure?
|
683
|
+
|
604
684
|
navigation:
|
605
685
|
admin_primary:
|
686
|
+
customers: Customers
|
606
687
|
orders: Orders
|
607
688
|
products: Products
|
608
689
|
product_categories: Product Categories
|