Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
venshop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Nguyen Quoc Kien
venshop
Commits
882dbee9
Commit
882dbee9
authored
Jul 31, 2015
by
Nguyen Quoc Kien
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Edit: OrderNotifier - Content
parent
17b967c5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
7 deletions
+31
-7
app/mailers/order_notifier.rb
+1
-1
app/views/order_notifier/received.html.erb
+29
-5
app/views/order_notifier/shipped.html.erb
+1
-1
No files found.
app/mailers/order_notifier.rb
View file @
882dbee9
...
...
@@ -7,7 +7,7 @@ class OrderNotifier < ApplicationMailer
#
def
received
(
cart
)
@cart
=
cart
mail
to:
cart
.
email
,
subject:
'
Pragmatic Store Order Confirmation
'
mail
to:
cart
.
email
,
subject:
'
Venshop - Order Carts
'
end
# Subject can be set in your I18n file at config/locales/en.yml
...
...
app/views/order_notifier/received.html.erb
View file @
882dbee9
<h1>
OrderNotifier#received
</h1>
<p>
<%=
@greeting
%>
, find me in app/views/order_notifier/received.html.erb
</p>
<h1>
Venshop - Email confirmation
</h1>
<h2>
Your Cart
</h2>
<table
class=
"table table-hover"
>
<thead>
<tr>
<th>
Product name
</th>
<th>
Price
</th>
<th>
Quantity
</th>
<th>
Total price
</th>
</tr>
</thead>
<tbody>
<%
cart_products
=
@cart
.
cart_products
%>
<%
cart_products
.
each
do
|
cart_product
|
%>
<%
product
=
Product
.
find
(
cart_product
.
product_id
)
%>
<tr>
<td>
<%=
product
.
name
%>
<td>
<%=
number_to_currency
(
cart_product
.
price
/
100.00
)
%>
</td>
<td>
<%=
cart_product
.
number
%>
</td>
<td>
<%=
number_to_currency
(
cart_product
.
price
/
100.00
*
cart_product
.
number
)
%>
</td>
</td>
<%
end
%>
<tr>
<td
colspan=
"3"
>
Total
</td>
<td>
<%=
number_to_currency
(
@cart
.
total_price
/
100.00
)
%>
</td>
</tr>
</tbody>
</table>
\ No newline at end of file
app/views/order_notifier/shipped.html.erb
View file @
882dbee9
<h1>
OrderNotifier#shipped
</h1>
<p>
<%=
@greeting
%>
, 45
<%=
@greeting
%>
</p>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment