Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

add contact info, email to myself and footer links

  • Loading branch information...
commit 3211c0555b9d9a79e59b2c9851d22ab31b0edca5 1 parent 81ce60b
Masha authored
BIN  .DS_Store
Binary file not shown
BIN  app/assets/images/.DS_Store
Binary file not shown
BIN  app/assets/images/page_bg_tile1.jpg
86 app/assets/javascripts/order_bb.js
@@ -27,13 +27,14 @@ bread.initOrderBackbone = function() {
27 27 "user-phone":""
28 28 },
29 29 loaf_price: 15,
  30 + delivery_price: 5
30 31 },
31 32 availableComponents: {
32   - "raisins": "http://images.wikia.com/recipes/images/8/82/Raisins.jpg",
33   - "chocolate chips": "http://www.cocktailfiesta.com/wp-content/uploads/2012/02/chocolate-chips.jpg",
  33 + "raisins": "http://dl.dropbox.com/u/8229568/apps/bread/raisins.jpg",
  34 + "chocolate chips": "http://dl.dropbox.com/u/8229568/apps/bread/walnuts.jpg",
34 35 "walnuts": "http://www.naturalhealth365.com/images/walnuts.jpg",
35   - "flax seeds": "http://everyoungshop.com/images/isimages/BW6212.jpg",
36   - "cinnamon": "http://www.7daykickstartdiet.com/wp-content/uploads/2011/05/cinnamonhealthbenefits.jpg"
  36 + "flax seeds": "http://dl.dropbox.com/u/8229568/apps/bread/flax-seeds.jpg",
  37 + "cinnamon": "http://dl.dropbox.com/u/8229568/apps/bread/cinnamon.jpg"
37 38 },
38 39 initialize: function() {},
39 40 step: function() {
@@ -67,7 +68,7 @@ bread.initOrderBackbone = function() {
67 68 this.set('quantity', q);
68 69 },
69 70 quantityText: function(){
70   - return this.quantity() == 1 ? "loaf" : "loaves";
  71 + return this.quantity() == 1 ? "loaf" : "loaves";
71 72 },
72 73 updateComponent: function(c){
73 74 var components = this.get("components");
@@ -225,6 +226,12 @@ bread.initOrderBackbone = function() {
225 226 return name_valid && email_valid && phone_valid && address_valid;
226 227 //return order_validity_mask == 0
227 228 },
  229 + loafPrice: function(){
  230 + return this.get('loaf_price');
  231 + },
  232 + deliveryPrice: function(){
  233 + return this.get('delivery_price');
  234 + }
228 235 });
229 236
230 237 bread.OrderView = Backbone.View.extend({
@@ -290,30 +297,34 @@ bread.initOrderBackbone = function() {
290 297 this.model.setDeliveryType($(event.target).val());
291 298 this.updateDeliveryView();
292 299 },
293   - updateDeliveryView: function(){
294   - if(this.model.step() != 2) return;
295   - //$("#user-name").focus();
296   -
297   - var delivery_address = $("#delivery-address");
298   - delivery_address.toggleClass("disabled");
299   - var delivery_message;
300   - if ( this.isPickup() ){
301   - //delivery_address.hide("slow");
302   - delivery_address.attr("disabled", "disabled");
303   -
304   - this.home.circle.setMap(null);
305   - this.deliveryMarker.setMap(null);
306   - delivery_message = "You can pick up your bread on Saturday from 9am to 1pm";
307   - }else{
308   - //delivery_address.show("slow");
309   - delivery_address.removeAttr("disabled");
310   -
311   - this.home.circle.setMap(this.map);
312   - this.deliveryMarker.setMap(this.map);
313   - delivery_message = "I'll bike your order to your location on Saturday from 2pm to 7pm";
314   - }
315   - $("#delivery-message").text(delivery_message);
316   - },
  300 + updateDeliveryView: function(){
  301 + if(this.model.step() != 2) return;
  302 + //$("#user-name").focus();
  303 +
  304 + var delivery_address = $("#delivery-address");
  305 + var delivery_price = $("#delivery-price");
  306 + var total = this.model.loafPrice() * this.model.quantity();
  307 + delivery_address.toggleClass("disabled");
  308 + var delivery_message;
  309 + if ( this.isPickup() ){
  310 + delivery_price.hide();
  311 + delivery_address.attr("disabled", "disabled");
  312 +
  313 + this.home.circle.setMap(null);
  314 + this.deliveryMarker.setMap(null);
  315 + delivery_message = "You can pick up your bread on Saturday from 9am to 1pm";
  316 + }else{
  317 + delivery_price.show();
  318 + delivery_address.removeAttr("disabled");
  319 + total += this.model.deliveryPrice();
  320 +
  321 + this.home.circle.setMap(this.map);
  322 + this.deliveryMarker.setMap(this.map);
  323 + delivery_message = "I'll bike your order to your location on Saturday from 2pm to 7pm";
  324 + }
  325 + $("#total").text(" $"+total);
  326 + $("#delivery-message").text(delivery_message);
  327 + },
317 328 breadCrumbsHandler: function(event){
318 329 var crumb = $(event.target);
319 330 if (crumb.hasClass('enabled') && !crumb.hasClass('active')){
@@ -373,10 +384,11 @@ bread.initOrderBackbone = function() {
373 384 this.model.setStep(this.model.step()+1);
374 385 }
375 386 },
376   - extractStepFromString: function(str){
377   - return +str.substring(str.length-1);
378   - },
379   - initializeMapIfExists: function(){
  387 + extractStepFromString: function(str){
  388 + //return +str.substring(str.length-1);
  389 + return +str.substring(0,1);
  390 + },
  391 + initializeMapIfExists: function(){
380 392 var map_div = $('#map-canvas')[0];
381 393 if (!map_div) return;
382 394 //this.myAddress = "51 lower simcoe, toronto, on";
@@ -412,7 +424,7 @@ bread.initOrderBackbone = function() {
412 424 if (!this.distanceService) this.distanceService = new google.maps.DistanceMatrixService();
413 425
414 426 },
415   - placeDeliveryMarker: function(){
  427 + placeDeliveryMarker: function(){
416 428 if ( this.isPickup() ) return;
417 429 var address = $('#delivery-address').val();
418 430 if(!address) return;
@@ -460,7 +472,7 @@ bread.initOrderBackbone = function() {
460 472 }
461 473 });
462 474 },
463   - addressChangeHandler: function(){
  475 + addressChangeHandler: function(){
464 476 //stop timer
465 477 if(this.inputTimer){
466 478 clearTimeout(this.inputTimer)
@@ -474,8 +486,8 @@ bread.initOrderBackbone = function() {
474 486
475 487 this.inputTimer = setTimeout(timerCallback, 1000);
476 488 },
477   - userNameChangeHandler: function(){
478   - this.model.setUserName($("#user-name").val());
  489 + userNameChangeHandler: function(){
  490 + this.model.setUserName($("#user-name").val());
479 491 },
480 492 userEmailChangeHandler: function(){
481 493 this.model.setUserEmail($("#user-email").val());
58 app/assets/stylesheets/orders.css.scss
@@ -7,8 +7,8 @@
7 7
8 8 body {
9 9 background-color: #fff;
10   - background-image:url('page_bg_tile.jpg');
11   - color: #333;
  10 + background-image:url('page_bg_tile1.jpg');
  11 + color: #222;
12 12
13 13 //font-family: "Trebuchet MS", verdana, arial, helvetica, sans-serif;
14 14 font-family: "Lato", "Helvetica Neue", helvetica, arial, sans-serif;
@@ -16,7 +16,8 @@ body {
16 16 }
17 17
18 18 #wrap{
19   - width: 960px;
  19 + width: 940px;
  20 + height: 600px;
20 21 margin: 10px auto 10px;
21 22 position: relative;
22 23 background: #fff;//#f0dab1;
@@ -37,6 +38,7 @@ body {
37 38 span {
38 39 &.active{
39 40 border-bottom: 2px solid #000;
  41 + font-weight: 800;
40 42 }
41 43
42 44 &.enabled{
@@ -49,11 +51,18 @@ body {
49 51 }
50 52 }
51 53
52   -.sidebar{
  54 +a {
53 55 color: #000;
54 56 }
55 57
56   -$content-height: 300px;
  58 +#footer{
  59 + height: 30px;
  60 + text-align: center;
  61 + width: 100%;
  62 + margin: 10px 0 8px 0;
  63 +}
  64 +
  65 +$content-height: 350px;
57 66
58 67 #bread-image{
59 68 height: $content-height;
@@ -61,17 +70,21 @@ $content-height: 300px;
61 70 background-repeat: no-repeat;
62 71 background-position: left center;
63 72 background-image: url('http://2.bp.blogspot.com/_gLGOsirSkHc/TMi5OkI98RI/AAAAAAAANmQ/b20iE_IH3Yk/s1600/sliced%20banana%20bread.jpg');
  73 + margin: 1px;
64 74 }
65 75
66   -$component-image-width: 80px;
  76 +$component-image-width: 100px;
67 77 .component-image{
68 78 height: $component-image-width;
69 79 width: $component-image-width;
70 80 opacity: 0.4;
71 81 cursor: pointer;
72   -
  82 + border: none;
  83 + margin: 1px;
73 84 &.selected{
  85 + margin: 0px;
74 86 opacity: 1;
  87 + border: 1px solid #aaa;
75 88 }
76 89 }
77 90
@@ -81,6 +94,10 @@ $component-image-width: 80px;
81 94 text-align:center;
82 95 }
83 96
  97 +#order-text{
  98 + height: 117px;
  99 +}
  100 +
84 101 .selected-component{
85 102 font-weight: bold;
86 103 }
@@ -101,7 +118,7 @@ $component-image-width: 80px;
101 118 }
102 119
103 120 #delivery{
104   - height: 250px;
  121 + height: 335px;
105 122 }
106 123
107 124 #map-canvas{
@@ -135,11 +152,6 @@ p{
135 152 font-size: 20px;
136 153 font-weight: 200;
137 154 }
138   -
139   - &.quantity{
140   - margin: 10px;
141   - font-weight:bold;
142   - }
143 155 }
144 156
145 157 .form-horizontal .control-group {
@@ -179,6 +191,22 @@ margin-bottom: 5px;
179 191 vertical-align: middle;
180 192 }
181 193
182   -#filler{
183   - height:110px;
  194 +.alert{
  195 + background-color: #fff;
  196 +}
  197 +
  198 +.row-fluid .span4 {
  199 + text-align: right;
  200 +}
  201 +
  202 +#qty{
  203 + display: inline-block;
  204 + width: 30px;
  205 + margin: 0 0 0 15px;
  206 + border: 1px solid #777;
  207 + text-align: center;
  208 +}
  209 +
  210 +hr{
  211 + margin: 5px 0;
184 212 }
11 app/controllers/orders_controller.rb
@@ -53,19 +53,12 @@ def create
53 53 @order = Order.create!( raisins: comps['raisins'] == 'true', chocolate_chips: comps['chocolate_chips'] == 'true', walnuts: comps['walnuts'] == 'true', flax_seeds: comps['flax seeds'], cinnamon: comps['cinnamon'],
54 54 is_delivery: is_delivery, delivery_address: delivery_address, quantity: quantity,
55 55 user_name: user_name, user_email: user_email, user_phone: user_phone, user_comment: user_comment)
  56 +
  57 + OrderMailer.email_order(@order)
56 58
57 59 #render :json => {order_id: @order.id, paypal_encrypted_str: @order.encrypt_paypal(thank_you_url, payment_notifications_url)}
58 60 render :json => {order_id: @order.id, paypal_encrypted_str: @order.encrypt_paypal(thank_you_url, 'http://marakujja.zapto.org/payment_notifications')}
59 61
60   - # respond_to do |format|
61   - # if @order.save
62   - # format.html { redirect_to @order, notice: 'Order was successfully created.' }
63   - # format.json { render json: @order, status: :created, location: @order }
64   - # else
65   - # format.html { render action: "new" }
66   - # format.json { render json: @order.errors, status: :unprocessable_entity }
67   - # end
68   - # end
69 62 end
70 63 end
71 64
4 app/helpers/application_helper.rb
@@ -25,5 +25,7 @@ def componentName(comp_name)
25 25 return "<span class='selected-component'>" + comp_name + "</span>"
26 26 end
27 27
28   -
  28 + def get_quantity_text(order)
  29 + return order.quantity == 1 ? "loaf" : "loaves";
  30 + end
29 31 end
7 app/mailers/order_mailer.rb
@@ -6,7 +6,12 @@ class OrderMailer < ActionMailer::Base
6 6
7 7 def email_order(order)
8 8 @order = order
  9 + mail(to: MY_EMAIL, subject: "Bananza order \#"+@order.id.to_s+" created").deliver
  10 + end
  11 +
  12 + def email_order_confirmation(order)
  13 + @order = order
9 14
10   - mail(to: [order.user_email, MY_EMAIL], subject: "Order confirmation for Banana Bread").deliver
  15 + mail(to: [order.user_email, MY_EMAIL], subject: "Order \#"+@order.id.to_s+" confirmation for Banana Bread").deliver
11 16 end
12 17 end
12 app/models/order.rb
@@ -7,7 +7,7 @@ class Order < ActiveRecord::Base
7 7 APP_CERT_PEM = File.read("#{Rails.root}/certs/app_cert.pem")
8 8 APP_KEY_PEM = File.read("#{Rails.root}/certs/app_key.pem")
9 9
10   - BREAD_PRICE = 15
  10 + BREAD_PRICE = 0.1
11 11 DELIVERY_PRICE = 5
12 12
13 13 def paypal_form(return_url, notify_url)
@@ -34,20 +34,20 @@ def paypal_form(return_url, notify_url)
34 34 def encrypt_paypal(return_url, notify_url)
35 35 #24.212.225.107
36 36 values = {
37   - :business => 'mkmk_1335799555_biz@mail.ru',
  37 + #:business => 'mkmk_1335799555_biz@mail.ru', #dev env
  38 + :business => 'pfeffer@mail.ru',
38 39 :cmd => '_xclick',
39 40 #:business => '7UWLEGTUETVWL',
40 41 :item_name => 'Banana bread',
41 42 :quantity => self.quantity,
42 43 :amount => BREAD_PRICE, #APP_CONFIG[:price] * quantity,
43   - :currency_code => 'US',
  44 + :currency_code => 'CAD',
44 45 :invoice => self.id,
45 46 :rm => 0,
46   - #:button_subtype => 'services',
47   - #:bn => "PP-BuyNowBF:btn_buynowCC_LG.gif:NonHosted",
48 47 :return => return_url,
49 48 :notify_url => notify_url,
50   - :cert_id => 'Q676RQJ8RDHWY'
  49 + #:cert_id => 'Q676RQJ8RDHWY' # dev env
  50 + :cert_id => 'F3A7K59B9XF6W'
51 51 }
52 52 y values
53 53
2  app/models/payment_notification.rb
@@ -8,7 +8,7 @@ def mark_order_as_purchased
8 8 if status == "Completed"
9 9 order.update_attribute(:purchased_at, Time.now)
10 10
11   - OrderMailer.email_order(order)
  11 + OrderMailer.email_order_confirmation(order)
12 12 end
13 13 end
14 14 end
4 app/views/layouts/application.html.erb
@@ -14,6 +14,10 @@
14 14 <div id='wrap' class="clearfix">
15 15 <%= yield %>
16 16 </div>
  17 +<div id='footer'>
  18 + <%= link_to "Home", root_path %> •
  19 + <%= link_to "About", about_path %>
  20 +</div>
17 21
18 22 </body>
19 23 </html>
58 app/views/order_mailer/email_order.html.erb
@@ -2,15 +2,63 @@
2 2 <html>
3 3 <head>
4 4 <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
  5 + <style type="text/css" media="screen">
  6 + p {
  7 + font-size: 14;
  8 + }
  9 + table{
  10 + border: 1px solid #600;
  11 + }
  12 + td{
  13 + border: 1px solid #600;
  14 + }
  15 + </style>
5 16 </head>
6 17 <body>
7   - <h1>Welcome to bananabread.com, <%= @order.user_name %></h1>
  18 + <h3>You got an order# <%= @order.id %>!</h3>
8 19
  20 + <table>
  21 + <tr>
  22 + <td>Delivery/Pickup</td>
  23 + <td><%= @order.is_delivery == true ? "Address:" + @order.delivery_address : "Pickup"%></td>
  24 + </tr>
  25 + <tr>
  26 + <td>Name</td>
  27 + <td><%= @order.user_name%></td>
  28 + </tr>
  29 + <tr>
  30 + <td>Phone</td>
  31 + <td><%= @order.user_phone%></td>
  32 + </tr>
  33 + <tr>
  34 + <td>Email</td>
  35 + <td><a href="<%= @order.user_email%>"><%= @order.user_email%></a></td>
  36 + </tr>
  37 + <tr>
  38 + <td>Comment</td>
  39 + <td><%= @order.user_comment%></td>
  40 + </tr>
  41 +
  42 + </table>
  43 + <h4>Order content:</h4>
9 44 <p>
10   - Thank you for placing an order with us!
11   -
12   - You ordered Banana Bread <%= get_components_str_from_order(@order).html_safe %>.
13   - Your order # <%= @order.id %> is going to be delivered soon.
  45 + Quantity: <%= @order.quantity%>
14 46 </p>
  47 + <table>
  48 + <tr>
  49 + <td>Raisins</td>
  50 + <td>Chocolate Chips</td>
  51 + <td>Walnuts</td>
  52 + <td>Flax seeds</td>
  53 + <td>Cinnamon</td>
  54 + </tr>
  55 + <tr>
  56 + <td><%= @order.raisins == true ? "YES": "" %></td>
  57 + <td><%= @order.chocolate_chips == true ? "YES": "" %></td>
  58 + <td><%= @order.walnuts == true ? "YES": "" %></td>
  59 + <td><%= @order.flax_seeds == true ? "YES": "" %></td>
  60 + <td><%= @order.cinnamon == true ? "YES": "" %></td>
  61 + </tr>
  62 + <p>
15 63 </body>
16 64 </html>
29 app/views/order_mailer/email_order_confirmation.html.erb
... ... @@ -0,0 +1,29 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <head>
  4 + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
  5 + <style type="text/css" media="screen">
  6 + p {
  7 + font-size: 14;
  8 + }
  9 + .selected-component{
  10 + font-weight: bold;
  11 + }
  12 + </style>
  13 + </head>
  14 + <body>
  15 + <h3>Hello <%= @order.user_name %>,</h3>
  16 +
  17 + <p>
  18 + Thank you for placing an order with us!
  19 + </p>
  20 + <p>
  21 + You ordered <%= @order.quantity %> banana bread <%=get_quantity_text(@order) %> <%= get_components_str_from_order(@order).html_safe %>. We will send you a reminder about your pickup or delivery time.
  22 + </p>
  23 + <p>
  24 + If you have any questions, please don't hesitate to email me at <a href="mailto:masha.ku@gmail.com">masha.ku@gmail.com</a>
  25 + <br/><br/>
  26 + Masha
  27 + </p>
  28 + </body>
  29 +</html>
158 app/views/orders/_select_template.html
@@ -2,9 +2,9 @@
2 2
3 3 <div id="row">
4 4 <div id="bread-crumbs">
5   - <span id='step1' class="<%%= step == 1 ? 'active' : '' %> enabled">Step 1</span> <i class="icon-arrow-right"></i>
6   - <span id='step2' class="<%%= step == 2 ? 'active' : '' %><%%= max_step >= 2 ? ' enabled' : ' disabled' %>">Step 2</span> <i class="icon-arrow-right"></i>
7   - <span id='step3' class="<%%= step == 3 ? 'active' : '' %><%%= max_step >= 3 ? ' enabled' : ' disabled' %>">Step 3</span>
  5 + <span id='step1' class="<%%= step == 1 ? 'active' : '' %> enabled">1. Create</span> <i class="icon-arrow-right"></i>
  6 + <span id='step2' class="<%%= step == 2 ? 'active' : '' %><%%= max_step >= 2 ? ' enabled' : ' disabled' %>">2. Delivery</span> <i class="icon-arrow-right"></i>
  7 + <span id='step3' class="<%%= step == 3 ? 'active' : '' %><%%= max_step >= 3 ? ' enabled' : ' disabled' %>">3. Review</span>
8 8 </div>
9 9 </div>
10 10
@@ -13,44 +13,50 @@
13 13 <script type="text/template" id="select-template">
14 14 <div class="row">
15 15 <div class="span8">
16   - <div class="row">
17   - <div class="span8">
18   - <div class="alert alert-block">
19   - Place an order for delicious banana bread with your choice of ingredients and if you can't pick up your goodies at my location, I'll bike it right to you (within 5 km from the CN-tower).
20   - </div>
21   - </div>
22   - </div>
23   - <div class="row">
24   - <div class="span7">
25   - <div id="bread-image"></div>
26   - <%% _.each(availableComponents, function(url, name) { %>
27   - <img alt="<%%= name %>" src="<%%= url %>" class="component-image<%%= components[name] ? ' selected' : '' %>"/>
28   - <%% }); %>
29   - <br/>
30   - <%% _.each(availableComponents, function(url, name) { %>
31   - <span class="component-title"><%%=name%></span>
32   - <%% }); %>
33   - </div>
34   - <div class="span1">
35   - <div id="quantity-plus" class="btn btn-primary plus-minus <%%= quantity == 3 ? 'disabled' : '' %> ">+</div>
36   - <p class="quantity"><%%= quantity%></p>
37   - <div id="quantity-minus" class="btn btn-primary plus-minus <%%= quantity == 1 ? 'disabled' : '' %>">-</div>
38   - </div>
  16 + <%% _.each(availableComponents, function(url, name) { %>
  17 + <span class="component-title"><%%=name%></span>
  18 + <%% }); %>
  19 + <br/>
  20 + <%% _.each(availableComponents, function(url, name) { %>
  21 + <img alt="<%%= name %>" src="<%%= url %>" class="component-image<%%= components[name] ? ' selected' : '' %>"/>
  22 + <%% }); %>
  23 + <div id="bread-image"></div>
  24 + <div style="margin: 10px;">
  25 + <span class="lead">
  26 + How many loaves would you like? <span id="qty"><%%= quantity%></span>
  27 + </span>
  28 + <div id="quantity-plus" class="btn btn-mini btn-warning plus-minus <%%= quantity == 3 ? 'disabled' : '' %> ">+</div>
  29 + <div id="quantity-minus" class="btn btn-mini btn-warning plus-minus <%%= quantity == 1 ? 'disabled' : '' %>">-</div>
39 30 </div>
40 31 </div>
41 32
42 33 <div class="span4">
43   - <div class="sidebar">
44   - <p id="order-text" class="lead">You are ordering <span id="order-quantity"><%%= quantity %></span> Banana bread <span id="order-loaf"><%%= loaf %></span><span id="order-components"><%%= order_text %></span>.</p>
45   - <div class="well">
46   - $<%%= loaf_price %> * <%%= quantity%> = $<%%= loaf_price * quantity %>
47   - </div>
48   - </div>
  34 + <div>
  35 + <p id="order-text" class="lead">You are ordering <span id="order-quantity"><%%= quantity %></span> banana bread <strong><%%= loaf %></strong><span id="order-components"><%%= order_text %></span>.</p>
  36 + <p>
  37 + <strong>Pickup location</strong>
  38 + <br/>
  39 + 51 Lower Simcoe: Sat-Sun (10am-3pm)
  40 + </p>
  41 + <p>
  42 + <strong>Delivery</strong>
  43 + <br/>
  44 + Sat-Sun (4pm-7pm): $5
  45 + </p>
  46 + <p>
  47 + <strong>Contact me</strong>
  48 + <br/>
  49 + <a href="mailto:masha.ku@gmail.com">masha.ku@gmail.com</a>
  50 + <br/>
  51 + (647) 830-43-00
  52 + </p>
  53 +
  54 + </div>
49 55
50   - <div id="order-step">
51   - <div id="step-button" class="btn btn-large btn-primary">Next</div>
52   - <p>Next step: enter your address and payment info</p>
53   - </div>
  56 + <div id="order-step">
  57 + <div id="step-button" class="btn btn-large btn-warning">Next</div>
  58 + <p>Next step: choose how you&apos;d like to get your bread</p>
  59 + </div>
54 60 </div>
55 61 </div>
56 62 </script>
@@ -105,7 +111,7 @@
105 111 <div class="control-group">
106 112 <label class="control-label" for="user-comment">Comment</label>
107 113 <div class="controls">
108   - <textarea class="input-large" id="user-comment" name="user-comment" rows="5" ><%%= user_comment%></textarea>
  114 + <textarea class="input-large" id="user-comment" name="user-comment" rows="9" placeholder="Please let me know when you want to get your order!"><%%= user_comment%></textarea>
109 115 </div>
110 116 </div>
111 117 </fieldset>
@@ -127,15 +133,39 @@
127 133 </div>
128 134 </form>
129 135 <div class="span4">
130   - <p id="order-text" class="lead">You are ordering <span id="order-quantity"><%%= quantity %></span> Banana bread <span id="order-loaf"><%%= loaf %></span><span id="order-components"><%%= order_text %></span>.</p>
131   - <div class="well">
132   - $<%%= loaf_price %> * <%%= quantity%> = $<%%= loaf_price * quantity %>
133   - </div>
  136 + <p id="order-text" class="lead">You are ordering <span id="order-quantity"><%%= quantity %></span> banana bread <strong><%%= loaf %></strong><span id="order-components"><%%= order_text %></span>.</p>
  137 + <div class="well">
  138 + <div class="row-fluid show-grid">
  139 + <div class="span8"><%%= quantity%> banana bread <%%= " " + loaf %></div>
  140 + <div class="span4"> $<%%= loaf_price%></div>
  141 + </div>
  142 + <div id="delivery-price" class="row-fluid show-grid">
  143 + <div class="span8">Delivery</div>
  144 + <div class="span4"> $<%%= delivery_price%></div>
  145 + </div>
  146 + <hr/>
  147 + <div class="row-fluid show-grid">
  148 + <div class="span8">Total</div>
  149 + <div id="total" class="span4">
  150 + = $<%%= loaf_price * quantity + (delivery_type == 'pickup' ? 0 : delivery_price) %>
  151 + </div>
  152 + </div>
  153 + </div>
  154 + <p>
  155 + <strong>Pickup location</strong>
  156 + <br/>
  157 + 51 Lower Simcoe: Sat-Sun (10am-3pm)
  158 + </p>
  159 + <p>
  160 + <strong>Delivery</strong>
  161 + <br/>
  162 + Sat-Sun (4pm-7pm): $5
  163 + </p>
134 164
135   - <div id="order-step">
136   - <div id="step-button" class="btn btn-large btn-primary">Next</div>
137   - <p>Next step: confirm your order</p>
138   - </div>
  165 + <div id="order-step">
  166 + <div id="step-button" class="btn btn-large btn-warning">Next</div>
  167 + <p>Next step: review your order</p>
  168 + </div>
139 169 </div>
140 170 </div>
141 171 </script>
@@ -151,17 +181,39 @@
151 181 </div>
152 182 <div class="span4">
153 183 <p id="order-text" class="lead">You are ordering <span id="order-quantity"><%%= quantity %></span> Banana bread <span id="order-loaf"><%%= loaf %></span><span id="order-components"><%%= order_text %></span>.</p>
154   - <div class="well">
155   - $<%%= loaf_price %> * <%%= quantity%> = $<%%= loaf_price * quantity %>
156   - </div>
157   - <div id="filler"></div>
158   - <div id="order-step">
159   - <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
  184 + <div class="well">
  185 + <div class="row-fluid show-grid">
  186 + <div class="span8"><%%= quantity%> banana bread <%%= " " + loaf %></div>
  187 + <div class="span4"> $<%%= loaf_price%></div>
  188 + </div>
  189 + <div id="delivery-price" class="row-fluid show-grid">
  190 + <div class="span8">Delivery</div>
  191 + <div class="span4"> $<%%= delivery_price%></div>
  192 + </div>
  193 + <hr/>
  194 + <div class="row-fluid show-grid">
  195 + <div class="span8">Total</div>
  196 + <div id="total" class="span4">
  197 + = $<%%= loaf_price * quantity + (delivery_type == 'pickup' ? 0 : delivery_price) %>
  198 + </div>
  199 + </div>
  200 + </div>
  201 + <p>
  202 + <strong>Pickup location</strong>
  203 + <br/>
  204 + 51 Lower Simcoe: Sat-Sun (10am-3pm)
  205 + </p>
  206 + <p>
  207 + <strong>Delivery</strong>
  208 + <br/>
  209 + Sat-Sun (4pm-7pm): $5
  210 + </p> <div id="order-step">
  211 + <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
160 212 <div id="payment">
161 213 <input type="hidden" name="cmd" value="_s-xclick">
162 214 <input type="hidden" name="encrypted" value="<%%= paypal_encrypted %>">
163   - <input type="submit" class="btn btn-large btn-primary" value="Pay with PayPal">
164   - <p>You will be redirected to PayPal</p>
  215 + <input type="submit" class="btn btn-large btn-warning" value="Pay with PayPal">
  216 + <!--<p>You will be redirected to PayPal</p>--!>
165 217 </div>
166 218 </form>
167 219 </div>
30 app/views/static_pages/about.html.erb
... ... @@ -0,0 +1,30 @@
  1 +<div class="row">
  2 + <div class="span8">
  3 + <div style="margin: 20px;">
  4 + <p class="lead">
  5 + I bake.
  6 + </p>
  7 + </div>
  8 + </div>
  9 + <div class="span4">
  10 + <div style="margin: 20px;">
  11 + <p>
  12 + <strong>Pickup location</strong>
  13 + <br/>
  14 + 51 Lower Simcoe: Sat-Sun (10am-3pm)
  15 + </p>
  16 + <p>
  17 + <strong>Delivery</strong>
  18 + <br/>
  19 + Sat-Sun (4pm-7pm): $5
  20 + </p>
  21 + <p>
  22 + <strong>Contact me</strong>
  23 + <br/>
  24 + <a href="mailto:masha.ku@gmail.com">masha.ku@gmail.com</a>
  25 + <br/>
  26 + (647) 830-43-00
  27 + </p>
  28 + </div>
  29 + </div>
  30 +</div>
15 app/views/static_pages/thank_you.html.erb
@@ -11,18 +11,3 @@
11 11 <a href=<%= root_url %>> Home </a>
12 12 </p>
13 13 </div>
14   -
15   -<!--
16   -<table id="table">
17   -
18   -<tr>
19   - <td class='left-column'>
20   - THANK YOU!
21   - </td>
22   -
23   - <td class='right-column'>
24   -
25   - </td>
26   -</tr>
27   -
28   -</table> -->
41 certs/paypal_cert.pem
... ... @@ -1,23 +1,22 @@
1   -sandbox_web_api
  1 +live_api
2 2 -----BEGIN CERTIFICATE-----
3   -MIIDoTCCAwqgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBmDELMAkGA1UEBhMCVVMx
4   -EzARBgNVBAgTCkNhbGlmb3JuaWExETAPBgNVBAcTCFNhbiBKb3NlMRUwEwYDVQQK
5   -EwxQYXlQYWwsIEluYy4xFjAUBgNVBAsUDXNhbmRib3hfY2VydHMxFDASBgNVBAMU
6   -C3NhbmRib3hfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMB4XDTA0
7   -MDQxOTA3MDI1NFoXDTM1MDQxOTA3MDI1NFowgZgxCzAJBgNVBAYTAlVTMRMwEQYD
8   -VQQIEwpDYWxpZm9ybmlhMREwDwYDVQQHEwhTYW4gSm9zZTEVMBMGA1UEChMMUGF5
9   -UGFsLCBJ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ZgxCzAJBgNV
  16 +BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMREwDwYDVQQHEwhTYW4gSm9zZTEV
  17 +MBMGA1UEChMMUGF5UGFsLCBJbmMuMRYwFAYDVQQLFA1zYW5kYm94X2NlcnRzMRQw
  18 +EgYDVQQDFAtzYW5kYm94X2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNv
  19 +bYIBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAFc288DYGX+GX2+W
  20 +P/dwdXwficf+rlG+0V9GBPJZYKZJQ069W/ZRkUuWFQ+Opd2yhPpneGezmw3aU222
  21 +CGrdKhOrBJRRcpoO3FjHHmXWkqgbQqDWdG7S+/l8n1QfDPp+jpULOrcnGEUY41Im
  22 +jZJTylbJQ1b5PBBjGiP0PpK48cdF
  23 +-----END CERTIFICATE-----
2  config/routes.rb
@@ -8,6 +8,8 @@
8 8 resources :payment_notifications
9 9
10 10 match 'thank_you', to: 'static_pages#thank_you'
  11 + match 'about', to: 'static_pages#about'
  12 + match 'contacts', to: 'static_pages#contacts'
11 13
12 14 match 'paypal_encrypt' => "orders#paypal_encrypt", :via => [:get, :post]
13 15

0 comments on commit 3211c05

Please sign in to comment.
Something went wrong with that request. Please try again.