refinerycms-products 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/controllers/addresses_controller.rb +22 -22
- data/app/controllers/admin/carts_controller.rb +7 -7
- data/app/controllers/admin/categories_controller.rb +50 -50
- data/app/controllers/admin/customers_controller.rb +12 -12
- data/app/controllers/admin/line_items_controller.rb +7 -7
- data/app/controllers/admin/products_controller.rb +23 -23
- data/app/controllers/carts_controller.rb +110 -110
- data/app/controllers/categories_controller.rb +32 -32
- data/app/controllers/customers_controller.rb +33 -33
- data/app/controllers/line_items_controller.rb +8 -8
- data/app/controllers/products_controller.rb +61 -61
- data/app/controllers/profiles_controller.rb +36 -36
- data/app/helpers/address_helper.rb +20 -20
- data/app/helpers/products_helper.rb +41 -33
- data/app/models/address.rb +18 -18
- data/app/models/cart.rb +54 -54
- data/app/models/category.rb +28 -28
- data/app/models/customer.rb +32 -32
- data/app/models/line_item.rb +28 -28
- data/app/models/product.rb +46 -46
- data/app/views/addresses/edit.html.erb +42 -42
- data/app/views/admin/carts/_actions.html.erb +27 -27
- data/app/views/admin/carts/_cart.html.erb +18 -18
- data/app/views/admin/carts/_carts.html.erb +1 -1
- data/app/views/admin/carts/_form.html.erb +24 -24
- data/app/views/admin/carts/_records.html.erb +17 -17
- data/app/views/admin/carts/_sortable_list.html.erb +7 -7
- data/app/views/admin/carts/edit.html.erb +1 -1
- data/app/views/admin/carts/index.html.erb +10 -10
- data/app/views/admin/carts/new.html.erb +1 -1
- data/app/views/admin/categories/_actions.html.erb +27 -27
- data/app/views/admin/categories/_categories.html.erb +1 -1
- data/app/views/admin/categories/_category.html.erb +25 -25
- data/app/views/admin/categories/_form.html.erb +49 -49
- data/app/views/admin/categories/_records.html.erb +17 -17
- data/app/views/admin/categories/_sortable_list.html.erb +10 -10
- data/app/views/admin/categories/edit.html.erb +1 -1
- data/app/views/admin/categories/index.html.erb +12 -12
- data/app/views/admin/categories/new.html.erb +1 -1
- data/app/views/admin/customers/_actions.html.erb +27 -27
- data/app/views/admin/customers/_customer.html.erb +18 -18
- data/app/views/admin/customers/_customers.html.erb +1 -1
- data/app/views/admin/customers/_form.html.erb +40 -40
- data/app/views/admin/customers/_records.html.erb +17 -17
- data/app/views/admin/customers/_sortable_list.html.erb +7 -7
- data/app/views/admin/customers/edit.html.erb +1 -1
- data/app/views/admin/customers/index.html.erb +10 -10
- data/app/views/admin/customers/new.html.erb +1 -1
- data/app/views/admin/customers/show.html.erb +59 -59
- data/app/views/admin/line_items/_actions.html.erb +27 -27
- data/app/views/admin/line_items/_form.html.erb +29 -29
- data/app/views/admin/line_items/_line_item.html.erb +18 -18
- data/app/views/admin/line_items/_line_items.html.erb +1 -1
- data/app/views/admin/line_items/_records.html.erb +17 -17
- data/app/views/admin/line_items/_sortable_list.html.erb +7 -7
- data/app/views/admin/line_items/edit.html.erb +1 -1
- data/app/views/admin/line_items/index.html.erb +10 -10
- data/app/views/admin/line_items/new.html.erb +1 -1
- data/app/views/admin/products/_actions.html.erb +42 -42
- data/app/views/admin/products/_form.html.erb +120 -120
- data/app/views/admin/products/_product.html.erb +23 -23
- data/app/views/admin/products/_products.html.erb +1 -1
- data/app/views/admin/products/_records.html.erb +17 -17
- data/app/views/admin/products/_sortable_list.html.erb +13 -13
- data/app/views/admin/products/edit.html.erb +1 -1
- data/app/views/admin/products/index.html.erb +12 -12
- data/app/views/admin/products/new.html.erb +1 -1
- data/app/views/carts/show.html.erb +56 -56
- data/app/views/categories/index.html.erb +11 -11
- data/app/views/categories/show.html.erb +33 -33
- data/app/views/customers/index.html.erb +11 -11
- data/app/views/customers/show.html.erb +52 -52
- data/app/views/line_items/index.html.erb +11 -11
- data/app/views/line_items/show.html.erb +39 -39
- data/app/views/products/index.html.erb +33 -33
- data/app/views/products/show.html.erb +65 -65
- data/app/views/profiles/_order_history.html.erb +23 -23
- data/app/views/profiles/_show_address.html.erb +3 -3
- data/app/views/profiles/account_details.html.erb +31 -31
- data/app/views/profiles/address_details.html.erb +9 -9
- data/app/views/profiles/index.html.erb +75 -75
- data/app/views/profiles/order_history_details.html.erb +39 -39
- data/config/locales/en.yml +97 -97
- data/config/locales/fr.yml +25 -25
- data/config/locales/lolcat.yml +25 -25
- data/config/locales/nb.yml +21 -21
- data/config/locales/nl.yml +21 -21
- data/config/routes.rb +58 -58
- data/lib/generators/refinerycms_products_generator.rb +5 -5
- data/lib/refinerycms-carts.rb +31 -31
- data/lib/refinerycms-categories.rb +30 -30
- data/lib/refinerycms-customers.rb +34 -34
- data/lib/refinerycms-line_items.rb +30 -30
- data/lib/refinerycms-products.rb +65 -65
- data/lib/tasks/products.rake +12 -12
- metadata +95 -98
@@ -1,11 +1,11 @@
|
|
1
|
-
<% content_for :body_content_left do %>
|
2
|
-
<ul id="line_items">
|
3
|
-
<% @line_items.each do |line_item| %>
|
4
|
-
<li>
|
5
|
-
<%= link_to line_item, line_item_path(line_item) %>
|
6
|
-
</li>
|
7
|
-
<% end %>
|
8
|
-
</ul>
|
9
|
-
<% end %>
|
10
|
-
|
11
|
-
<%= render :partial => "/shared/content_page" %>
|
1
|
+
<% content_for :body_content_left do %>
|
2
|
+
<ul id="line_items">
|
3
|
+
<% @line_items.each do |line_item| %>
|
4
|
+
<li>
|
5
|
+
<%= link_to line_item, line_item_path(line_item) %>
|
6
|
+
</li>
|
7
|
+
<% end %>
|
8
|
+
</ul>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<%= render :partial => "/shared/content_page" %>
|
@@ -1,39 +1,39 @@
|
|
1
|
-
<% content_for :body_content_title do %>
|
2
|
-
<%= @line_item.title %>
|
3
|
-
<% end %>
|
4
|
-
|
5
|
-
<% content_for :body_content_left do %>
|
6
|
-
<section>
|
7
|
-
<h1>Cart</h1>
|
8
|
-
<p>
|
9
|
-
<%=raw @line_item.cart %>
|
10
|
-
</p>
|
11
|
-
</section>
|
12
|
-
<section>
|
13
|
-
<h1>Product</h1>
|
14
|
-
<p>
|
15
|
-
<%=raw @line_item.product %>
|
16
|
-
</p>
|
17
|
-
</section>
|
18
|
-
<section>
|
19
|
-
<h1>Quantity</h1>
|
20
|
-
<p>
|
21
|
-
<%=raw @line_item.quantity %>
|
22
|
-
</p>
|
23
|
-
</section>
|
24
|
-
<% end %>
|
25
|
-
|
26
|
-
<% content_for :body_content_right do %>
|
27
|
-
<aside>
|
28
|
-
<h2><%= t('.other') %></h2>
|
29
|
-
<ul id="line_items">
|
30
|
-
<% @line_items.each do |line_item| %>
|
31
|
-
<li>
|
32
|
-
<%= link_to line_item.title, line_item_path(line_item) %>
|
33
|
-
</li>
|
34
|
-
<% end %>
|
35
|
-
</ul>
|
36
|
-
</aside>
|
37
|
-
<% end %>
|
38
|
-
|
39
|
-
<%= render :partial => "/shared/content_page" %>
|
1
|
+
<% content_for :body_content_title do %>
|
2
|
+
<%= @line_item.title %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<% content_for :body_content_left do %>
|
6
|
+
<section>
|
7
|
+
<h1>Cart</h1>
|
8
|
+
<p>
|
9
|
+
<%=raw @line_item.cart %>
|
10
|
+
</p>
|
11
|
+
</section>
|
12
|
+
<section>
|
13
|
+
<h1>Product</h1>
|
14
|
+
<p>
|
15
|
+
<%=raw @line_item.product %>
|
16
|
+
</p>
|
17
|
+
</section>
|
18
|
+
<section>
|
19
|
+
<h1>Quantity</h1>
|
20
|
+
<p>
|
21
|
+
<%=raw @line_item.quantity %>
|
22
|
+
</p>
|
23
|
+
</section>
|
24
|
+
<% end %>
|
25
|
+
|
26
|
+
<% content_for :body_content_right do %>
|
27
|
+
<aside>
|
28
|
+
<h2><%= t('.other') %></h2>
|
29
|
+
<ul id="line_items">
|
30
|
+
<% @line_items.each do |line_item| %>
|
31
|
+
<li>
|
32
|
+
<%= link_to line_item.title, line_item_path(line_item) %>
|
33
|
+
</li>
|
34
|
+
<% end %>
|
35
|
+
</ul>
|
36
|
+
</aside>
|
37
|
+
<% end %>
|
38
|
+
|
39
|
+
<%= render :partial => "/shared/content_page" %>
|
@@ -1,33 +1,33 @@
|
|
1
|
-
<% content_for :body_content_title do %>
|
2
|
-
Catalogue - <%= @page_title %>
|
3
|
-
<% end %>
|
4
|
-
|
5
|
-
<% content_for :body_content_left do %>
|
6
|
-
|
7
|
-
|
8
|
-
<% if @products.blank? %>
|
9
|
-
<p><i>Sorry, we can't find any products. Either we're out of stock, or there are no products belonging to the category that you selected.</i></p>
|
10
|
-
<% else %>
|
11
|
-
|
12
|
-
<%= content_tag('p', raw(@category.description)) if @category.present? %>
|
13
|
-
|
14
|
-
<% @products.each do |product| %>
|
15
|
-
<div class="pod quarter product omega">
|
16
|
-
<div class="corner"><img src="/images/corner.png" /></div>
|
17
|
-
<%= link_to(image_fu(product.image, "200x200#c", :id => "variant_id"), product_path(product)) %>
|
18
|
-
<hr>
|
19
|
-
<div class="productname"><%= raw product.name %></div>
|
20
|
-
<p><i><%= raw product.description %></i></p>
|
21
|
-
<div class="add_to_cart">
|
22
|
-
|
23
|
-
<p><%= link_to "Details", product_path(product) %></p>
|
24
|
-
|
25
|
-
</div>
|
26
|
-
</div>
|
27
|
-
<% end %>
|
28
|
-
|
29
|
-
<% end %>
|
30
|
-
<% end %>
|
31
|
-
|
32
|
-
<%= render :partial => "/shared/content_page" %>
|
33
|
-
|
1
|
+
<% content_for :body_content_title do %>
|
2
|
+
Catalogue - <%= @page_title %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<% content_for :body_content_left do %>
|
6
|
+
|
7
|
+
|
8
|
+
<% if @products.blank? %>
|
9
|
+
<p><i>Sorry, we can't find any products. Either we're out of stock, or there are no products belonging to the category that you selected.</i></p>
|
10
|
+
<% else %>
|
11
|
+
|
12
|
+
<%= content_tag('p', raw(@category.description)) if @category.present? %>
|
13
|
+
|
14
|
+
<% @products.each do |product| %>
|
15
|
+
<div class="pod quarter product omega">
|
16
|
+
<div class="corner"><img src="/images/corner.png" /></div>
|
17
|
+
<%= link_to(image_fu(product.image, "200x200#c", :id => "variant_id"), product_path(product)) %>
|
18
|
+
<hr>
|
19
|
+
<div class="productname"><%= raw product.name %></div>
|
20
|
+
<p><i><%= raw product.description %></i></p>
|
21
|
+
<div class="add_to_cart">
|
22
|
+
|
23
|
+
<p><%= link_to "Details", product_path(product) %></p>
|
24
|
+
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
<% end %>
|
28
|
+
|
29
|
+
<% end %>
|
30
|
+
<% end %>
|
31
|
+
|
32
|
+
<%= render :partial => "/shared/content_page" %>
|
33
|
+
|
@@ -1,65 +1,65 @@
|
|
1
|
-
<% content_for :body_content_title do %>
|
2
|
-
<%= @product.name %>
|
3
|
-
<% end %>
|
4
|
-
|
5
|
-
<% content_for :body_content_left do %>
|
6
|
-
<div class="pod threequarter product_wider alpha">
|
7
|
-
<div class="corner"><img src="/images/corner.png" /></div>
|
8
|
-
<div class="image"><%= image_fu(@product.image, "400x400#c", :id => "variant_id") %></div>
|
9
|
-
<hr>
|
10
|
-
<div class="productname"><%= raw @product.name %></div>
|
11
|
-
<p><i><%= raw @product.summary %></i></p>
|
12
|
-
<div class="price">Price: <%= raw rands(@product.price) %></div>
|
13
|
-
<div class="add_to_cart">
|
14
|
-
<%= form_tag(add_to_cart_path(@product)) do |f| %>
|
15
|
-
<% if defined?(Variant) && @product.variants.present? %>
|
16
|
-
<%= collection_select(:variant, :id, @product.variants.order(:name), :id, :name, {}, {:class => "variant"}) -%>
|
17
|
-
<% end %>
|
18
|
-
<p><%= image_submit_tag("/images/cart.png") %></p>
|
19
|
-
<% end %>
|
20
|
-
</div>
|
21
|
-
</div>
|
22
|
-
|
23
|
-
<% if @tagged_products.present? %>
|
24
|
-
<h2>Customers who bought this also bought...</h2>
|
25
|
-
<% @tagged_products.each do |product| %>
|
26
|
-
<% unless product.id == @product.id %>
|
27
|
-
<div class="pod quarter product omega">
|
28
|
-
<div class="corner"><img src="/images/corner.png" /></div>
|
29
|
-
<%= link_to(image_fu(product.image, "200x200#c", :id => "variant_id"), product_path(product)) %>
|
30
|
-
<hr>
|
31
|
-
<div class="productname"><%= raw product.name %></div>
|
32
|
-
<p><i><%= raw product.description %></i></p>
|
33
|
-
<div class="add_to_cart">
|
34
|
-
<p><%= link_to "Details", product_path(product) %></p>
|
35
|
-
</div>
|
36
|
-
</div>
|
37
|
-
<% end %>
|
38
|
-
<% end %>
|
39
|
-
<% end %>
|
40
|
-
<% end %>
|
41
|
-
|
42
|
-
|
43
|
-
<%= render :partial => "/shared/content_page" %>
|
44
|
-
|
45
|
-
<script type="text/javascript">
|
46
|
-
$(document).ready(function() {
|
47
|
-
$('.variant').change(function() {
|
48
|
-
change_variant();
|
49
|
-
});
|
50
|
-
|
51
|
-
change_variant();
|
52
|
-
|
53
|
-
function change_variant() {
|
54
|
-
var currentId = $('.variant').val();
|
55
|
-
|
56
|
-
$.get('/get_variant_image/'+currentId, function(data) {
|
57
|
-
$('img#variant_id').attr('src', data);
|
58
|
-
});
|
59
|
-
|
60
|
-
$.get('/get_variant_price/'+currentId, function(data) {
|
61
|
-
$('.price').html('Price: '+data);
|
62
|
-
});
|
63
|
-
}
|
64
|
-
});
|
65
|
-
</script>
|
1
|
+
<% content_for :body_content_title do %>
|
2
|
+
<%= @product.name %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<% content_for :body_content_left do %>
|
6
|
+
<div class="pod threequarter product_wider alpha">
|
7
|
+
<div class="corner"><img src="/images/corner.png" /></div>
|
8
|
+
<div class="image"><%= image_fu(@product.image, "400x400#c", :id => "variant_id") %></div>
|
9
|
+
<hr>
|
10
|
+
<div class="productname"><%= raw @product.name %></div>
|
11
|
+
<p><i><%= raw @product.summary %></i></p>
|
12
|
+
<div class="price">Price: <%= raw rands(@product.price) %></div>
|
13
|
+
<div class="add_to_cart">
|
14
|
+
<%= form_tag(add_to_cart_path(@product)) do |f| %>
|
15
|
+
<% if defined?(Variant) && @product.variants.present? %>
|
16
|
+
<%= collection_select(:variant, :id, @product.variants.order(:name), :id, :name, {}, {:class => "variant"}) -%>
|
17
|
+
<% end %>
|
18
|
+
<p><%= image_submit_tag("/images/cart.png") %></p>
|
19
|
+
<% end %>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
|
23
|
+
<% if @tagged_products.present? and @tagged_products.first.id != @product.id %>
|
24
|
+
<h2>Customers who bought this also bought...</h2>
|
25
|
+
<% @tagged_products.each do |product| %>
|
26
|
+
<% unless product.id == @product.id %>
|
27
|
+
<div class="pod quarter product omega">
|
28
|
+
<div class="corner"><img src="/images/corner.png" /></div>
|
29
|
+
<%= link_to(image_fu(product.image, "200x200#c", :id => "variant_id"), product_path(product)) %>
|
30
|
+
<hr>
|
31
|
+
<div class="productname"><%= raw product.name %></div>
|
32
|
+
<p><i><%= raw product.description %></i></p>
|
33
|
+
<div class="add_to_cart">
|
34
|
+
<p><%= link_to "Details", product_path(product) %></p>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
<% end %>
|
38
|
+
<% end %>
|
39
|
+
<% end %>
|
40
|
+
<% end %>
|
41
|
+
|
42
|
+
|
43
|
+
<%= render :partial => "/shared/content_page" %>
|
44
|
+
|
45
|
+
<script type="text/javascript">
|
46
|
+
$(document).ready(function() {
|
47
|
+
$('.variant').change(function() {
|
48
|
+
change_variant();
|
49
|
+
});
|
50
|
+
|
51
|
+
change_variant();
|
52
|
+
|
53
|
+
function change_variant() {
|
54
|
+
var currentId = $('.variant').val();
|
55
|
+
|
56
|
+
$.get('/get_variant_image/'+currentId, function(data) {
|
57
|
+
$('img#variant_id').attr('src', data);
|
58
|
+
});
|
59
|
+
|
60
|
+
$.get('/get_variant_price/'+currentId, function(data) {
|
61
|
+
$('.price').html('Price: '+data);
|
62
|
+
});
|
63
|
+
}
|
64
|
+
});
|
65
|
+
</script>
|
@@ -1,24 +1,24 @@
|
|
1
|
-
<% if @orders.present? then %>
|
2
|
-
<div >
|
3
|
-
<h2 class="category">Order History</h2>
|
4
|
-
|
5
|
-
<table>
|
6
|
-
<tr>
|
7
|
-
<th>Order Number</th>
|
8
|
-
<th>Status</th>
|
9
|
-
<th>Date</th>
|
10
|
-
<th>Total Price</th>
|
11
|
-
</tr>
|
12
|
-
<% @orders.each do |order| %>
|
13
|
-
<tr class="<%= cycle('odd', 'even') %>">
|
14
|
-
<td><%= link_to order.order_number, order_history_details_path(order.order_number) %></td>
|
15
|
-
<td><%= order.order_status %></td>
|
16
|
-
<td><%= order.created_at.strftime("%m/%d/%Y") if order.created_at.present? %></td>
|
17
|
-
<td><%= order.grand_total if order.grand_total.present? %></td>
|
18
|
-
</tr>
|
19
|
-
<% end %>
|
20
|
-
</table>
|
21
|
-
</div>
|
22
|
-
<% end %>
|
23
|
-
|
1
|
+
<% if @orders.present? then %>
|
2
|
+
<div >
|
3
|
+
<h2 class="category">Order History</h2>
|
4
|
+
|
5
|
+
<table>
|
6
|
+
<tr>
|
7
|
+
<th>Order Number</th>
|
8
|
+
<th>Status</th>
|
9
|
+
<th>Date</th>
|
10
|
+
<th>Total Price</th>
|
11
|
+
</tr>
|
12
|
+
<% @orders.each do |order| %>
|
13
|
+
<tr class="<%= cycle('odd', 'even') %>">
|
14
|
+
<td><%= link_to order.order_number, order_history_details_path(order.order_number) %></td>
|
15
|
+
<td><%= order.order_status %></td>
|
16
|
+
<td><%= order.created_at.strftime("%m/%d/%Y") if order.created_at.present? %></td>
|
17
|
+
<td><%= order.grand_total if order.grand_total.present? %></td>
|
18
|
+
</tr>
|
19
|
+
<% end %>
|
20
|
+
</table>
|
21
|
+
</div>
|
22
|
+
<% end %>
|
23
|
+
|
24
24
|
<%= link_to "Back", profiles_path %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div class="show_address rounded-corners">
|
2
|
-
<%= raw(address_html(address)) %>
|
3
|
-
<p><%= link_to(url_text, url) %></p>
|
1
|
+
<div class="show_address rounded-corners">
|
2
|
+
<%= raw(address_html(address)) %>
|
3
|
+
<p><%= link_to(url_text, url) %></p>
|
4
4
|
</div>
|
@@ -1,32 +1,32 @@
|
|
1
|
-
<h2 class="category">Customer Details</h2>
|
2
|
-
|
3
|
-
<div class='newform'>
|
4
|
-
<%= form_for(@current_customer) do |f| %>
|
5
|
-
|
6
|
-
<%= f.label :name %>
|
7
|
-
<div class='input'>
|
8
|
-
<%= f.text_field :name, :disabled => true %>
|
9
|
-
</div>
|
10
|
-
|
11
|
-
<%= f.label :surname %>
|
12
|
-
<div class='input'>
|
13
|
-
<%= f.text_field :surname, :disabled => true %>
|
14
|
-
</div>
|
15
|
-
|
16
|
-
<%= f.label :contact_number %>
|
17
|
-
<div class='input'>
|
18
|
-
<%= f.text_field :contact_number, :disabled => true %>
|
19
|
-
</div>
|
20
|
-
|
21
|
-
<%= f.label :email %>
|
22
|
-
<div class='input'>
|
23
|
-
<%= f.email_field :email, :disabled => true %>
|
24
|
-
</div>
|
25
|
-
<% end %>
|
26
|
-
|
27
|
-
|
28
|
-
<div class="clear"></div>
|
29
|
-
<br />
|
30
|
-
<%= link_to "Back", profiles_path %> | <%= link_to "Edit Details", edit_customer_registration_path %>
|
31
|
-
|
1
|
+
<h2 class="category">Customer Details</h2>
|
2
|
+
|
3
|
+
<div class='newform'>
|
4
|
+
<%= form_for(@current_customer) do |f| %>
|
5
|
+
|
6
|
+
<%= f.label :name %>
|
7
|
+
<div class='input'>
|
8
|
+
<%= f.text_field :name, :disabled => true %>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<%= f.label :surname %>
|
12
|
+
<div class='input'>
|
13
|
+
<%= f.text_field :surname, :disabled => true %>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
<%= f.label :contact_number %>
|
17
|
+
<div class='input'>
|
18
|
+
<%= f.text_field :contact_number, :disabled => true %>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
<%= f.label :email %>
|
22
|
+
<div class='input'>
|
23
|
+
<%= f.email_field :email, :disabled => true %>
|
24
|
+
</div>
|
25
|
+
<% end %>
|
26
|
+
|
27
|
+
|
28
|
+
<div class="clear"></div>
|
29
|
+
<br />
|
30
|
+
<%= link_to "Back", profiles_path %> | <%= link_to "Edit Details", edit_customer_registration_path %>
|
31
|
+
|
32
32
|
</div>
|
@@ -1,10 +1,10 @@
|
|
1
|
-
<h2 class="category">Addresses</h2>
|
2
|
-
|
3
|
-
<% if @delivery_addresses.present? %>
|
4
|
-
<% @delivery_addresses.each do |address| %>
|
5
|
-
<%= render :partial => 'show_address', :locals => {:address => address, :url_text => 'Edit this address', :url => edit_address_path(address)} %>
|
6
|
-
<% end %>
|
7
|
-
<% else %>
|
8
|
-
<p>Sorry, we have no record of any addresses on your account.</p>
|
9
|
-
<% end %>
|
1
|
+
<h2 class="category">Addresses</h2>
|
2
|
+
|
3
|
+
<% if @delivery_addresses.present? %>
|
4
|
+
<% @delivery_addresses.each do |address| %>
|
5
|
+
<%= render :partial => 'show_address', :locals => {:address => address, :url_text => 'Edit this address', :url => edit_address_path(address)} %>
|
6
|
+
<% end %>
|
7
|
+
<% else %>
|
8
|
+
<p>Sorry, we have no record of any addresses on your account.</p>
|
9
|
+
<% end %>
|
10
10
|
<div class="clear"></div>
|
@@ -1,75 +1,75 @@
|
|
1
|
-
<h2>Customer Profile</h2>
|
2
|
-
|
3
|
-
<div class="account">
|
4
|
-
<h3>Account Details</h3>
|
5
|
-
|
6
|
-
<div class='newform'>
|
7
|
-
<%= form_for(@current_customer) do |f| %>
|
8
|
-
|
9
|
-
<%= f.label :name %>
|
10
|
-
<div class='input'>
|
11
|
-
<%= f.text_field :name, :disabled => true %>
|
12
|
-
</div>
|
13
|
-
|
14
|
-
<%= f.label :surname %>
|
15
|
-
<div class='input'>
|
16
|
-
<%= f.text_field :surname, :disabled => true %>
|
17
|
-
</div>
|
18
|
-
|
19
|
-
<%= f.label :contact_number %>
|
20
|
-
<div class='input'>
|
21
|
-
<%= f.text_field :contact_number, :disabled => true %>
|
22
|
-
</div>
|
23
|
-
|
24
|
-
<%= f.label :email %>
|
25
|
-
<div class='input'>
|
26
|
-
<%= f.email_field :email, :disabled => true %>
|
27
|
-
</div>
|
28
|
-
<% end %>
|
29
|
-
|
30
|
-
|
31
|
-
<div class="clear"></div>
|
32
|
-
<p><%= link_to "Edit Details", edit_customer_registration_path %></p>
|
33
|
-
|
34
|
-
</div>
|
35
|
-
</div>
|
36
|
-
|
37
|
-
<% if @delivery_addresses.present? %>
|
38
|
-
<div class="account">
|
39
|
-
<h3>Addresses</h3>
|
40
|
-
|
41
|
-
<% @delivery_addresses.each do |address| %>
|
42
|
-
<%= render :partial => 'show_address', :locals => {:address => address, :url_text => 'Edit this address', :url => edit_address_path(address)} %>
|
43
|
-
<% end %>
|
44
|
-
</div>
|
45
|
-
<% end %>
|
46
|
-
<div class="clear"></div>
|
47
|
-
|
48
|
-
<% if @orders.present? then %>
|
49
|
-
<div class="order">
|
50
|
-
<div>
|
51
|
-
<h3>Order History</h3>
|
52
|
-
|
53
|
-
<table>
|
54
|
-
<tr>
|
55
|
-
<th>Order Number</th>
|
56
|
-
<th>Status</th>
|
57
|
-
<th>Date</th>
|
58
|
-
<th>Total Price</th>
|
59
|
-
</tr>
|
60
|
-
<% @orders.each do |order| %>
|
61
|
-
<tr class="<%= cycle('odd', 'even') %>">
|
62
|
-
<td><%= link_to order.order_number, order_history_details_path(order.order_number) %></td>
|
63
|
-
<td><%= order.order_status %></td>
|
64
|
-
<td><%= order.created_at.strftime("%m/%d/%Y") if order.created_at.present? %></td>
|
65
|
-
<td><%= order.grand_total if order.grand_total.present? %></td>
|
66
|
-
</tr>
|
67
|
-
<% end %>
|
68
|
-
</table>
|
69
|
-
</div>
|
70
|
-
<p><%= link_to "View Full Order History", order_history_path %></p>
|
71
|
-
</div>
|
72
|
-
<% end %>
|
73
|
-
|
74
|
-
|
75
|
-
|
1
|
+
<h2>Customer Profile</h2>
|
2
|
+
|
3
|
+
<div class="account">
|
4
|
+
<h3>Account Details</h3>
|
5
|
+
|
6
|
+
<div class='newform'>
|
7
|
+
<%= form_for(@current_customer) do |f| %>
|
8
|
+
|
9
|
+
<%= f.label :name %>
|
10
|
+
<div class='input'>
|
11
|
+
<%= f.text_field :name, :disabled => true %>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<%= f.label :surname %>
|
15
|
+
<div class='input'>
|
16
|
+
<%= f.text_field :surname, :disabled => true %>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<%= f.label :contact_number %>
|
20
|
+
<div class='input'>
|
21
|
+
<%= f.text_field :contact_number, :disabled => true %>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<%= f.label :email %>
|
25
|
+
<div class='input'>
|
26
|
+
<%= f.email_field :email, :disabled => true %>
|
27
|
+
</div>
|
28
|
+
<% end %>
|
29
|
+
|
30
|
+
|
31
|
+
<div class="clear"></div>
|
32
|
+
<p><%= link_to "Edit Details", edit_customer_registration_path %></p>
|
33
|
+
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<% if @delivery_addresses.present? %>
|
38
|
+
<div class="account">
|
39
|
+
<h3>Addresses</h3>
|
40
|
+
|
41
|
+
<% @delivery_addresses.each do |address| %>
|
42
|
+
<%= render :partial => 'show_address', :locals => {:address => address, :url_text => 'Edit this address', :url => edit_address_path(address)} %>
|
43
|
+
<% end %>
|
44
|
+
</div>
|
45
|
+
<% end %>
|
46
|
+
<div class="clear"></div>
|
47
|
+
|
48
|
+
<% if @orders.present? then %>
|
49
|
+
<div class="order">
|
50
|
+
<div>
|
51
|
+
<h3>Order History</h3>
|
52
|
+
|
53
|
+
<table>
|
54
|
+
<tr>
|
55
|
+
<th>Order Number</th>
|
56
|
+
<th>Status</th>
|
57
|
+
<th>Date</th>
|
58
|
+
<th>Total Price</th>
|
59
|
+
</tr>
|
60
|
+
<% @orders.each do |order| %>
|
61
|
+
<tr class="<%= cycle('odd', 'even') %>">
|
62
|
+
<td><%= link_to order.order_number, order_history_details_path(order.order_number) %></td>
|
63
|
+
<td><%= order.order_status %></td>
|
64
|
+
<td><%= order.created_at.strftime("%m/%d/%Y") if order.created_at.present? %></td>
|
65
|
+
<td><%= order.grand_total if order.grand_total.present? %></td>
|
66
|
+
</tr>
|
67
|
+
<% end %>
|
68
|
+
</table>
|
69
|
+
</div>
|
70
|
+
<p><%= link_to "View Full Order History", order_history_path %></p>
|
71
|
+
</div>
|
72
|
+
<% end %>
|
73
|
+
|
74
|
+
|
75
|
+
|