diff --git a/src/core/migrations/0007_product_subtitle.py b/src/core/migrations/0007_product_subtitle.py new file mode 100644 index 0000000..2d98dce --- /dev/null +++ b/src/core/migrations/0007_product_subtitle.py @@ -0,0 +1,18 @@ +# Generated by Django 4.0.2 on 2022-04-30 15:52 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0006_alter_order_options_order_shipping_total'), + ] + + operations = [ + migrations.AddField( + model_name='product', + name='subtitle', + field=models.CharField(blank=True, max_length=250), + ), + ] diff --git a/src/core/models.py b/src/core/models.py index dabd4df..1141f51 100644 --- a/src/core/models.py +++ b/src/core/models.py @@ -42,6 +42,7 @@ class ProductManager(models.Manager): class Product(models.Model): name = models.CharField(max_length=250) + subtitle = models.CharField(max_length=250, blank=True) description = models.TextField(blank=True) sku = models.CharField(max_length=255, unique=True) price = models.DecimalField( diff --git a/src/static/images/pt_coffee_01.jpg b/src/static/images/pt_coffee_01.jpg new file mode 100644 index 0000000..7157e91 Binary files /dev/null and b/src/static/images/pt_coffee_01.jpg differ diff --git a/src/static/images/pt_coffee_02.jpg b/src/static/images/pt_coffee_02.jpg new file mode 100644 index 0000000..049cb19 Binary files /dev/null and b/src/static/images/pt_coffee_02.jpg differ diff --git a/src/static/images/pt_coffee_03.jpg b/src/static/images/pt_coffee_03.jpg new file mode 100644 index 0000000..656d916 Binary files /dev/null and b/src/static/images/pt_coffee_03.jpg differ diff --git a/src/static/images/pt_coffee_04.jpg b/src/static/images/pt_coffee_04.jpg new file mode 100644 index 0000000..be10fef Binary files /dev/null and b/src/static/images/pt_coffee_04.jpg differ diff --git a/src/static/images/pt_coffee_05.png b/src/static/images/pt_coffee_05.png new file mode 100644 index 0000000..9a621e0 Binary files /dev/null and b/src/static/images/pt_coffee_05.png differ diff --git a/src/static/styles/main.css b/src/static/styles/main.css index 353869f..a5c4ba4 100644 --- a/src/static/styles/main.css +++ b/src/static/styles/main.css @@ -451,17 +451,13 @@ section:not(:last-child) { .site__banner { background-color: rgba(0, 0, 0, 0.44); background-blend-mode: multiply; - background-image: url("/static/images/site_banner.jpg"); background-size: cover; background-position: center; color: white; text-align: center; - padding: 4rem 1rem; + padding: 2rem 1rem; font-family: 'Vollkorn', serif; } -.site__banner h1 { - font-size: 3.5rem; -} .site__banner p { text-transform: lowercase; @@ -469,6 +465,19 @@ section:not(:last-child) { font-size: 2rem; } +.site__banner--site { + background-image: url("/static/images/site_banner.jpg"); +} +.site__banner--fairtrade { + background-image: url("/static/images/fairtrade_banner.jpg"); +} +.site__banner--reviews { + background-image: url("/static/images/reviews_banner.jpg"); +} +.site__banner--about { + background-image: url("/static/images/coffee_banner.jpg"); +} + /* Messages ========================================================================== */ .messages { diff --git a/src/storefront/cart.py b/src/storefront/cart.py index 0cb41b8..b2eb9f0 100644 --- a/src/storefront/cart.py +++ b/src/storefront/cart.py @@ -16,7 +16,8 @@ from core import ( OrderStatus, ShippingMethodType, ShippingService, - ShippingContainer + ShippingContainer, + CoffeeGrind ) from .payments import CreateOrder @@ -172,14 +173,18 @@ class Cart: return response def build_bulk_list(self, order): - bulk_list = [OrderLine( - order=order, - product=item['product'], - customer_note=f"{item['variations']}", - unit_price=item['price'], - quantity=item['quantity'], - tax_rate=2, - ) for item in self] + bulk_list = [] + + for item in self: + for key, value in item['variations'].items(): + bulk_list.append(OrderLine( + order=order, + product=item['product'], + customer_note=next((v[1] for i, v in enumerate(CoffeeGrind.GRIND_CHOICES) if v[0] == key), None), + unit_price=item['price'], + quantity=value['quantity'], + tax_rate=2, + )) return bulk_list diff --git a/src/storefront/templates/storefront/about.html b/src/storefront/templates/storefront/about.html index b4be59b..6f033b9 100644 --- a/src/storefront/templates/storefront/about.html +++ b/src/storefront/templates/storefront/about.html @@ -1,50 +1,60 @@ {% extends "base.html" %} {% load static %} +{% block head_title %}About | {% endblock %} + {% block content %} +
+

About Port Townsend
Roasting Co.

+
-
-

About PT Coffee

-
-
-
- Banner -
-

We love coffee!

-

If you’ve found Port Townsend Coffee Roasting Co., you probably love coffee so much that you seek out the best tasting, Certified Fair Trade Organic coffees available.

+

If you’ve found Port Townsend Roasting Co., you probably love coffee so much that you seek out the best tasting, Certified Fair Trade Organic coffees available.

You’ve probably been around coffee for years, perhaps starting with Specialty Coffees in the 1980’s, and know your way around fairly well. How and where coffee is grown and harvested, how it’s roasted, how to brew it. You value fair, guaranteed wages for growers and sustainable stewardship of the land where it’s grown.

No matter how much you drink, if you’re like us, great coffee is an important perk in your life. You are not alone in this… coffee is the one of the world’s most heavily traded commodities. In addition to the impact it has as a crop on the economies of producing countries, the cafe and coffee house industry touches millions of lives everyday, worldwide, as well.

-

We love the place coffee takes in conversation, culture and commerce. We seek out the world’s rarest coffees for taste and consistency. We roast and blend coffees at Port Townsend Coffee Roasting Co. with the hope that you will enjoy every cup.

+

We love the place coffee takes in conversation, culture and commerce. We seek out the world’s rarest coffees for taste and consistency. We roast and blend coffees at Port Townsend Roasting Co. with the hope that you will enjoy every cup.

+
+ +

Style of roast

We roast in a European style, specifically similar to that of central Italy. The blending and roasting process determines the flavor and body of the coffee equally as much as the kinds of beans used. Italians are noted for their blending skills.

We blend and roast to suit our own personal tastes, creating a smooth, less acidic, sweeter flavor. Our coffee has a perceivably heavy feeling in the mouth. Our roasts take longer and require attention. Controlling air flow around the beans in the roasting drum is crucial in developing the flavor and body of the coffees we roast. At times in the roasting, no heat at all is applied to the beans. Done correctly, this can smooth out an otherwise acidic or snappy roast.

For those who are interested in comparing roasting styles: This is in contrast to the style of many roasters here in the Pacific Northwest. They tend towards lighter, faster roasts with different air flows around the beans, which produces a more acidic, lighter-bodied coffee. This style has many fans. It produces coffees in which the nuances of singular flavors can be discerned, as nuances of flavor can be picked out in wines. However, we prefer smoother, heavier and more rounded flavors and strive to capture them in my roasting.

+
+ +

Your Coffee Primer: what gives Port Townsend Coffee its qualities?

We roast Port Townsend Coffee in small batches (under 30 lbs), engendering uniformity in the roast level. Coffee roasted in big batches may be unevenly roasted.

Port Townsend Coffee is air cooled, as opposed to water cooled. Many of the larger roasters must spray water on the coffee as it comes out of the roasting chamber, to cool it down. This affects the quality of the coffee and its ability to remain fresh if the water is not properly evaporated by the heat from the coffee.

We roast our coffee much more slowly than most roasters, especially coffee roasters in the Pacific Northwest. The slower roasting process allows for greater bean development. The bean is evenly roasted right to the center and our process mutes some of the acidic compounds, which smooths out the flavor.

Port Townsend Coffee is known for roasts that are darker than others available in the Northwest. Due to our roasting process, which emphasizes patience with the beans as well as air flow adjustments, the darker roasts are smooth and syrupy. Dark roasts from other companies can taste bitter, or slightly burnt due to the size and speed of the roast.

We have been buying beans from the same brokers for many years. They understand the flavor profiles we prefer and seek to accommodate our needs.

-
-
Fair Trade and Organic
-

We pay a steep premium for these beans, which are typically from smaller farms that are organized into co-ops. These farms take pride in their coffees, as the farmers make a living wage and their families are able to live in a healthier, more secure environment than farmers who grow a conventional coffee crop. The quality of our coffee is consistent, in part due to the quality of organic and fair trade beans.

-
Freshness and Storage
-

At Port Townsend Coffee, we roast a batch and within 15 minutes, package it in one-way valve bags so the coffee can “de-gas.” The valve allows the gas to escape, but prevents oxygen from coming into contact with the coffee (oxygen causes coffee to go stale). Many roasters allow their coffee to ‘de-gas’ by holding it in large bins for several days before packaging it. This procedure can cause the taste to go flat.

-
The Diedrich Roaster
-

We have used 5 different Diedrich Coffee Roasters since 1985. Compared to other machines, they produce an evenly developed roast. The infrared burners are much gentler than the direct flame burners on most other roasters, and the air flow control give a greater range of what can be done for the beans.

-
Freshness
-

Fresh coffee is better! We use one-way valve bags to the coffee is flushed with protective carbon dioxide and protected from the deteriorating effects of oxygen.

-

The best coffee is fresh from the roaster; however, the coffee in our valve bags keeps its flavor intact for a month without a perceivable taste difference to most people.

-

We recommend you buy enough coffee for a one-month supply. Keep it in the valve bags, in a cool place—such as a lower kitchen cabinet. Once the bag is opened, keep air out by rolling down the top of the bag and secure with a rubber band. Remember, air (oxidation) will cause your beans to go stale!

-

We also recommend you buy whole beans and get yourself a coffee grinder. Grinding exposes much more surface area to oxygen.

-

Last, never put coffee beans in the refrigerator or freezer, as this speeds up oxidation.

-
+
Fair Trade and Organic
+

We pay a steep premium for these beans, which are typically from smaller farms that are organized into co-ops. These farms take pride in their coffees, as the farmers make a living wage and their families are able to live in a healthier, more secure environment than farmers who grow a conventional coffee crop. The quality of our coffee is consistent, in part due to the quality of organic and fair trade beans.

+
+ +
+
Freshness and Storage
+

At Port Townsend Coffee, we roast a batch and within 15 minutes, package it in one-way valve bags so the coffee can “de-gas.” The valve allows the gas to escape, but prevents oxygen from coming into contact with the coffee (oxygen causes coffee to go stale). Many roasters allow their coffee to ‘de-gas’ by holding it in large bins for several days before packaging it. This procedure can cause the taste to go flat.

+
+ +
+
The Diedrich Roaster
+

We have used 5 different Diedrich Coffee Roasters since 1985. Compared to other machines, they produce an evenly developed roast. The infrared burners are much gentler than the direct flame burners on most other roasters, and the air flow control give a greater range of what can be done for the beans.

+
Freshness
+

Fresh coffee is better! We use one-way valve bags to the coffee is flushed with protective carbon dioxide and protected from the deteriorating effects of oxygen.

+

The best coffee is fresh from the roaster; however, the coffee in our valve bags keeps its flavor intact for a month without a perceivable taste difference to most people.

+

We recommend you buy enough coffee for a one-month supply. Keep it in the valve bags, in a cool place—such as a lower kitchen cabinet. Once the bag is opened, keep air out by rolling down the top of the bag and secure with a rubber band. Remember, air (oxidation) will cause your beans to go stale!

+

We also recommend you buy whole beans and get yourself a coffee grinder. Grinding exposes much more surface area to oxygen.

+

Last, never put coffee beans in the refrigerator or freezer, as this speeds up oxidation.

+
+ +
{% endblock %} diff --git a/src/storefront/templates/storefront/cart_detail.html b/src/storefront/templates/storefront/cart_detail.html index 2526911..555e307 100644 --- a/src/storefront/templates/storefront/cart_detail.html +++ b/src/storefront/templates/storefront/cart_detail.html @@ -1,5 +1,7 @@ {% extends "base.html" %} +{% block head_title %}Cart | {% endblock %} + {% block content %}
diff --git a/src/storefront/templates/storefront/checkout_address.html b/src/storefront/templates/storefront/checkout_address.html index 2a05980..29043ab 100644 --- a/src/storefront/templates/storefront/checkout_address.html +++ b/src/storefront/templates/storefront/checkout_address.html @@ -1,6 +1,8 @@ {% extends "base.html" %} {% load static %} +{% block head_title %}Checkout | {% endblock %} + {% block content %}
diff --git a/src/storefront/templates/storefront/contact_form.html b/src/storefront/templates/storefront/contact_form.html index 68c2e89..6e5b12b 100644 --- a/src/storefront/templates/storefront/contact_form.html +++ b/src/storefront/templates/storefront/contact_form.html @@ -1,13 +1,21 @@ {% extends "base.html" %} +{% block head_title %}Contact | {% endblock %} + {% block content %} +
+

Contact us

+
-

Contact us

Problem with your online order or have a question?

-

Please contact us, we’re happy to help you.

+

+ Please contact us, we’re happy to help you over the phone
+ (360) 385-5856 Mon-Fri between 9:00 am and 5:00 pm Pacific Time. +

+

Or send us a message using the form below and we'll email you back as soon as we can.

{% csrf_token %} {{form.as_p}} diff --git a/src/storefront/templates/storefront/customer_detail.html b/src/storefront/templates/storefront/customer_detail.html index 07a25e2..5f2ff72 100644 --- a/src/storefront/templates/storefront/customer_detail.html +++ b/src/storefront/templates/storefront/customer_detail.html @@ -1,6 +1,8 @@ {% extends "base.html" %} {% load static %} +{% block head_title %}Account | {% endblock %} + {% block content %}
diff --git a/src/storefront/templates/storefront/fairtrade.html b/src/storefront/templates/storefront/fairtrade.html index 7799b75..56b7e0f 100644 --- a/src/storefront/templates/storefront/fairtrade.html +++ b/src/storefront/templates/storefront/fairtrade.html @@ -1,16 +1,13 @@ {% extends "base.html" %} {% load static %} +{% block head_title %}Fair Trade | {% endblock %} + {% block content %} +
+

Fair Trade & Organic

+
-
-

Fair Trade and Organic

-
-
-
- Banner -
-

We value fair, guaranteed wages for growers and sustainable stewardship of the land where it’s grown. We pay a steep premium for these beans, which are typically from smaller farms that are organized into co-ops. These farms take pride in their coffees, as the farmers make a living wage and their families are able to live in a healthier, more secure environment than farmers who grow a conventional coffee crop. The quality of our coffee is consistent, in part due to the quality of organic and fair trade beans.

diff --git a/src/storefront/templates/storefront/order_form.html b/src/storefront/templates/storefront/order_form.html index 503afec..037e91d 100644 --- a/src/storefront/templates/storefront/order_form.html +++ b/src/storefront/templates/storefront/order_form.html @@ -1,6 +1,8 @@ {% extends "base.html" %} {% load static %} +{% block head_title %}Checkout | {% endblock %} + {% block head %} diff --git a/src/storefront/templates/storefront/payment_cancelled.html b/src/storefront/templates/storefront/payment_cancelled.html index f05ec95..ba3eebf 100644 --- a/src/storefront/templates/storefront/payment_cancelled.html +++ b/src/storefront/templates/storefront/payment_cancelled.html @@ -1,8 +1,10 @@ {% extends "base.html" %} +{% block head_title %}Payment Cancelled | {% endblock %} + {% block content %}

Payment declined

There was a problem collecting payment.

-{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/src/storefront/templates/storefront/payment_done.html b/src/storefront/templates/storefront/payment_done.html index 76491b3..a87db7d 100644 --- a/src/storefront/templates/storefront/payment_done.html +++ b/src/storefront/templates/storefront/payment_done.html @@ -1,8 +1,10 @@ {% extends "base.html" %} +{% block head_title %}Payment Success | {% endblock %} + {% block content %}

Payment was successful

Thank you for your order!

-{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/src/storefront/templates/storefront/product_detail.html b/src/storefront/templates/storefront/product_detail.html index 2f956f2..3594102 100644 --- a/src/storefront/templates/storefront/product_detail.html +++ b/src/storefront/templates/storefront/product_detail.html @@ -1,6 +1,8 @@ {% extends "base.html" %} {% load static %} +{% block head_title %}{{ product.name }} | {% endblock %} + {% block head %} {% endblock %} @@ -17,6 +19,7 @@

{{product.name}}

+

{{product.subtitle}}

{{product.description}}

Fair trade

${{product.price}}

diff --git a/src/storefront/templates/storefront/product_list.html b/src/storefront/templates/storefront/product_list.html index d0b3822..cb21630 100644 --- a/src/storefront/templates/storefront/product_list.html +++ b/src/storefront/templates/storefront/product_list.html @@ -1,14 +1,16 @@ {% extends 'base.html' %} {% load static %} +{% block head_title %}Shop | {% endblock %} + {% block head %} {% endblock %} {% block content %} -
-

Better, not Bitter

-

ORGANIC COFFEE, SLOW ROASTED, ITALIAN STYLE

+
+

Organic Coffee, Slow Roasted, Italian Style

+

Better, not Bitter

@@ -19,6 +21,7 @@

{{ product.name }}

+
{{ product.subtitle }}

{{product.description|truncatewords:20}}

${{product.price}} | {{product.weight.oz|floatformat}}oz

diff --git a/src/storefront/templates/storefront/reviews.html b/src/storefront/templates/storefront/reviews.html index ec87d2e..d1f422b 100644 --- a/src/storefront/templates/storefront/reviews.html +++ b/src/storefront/templates/storefront/reviews.html @@ -1,16 +1,14 @@ {% extends 'base.html' %} {% load static %} +{% block head_title %}Reviews | {% endblock %} + {% block content %} +
+

Reviews

+

What people are saying

+
-
-

Reviews

-
-
-
- Banner -
-
Really good coffee. That's all there is to say. Supposedly the pour over coffee is the best way to go. It is definitely nothing like a Starbucks, and in this case, that's a very good thing! diff --git a/src/storefront/views.py b/src/storefront/views.py index 1a47477..f3a9b76 100644 --- a/src/storefront/views.py +++ b/src/storefront/views.py @@ -234,6 +234,8 @@ class OrderCreateView(CreateView): return JsonResponse(data) +@csrf_exempt +@require_POST def paypal_order_transaction_capture(request, transaction_id): if request.method =="POST": data = CaptureOrder().capture_order(transaction_id) diff --git a/src/templates/base.html b/src/templates/base.html index 2ed1b62..0dec078 100644 --- a/src/templates/base.html +++ b/src/templates/base.html @@ -7,7 +7,8 @@ - {% block head_title %}{% endblock %} Port Townsend Coffee + {% block head_title %}{% endblock %} Port Townsend Roasting Co. + @@ -88,13 +89,15 @@

Problem with your online order or have a question?
- Please contact us, we’re happy to help you.
+ Please contact us, we’re happy to help you over the phone at (360) 385-5856
+ Mon-Fri between 9:00 am and 5:00 pm Pacific Time.

854 East Park Ave. Suite 1, Port Townsend, WA 98368

- Copyright © 2016-{% now "Y" %} Better Living Food Company Inc.
- Contact | Fair Trade | Organic -
+ Better Living Food Company Inc.℠
+ Contact | Fair Trade | Organic +
+ Website by Nathan Chapman

Fair trade