urlpatterns = [
url("^shop/", include("cartridge.shop.urls")),
- url("^product/(?P<slug>.*)/$", ProductDetailView.as_view(), name='shop_product'),
]
from organization.projects.models import *
from organization.core.views import *
-
-
-# class ProjectListView(ListView):
-#
-# model = Project
-# template_name='projects/project_list.html'
-#
-#
-# class ProjectDetailView(SlugMixin, DetailView):
-#
-# model = Project
-# template_name='projects/project_detail.html'
-# context_object_name = 'project'
-
-
-class ProductDetailView(SlugMixin, DetailView):
-
- pass
# "mezzanine.galleries",
"mezzanine.twitter",
"mezzanine.accounts",
+ "cartridge.shop",
# "mezzanine.mobile",
# "eve",
'djangobower',
"meta",
"mezzanine_agenda",
- "cartridge.shop",
# "orderable",
"organization.core",
"organization.media",
--- /dev/null
+{% extends "base.html" %}
--- /dev/null
+{% extends "shop/checkout.html" %}
+{% load staticfiles i18n mezzanine_tags %}
+
+{% block extra_head %}
+{{ block.super }}
+<script src="{% static "cartridge/js/shipping_fields.js" %}"></script>
+{% endblock %}
+
+{% block fields %}
+{% if request.cart.has_items %}
+{% if not request.user.is_authenticated %}
+{% ifinstalled mezzanine.accounts %}
+<p>
+{% url "login" as login_url %}
+{% url "signup" as signup_url %}
+{% with request.path as next %}
+{% blocktrans %}
+If you have an existing account or would like to create one, please
+<a href="{{ login_url }}?next={{ next }}">log in</a> or
+<a href="{{ signup_url }}?next={{ next }}">sign up</a>.
+{% endblocktrans %}
+{% endwith %}
+</p>
+{% endifinstalled %}
+{% endif %}
+
+{% errors_for form %}
+
+<fieldset>
+ <legend>{% trans "Billing Details" %}</legend>
+ {% fields_for form.billing_detail_fields %}
+</fieldset>
+
+<fieldset>
+ <legend>{% trans "Delivery Details" %}</legend>
+ {% fields_for form.same_billing_shipping_field %}
+ <div id="shipping_fields">{% fields_for form.shipping_detail_fields %}</div>
+ {% fields_for form.additional_instructions_field %}
+ {% fields_for form.remember_field %}
+</fieldset>
+
+{% if not settings.SHOP_CHECKOUT_STEPS_SPLIT and settings.SHOP_PAYMENT_STEP_ENABLED %}
+{% include "shop/includes/payment_fields.html" %}
+{% endif %}
+
+{% fields_for form.other_fields %}
+
+{% endif %}
+{% endblock %}
--- /dev/null
+{% extends "shop/base.html" %}
+{% load mezzanine_tags shop_tags i18n %}
+
+{% block meta_title %}{% trans "Your Cart" %}{% endblock %}
+{% block title %}{% trans "Your Cart" %}{% endblock %}
+{% block body_id %}cart{% endblock %}
+
+{% block breadcrumb_menu %}
+{{ block.super }}
+<li>{% trans "Your Cart" %}</li>
+{% endblock %}
+
+{% block main %}
+{% if cart_formset.forms %}
+<form method="post" class="cart-form">
+{% csrf_token %}
+{% if cart_formset.errors %}
+{% for error in cart_formset.errors %}
+{% if error.values.0 %}{{ error.values.0 }}{% endif %}
+{% endfor %}
+{% endif %}
+{{ cart_formset.management_form }}
+<table class="table table-striped">
+ <thead>
+ <tr>
+ <th colspan="2" class="left">{% trans "Item" %}</th>
+ <th>{% trans "Unit Price" %}</th>
+ <th class="center">{% trans "Qty" %}</th>
+ <th>{% trans "Price" %}</th>
+ <th class="center">{% trans "Remove?" %}</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for form in cart_formset.forms %}
+ {% with form.instance as item %}
+ <tr>
+ <td width="30">
+ {{ form.id }}
+ {% if item.image %}
+ <a href="{{ item.get_absolute_url }}">
+ <img alt="{{ item.description }}" src="{{ MEDIA_URL }}{% thumbnail item.image 30 30 %}">
+ </a>
+ {% endif %}
+ </td>
+ <td class="left">
+ <a href="{{ item.get_absolute_url }}">{{ item.description }}</a>
+ </td>
+ <td>{{ item.unit_price|currency }}</td>
+ <td class="quantity">{{ form.quantity }}</td>
+ <td>{{ item.total_price|currency }}</td>
+ <td class="center">{{ form.DELETE }}</td>
+ </tr>
+ {% endwith %}
+ {% endfor %}
+ <tr>
+ <td colspan="5">{% order_totals %}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<div class="form-actions">
+ <a href="{% url "shop_checkout" %}" class="btn btn-primary btn-lg pull-right">
+ {% if request.session.order.step %}{% trans "Return to Checkout" %}{% else %}{% trans "Go to Checkout" %}{% endif %}
+ </a>
+ <input type="submit" name="update_cart" class="btn btn-default btn-lg pull-left" value="{% trans "Update Cart" %}">
+</div>
+</form>
+
+{% if discount_form %}
+<form method="post" class="discount-form col-md-12 text-right">
+ {% fields_for discount_form %}
+ <input type="submit" class="btn btn-default" value="{% trans "Apply" %}">
+</form>
+{% endif %}
+
+{% if settings.SHOP_USE_UPSELL_PRODUCTS %}
+{% with request.cart.upsell_products as upsell_products %}
+{% if upsell_products %}
+<h2>{% trans "You may also like:" %}</h2>
+<div class="row">
+ {% for product in upsell_products %}
+ <div class="col-xs-6 col-sm-4 col-md-3 product-thumb">
+ <a class="thumbnail" href="{{ product.get_absolute_url }}">
+ {% if product.image %}
+ <img src="{{ MEDIA_URL }}{% thumbnail product.image 90 90 %}">
+ {% endif %}
+ <div class="caption">
+ <h6>{{ product }}</h6>
+ <div class="price-info">
+ {% if product.has_price %}
+ {% if product.on_sale %}
+ <span class="old-price">{{ product.unit_price|currency }}</span>
+ {% trans "On sale:" %}
+ {% endif %}
+ <span class="price">{{ product.price|currency }}</span>
+ {% else %}
+ <span class="coming-soon">{% trans "Coming soon" %}</span>
+ {% endif %}
+ </div>
+ </div>
+ </a>
+ </div>
+ {% endfor %}
+</div>
+{% endif %}
+{% endwith %}
+{% endif %}
+
+{% else %}
+<p>{% trans "Your Cart is empty." %}</p>
+{% endif %}
+{% endblock %}
--- /dev/null
+{% extends "shop/base.html" %}
+{% load shop_tags mezzanine_tags i18n %}
+
+{% block meta_title %}{% trans "Checkout" %} - {{ step_title }}{% endblock %}
+{% block title %}{% trans "Checkout" %} - {% trans "Step" %} {{ step }} {% trans "of" %} {{ steps|length }}{% endblock %}
+{% block body_id %}checkout{% endblock %}
+
+{% block extra_head %}
+<script>
+var _gaq = [['_trackPageview', '{{ request.path }}{{ step_url }}/']];
+$(function() {$('.middle :input:visible:enabled:first').focus();});
+</script>
+{% endblock %}
+
+{% block breadcrumb_menu %}
+{% for step in steps %}
+<li>
+ {% if step.title == step_title %}
+ <strong>{{ step.title }}</strong>
+ {% else %}
+ {{ step.title }}
+ {% endif %}
+</li>
+{% endfor %}
+<li>{% trans "Complete" %}</li>
+{% endblock %}
+
+{% block main %}
+
+{% block before-form %}{% endblock %}
+<div class="row">
+<form method="post" class="col-md-8 checkout-form">
+ {% csrf_token %}
+
+ {% block fields %}{% endblock %}
+
+ {% block nav-buttons %}
+ {% if request.cart.has_items %}
+ <div class="form-actions">
+ <input type="submit" class="btn btn-lg btn-primary pull-right" value="{% trans "Next" %}">
+ {% if not CHECKOUT_STEP_FIRST %}
+ <input type="submit" class="btn btn-lg btn-default pull-left" name="back" value="{% trans "Back" %}">
+ {% endif %}
+ </div>
+ {% else %}
+ <p>{% trans "Your cart is empty." %}</p>
+ <p>{% trans "This may be due to your session timing out after a period of inactivity." %}</p>
+ <p>{% trans "We apologize for the inconvenience." %}</p>
+ <br>
+ <p><a class="btn btn-lg btn-primary" href="{% url "page" "shop" %}">{% trans "Continue Shopping" %}</a></p>
+ {% endif %}
+ {% endblock %}
+
+</form>
+
+{% if request.cart.has_items %}
+<div class="col-md-4">
+ <div class="panel panel-default checkout-panel">
+ <div class="panel-body">
+ <ul class="media-list">
+ {% for item in request.cart %}
+ <li class="media">
+ {% if item.image %}
+ <img class="pull-left" alt="{{ item.description }}" src="{{ MEDIA_URL }}{% thumbnail item.image 30 30 %}">
+ {% endif %}
+ <div class="media-body">
+ {{ item.quantity }} x {{ item.description }}
+ <span class="price">{{ item.total_price|currency }}</span>
+ </div>
+ </li>
+ {% endfor %}
+ </ul>
+ {% order_totals %}
+ <br style="clear:both;">
+ <a class="btn btn-default" href="{% url "shop_cart" %}">{% trans "Edit Cart" %}</a>
+ </div>
+ </div>
+</div>
+{% endif %}
+
+{% block after-form %}{% endblock %}
+</div>
+{% endblock %}
--- /dev/null
+{% extends "shop/base.html" %}
+{% load i18n %}
+
+{% block body_id %}complete{% endblock %}
+
+{% block meta_title %}{% trans "Order Complete" %}{% endblock %}
+
+{% block footer_js %}
+{{ block.super }}
+{% if settings.GOOGLE_ANALYTICS_ID and not request.user.is_staff %}
+<script>
+
+var decimal = function(amount) {
+ if (amount.toString().indexOf('.') == -1) {
+ amount += '.00';
+ }
+ return String(amount);
+};
+
+ga('require', 'ecommerce'); // Load the ecommerce plug-in.
+
+// Add transaction data.
+ga('ecommerce:addTransaction', {
+ 'id': '{{ order.id }}',
+ 'affiliation': '',
+ 'revenue': decimal({{ order.item_total }}{% if order.discount_total %} - {{ order.discount_total }}{% endif %}),
+ 'shipping': decimal({{ order.shipping_total }}),
+ 'tax': decimal({% if order.tax_total %}{{ order.tax_total }}{% else %}0{% endif %})
+});
+
+// Add item data for each item.
+{% for item in items %}
+ga('ecommerce:addItem', {
+ // order ID (not item)
+ 'id': '{{ order.id }}',
+ 'name': '{{ item.name|escapejs }}',
+ 'sku': '{{ item.sku }}',
+ 'category': '{{ item.description|escapejs }}',
+ // unit price (not total)
+ 'price': decimal({{ item.unit_price }}),
+ 'quantity': '{{ item.quantity }}'
+});
+{% endfor %}
+
+// submits transaction to the Analytics servers
+ga('ecommerce:send');
+
+</script>
+{% endif %}
+{% endblock %}
+
+{% block title %}{% trans "Order Complete" %}{% endblock %}
+
+{% block breadcrumb_menu %}
+{% for step in steps %}
+<li>{{ step.title }}</li>
+{% endfor %}
+<li><strong>{% trans "Complete" %}</strong></li>
+{% endblock %}
+
+
+{% block main %}
+<p>{% trans "Thank you for shopping with us, your order is complete." %}</p>
+<p>{% trans "We've sent you a receipt via email." %}</p>
+<p>{% trans "You can also view your invoice using one of the links below." %}</p>
+<br>
+<form class="order-complete-form" method="post" action="{% url "shop_invoice_resend" order.id %}?next={{ request.path }}">
+ {% csrf_token %}
+ {% if has_pdf %}
+ <a class="btn btn-primary" href="{% url "shop_invoice" order.id %}?format=pdf">{% trans "Download PDF invoice" %}</a>
+ {% endif %}
+ <a class="btn btn-default" target="_blank" href="{% url "shop_invoice" order.id %}">{% trans "View invoice in your browser" %}</a>
+ <input type="submit" class="btn btn-default" value="{% trans "Re-send order email" %}">
+</form>
+{% endblock %}
--- /dev/null
+{% extends "shop/checkout.html" %}
+{% load i18n shop_tags %}
+
+{% block fields %}
+{% if request.cart.has_items %}
+
+<div class="confirmation col-md-6">
+ <div class="panel panel-default">
+ <div class="panel-body">
+ <h3>{% trans "Billing Details" %}</h3>
+ <ul class="list-unstyled">
+
+ {% for field, value in form.billing_detail_fields.values %}
+ <li><label>{{ field }}:</label> {{ value }}</li>
+ {% endfor %}
+
+ </ul>
+ </div>
+ </div>
+</div>
+
+<div class="confirmation col-md-6">
+ <div class="panel panel-default">
+ <div class="panel-body">
+ <h3>{% trans "Shipping Details" %}</h3>
+ <ul class="list-unstyled">
+
+ {% for field, value in form.shipping_detail_fields.values %}
+ <li><label>{{ field }}:</label> {{ value }}</li>
+ {% endfor %}
+
+ {% for field, value in form.additional_instructions_field.values %}
+ <li><label>{{ field }}:</label> {{ value }}</li>
+ {% endfor %}
+
+ </ul>
+ </div>
+ </div>
+</div>
+{% if settings.SHOP_PAYMENT_STEP_ENABLED %}
+{% comment %}
+<br style="clear:both;">
+<div class="confirmation col-md-6">
+ <div class="panel panel-default">
+ <div class="panel-body">
+ <h3>{% trans "Payment Details" %}</h3>
+ <ul class="list-unstyled">
+
+ {% for field, value in form.card_name_field.values %}
+ <li><label>{{ field }}:</label> {{ value }}</li>
+ {% endfor %}
+
+ {% for field, value in form.card_type_field.values %}
+ <li><label>{{ field }}:</label> {{ value }}</li>
+ {% endfor %}
+
+ <li>
+ {% with form.card_expiry_fields.values as expiry_fields %}
+ {% with expiry_fields.next as month_field %}
+ <label>{{ month_field.0 }}:</label> {{ month_field.1 }}/{{ expiry_fields.next.1 }}
+ {% endwith %}
+ {% endwith %}
+ </li>
+
+ {% for field, value in form.card_fields.values %}
+ <li><label>{{ field }}:</label> {{ value }}</li>
+ {% endfor %}
+
+ </ul>
+ </div>
+ </div>
+</div>
+{% endcomment %}
+{% endif %}
+<br style="clear:both;">
+
+{% for field in form %}{{ field }}{% endfor %}
+
+{% endif %}
+{% endblock %}
--- /dev/null
+{% load shop_tags i18n %}
+
+<h1>{{ settings.SITE_TITLE }}</h1>
+
+<table width="100%" border="0">
+ <tr>
+ <td>{% trans "Order ID:" %} {{ order.id }}</td>
+ <td align="right">{{ order.time }}</td>
+ </tr>
+</table>
+
+<h2>{% trans "Your Details" %}</h2>
+<table width="100%" border="1" cellspacing="0" cellpadding="10">
+<tr>
+ <th align="left" width="50%">{% trans "Billing Details" %}</th>
+ <th align="left" width="50%">{% trans "Shipping Details" %}</th>
+</tr>
+<tr>
+ <td valign="top">
+ <table border="0">
+ {% for field, value in order_billing_detail_fields %}
+ <tr><td>{{ field }}: </td><td>{{ value }}</td></tr>
+ {% endfor %}
+ </table>
+ </td>
+ <td valign="top">
+ <table border="0">
+ {% for field, value in order_shipping_detail_fields %}
+ <tr><td>{{ field }}: </td><td>{{ value }}</td></tr>
+ {% endfor %}
+ </table>
+ </td>
+</tr>
+</table>
+
+<h2>{% trans "Items Ordered" %}</h2>
+<table width="100%" border="1" cellspacing="0" cellpadding="10">
+ <tr>
+ <th align="left">{% trans "Item" %}</th>
+ <th align="right">{% trans "Unit Price" %}</th>
+ <th align="right">{% trans "Qty" %}</th>
+ <th align="right">{% trans "Price" %}</th>
+ </tr>
+ {% for item in order.items.all %}
+ <tr>
+ <td>{{ item.description }}</td>
+ <td align="right" valign="top">{{ item.unit_price|currency }}</td>
+ <td align="right" valign="top">{{ item.quantity }}</td>
+ <td align="right" valign="top">{{ item.total_price|currency }}</td>
+ </tr>
+ {% endfor %}
+ <tr>
+ <td colspan="4" align="right">{% order_totals %}</td>
+ </tr>
+</table>
--- /dev/null
+{% load shop_tags i18n %}
+
+<h1 align="right">{{ settings.SITE_TITLE }}</h1>
+
+<table width="100%" border="0">
+ <tr>
+ <td align="left">{{ order.time }}</td>
+ <td align="right">{% trans "Order ID:" %} {{ order.id }}</td>
+ </tr>
+</table>
+
+<h2 align="right">{% trans "Your Details" %}</h2>
+<table width="100%" border="1" cellspacing="0" cellpadding="10">
+<tr>
+ <th align="right" width="50%">{% trans "Billing Details" %}</th>
+ <th align="right" width="50%">{% trans "Shipping Details" %}</th>
+</tr>
+<tr>
+ <td valign="top" align="right">
+ <table border="0">
+ {% for field, value in order_billing_detail_fields %}
+ <tr><td>{{ value }}</td><td> : {{ field }}</td></tr>
+ {% endfor %}
+ </table>
+ </td>
+ <td valign="top" align="right">
+ <table border="0" align="right">
+ {% for field, value in order_shipping_detail_fields %}
+ <tr><td>{{ value }}</td><td> : {{ field }}</td></tr>
+ {% endfor %}
+ </table>
+ </td>
+</tr>
+</table>
+
+<h2 align="right">{% trans "Items Ordered" %}</h2>
+<table width="100%" border="1" cellspacing="0" cellpadding="10">
+ <tr>
+
+
+
+ <th align="left">{% trans "Price" %}</th>
+ <th align="left">{% trans "Qty" %}</th>
+ <th align="left">{% trans "Unit Price" %}</th>
+ <th align="right">{% trans "Item" %}</th>
+ </tr>
+ {% for item in order.items.all %}
+ <tr>
+ <td align="left" valign="top">{{ item.total_price|currency }}</td>
+ <td align="left" valign="top">{{ item.quantity }}</td>
+ <td align="left" valign="top">{{ item.unit_price|currency }}</td>
+ <td align="right">{{ item.description }}</td>
+
+
+
+ </tr>
+ {% endfor %}
+ <tr>
+ <td colspan="4" align="left">{% order_totals %}</td>
+ </tr>
+</table>
--- /dev/null
+{% load shop_tags i18n %}
+<div class="order-totals">
+ {% if discount_total or shipping_total %}
+ <div><label>{% trans "Sub total" %}:</label> <span>{{ item_total|currency }}</span></div>
+ {% endif %}
+ {% if discount_total %}
+ <div>
+ <label>
+ {% if discount_type %}
+ {{ discount_type }}:
+ {% else %}
+ {% trans "Discount" %}:
+ {% endif %}
+ </label> <span>{{ discount_total|currency }}</span>
+ </div>
+ {% endif %}
+ {% if shipping_type or shipping_total %}
+ <div>
+ <label>
+ {% if shipping_type %}
+ {{ shipping_type }}:
+ {% else %}
+ {% trans "Shipping" %}:
+ {% endif %}
+ </label> <span>{{ shipping_total|currency }}</span>
+ </div>
+ {% endif %}
+ {% if tax_total %}
+ <div>
+ <label>
+ {% if tax_type %}
+ {{ tax_type }}:
+ {% else %}
+ {% trans "Tax" %}:
+ {% endif %}
+ </label> <span>{{ tax_total|currency }}</span>
+ </div>
+ {% endif %}
+ <div class="total"><label>{% trans "Total" %}:</label> <span>{{ order_total|currency }}</span></div>
+</div>
--- /dev/null
+{% load shop_tags i18n %}{% if discount_total or shipping_total %}
+{% trans "Sub total" %}: {{ item_total|currency }}
+{% endif %}{% if discount_total %}
+{% if discount_type %}{{ discount_type }}{% else %}{% trans "Discount" %}{% endif %}: {{ discount_total|currency }}
+{% endif %}{% if shipping_type or shipping_total %}
+{% if shipping_type %}{{ shipping_type }}{% else %}{% trans "Shipping" %}{% endif %}: {{ shipping_total|currency }}
+{% endif %} {% if tax_total %}
+{% if tax_type %}{{ tax_type }}{% else %}{% trans "Tax" %}{% endif %}: {{ tax_total|currency }}
+{% endif %}{% trans "Total" %}: {{ order_total|currency }}
+
+
--- /dev/null
+{% load i18n mezzanine_tags %}
+<fieldset>
+ <legend>{% trans "Payment Details" %}</legend>
+ {% fields_for form.card_name_field %}
+ {% fields_for form.card_type_field %}
+ {% with form.card_expiry_fields as card_expiry_fields %}
+ <div class="form-group card-expiry-fields{% if card_expiry_fields.errors.card_expiry_year %} error{% endif %}">
+ <label class="control-label">{% trans "Card Expiry" %}</label>
+ {% fields_for card_expiry_fields %}
+ </div>
+ <div class="clearfix"></div>
+ {% endwith %}
+ {% fields_for form.card_fields %}
+</fieldset>
--- /dev/null
+{% load i18n shop_tags mezzanine_tags %}
+{% spaceless %}
+<a href="{% url "shop_cart" %}">
+<span class="glyphicon glyphicon-shopping-cart"></span>
+{% blocktrans count request.cart.total_quantity as cart_quantity %}1 item{% plural %}{{ cart_quantity }} items{% endblocktrans %}
+{% trans "in cart" %}:
+{{ request.cart.total_price|currency }}</a><br>
+{% if request.cart.total_quantity != 0 %}
+<a href="{% url "shop_checkout" %}" class="btn btn-primary">
+ {% if request.session.order.step %}{% trans "Return to Checkout" %}{% else %}{% trans "Go to Checkout" %}{% endif %}
+</a><br>
+{% endif %}
+{% if settings.SHOP_USE_WISHLIST %}
+<a href="{% url "shop_wishlist" %}" class="btn-wishlist">
+<span class="glyphicon glyphicon-star"></span>
+{% blocktrans count request.wishlist|length as wishlist_count %}Wishlist contains 1 item{% plural %} Wishlist contains {{ wishlist_count }} items{% endblocktrans %}</a>
+{% endif %}
+{% endspaceless %}
--- /dev/null
+{% extends "shop/base.html" %}
+{% load mezzanine_tags shop_tags i18n %}
+
+{% block meta_title %}{% trans "Order History" %}{% endblock %}
+{% block title %}{% trans "Order History" %}{% endblock %}
+
+{% block breadcrumb_menu %}
+{{ block.super }}
+<li>{% trans "Order History" %}</li>
+{% endblock %}
+
+{% block main %}
+
+{% if orders %}
+
+<table class="table table-striped order-history">
+ <thead>
+ <th class="left">ID</th>
+ <th class="left">{% trans "Date" %}</th>
+ <th class="right">{% trans "Qty" %}</th>
+ <th class="right">{% trans "Paid" %}</th>
+ <th> </th>
+ </thead>
+ <tbody>
+ {% for order in orders.object_list %}
+ <tr>
+ <td class="left">{{ order.id }}</td>
+ <td class="left">{{ order.time|date:"SHORT_DATE_FORMAT" }}</td>
+ <td class="right">{{ order.quantity_total }}</td>
+ <td class="right">{{ order.total|currency }}</td>
+ <td class="right">
+ <form class="order-history-form" method="post" action="{% url "shop_invoice_resend" order.id %}?next={{ request.path }}">
+ {% csrf_token %}
+ {% if has_pdf %}
+ <a class="btn btn-sm btn-primary" href="{% url "shop_invoice" order.id %}?format=pdf">{% trans "Download PDF" %}</a>
+ {% endif %}
+ <a class="btn btn-sm btn-default" target="_blank" href="{% url "shop_invoice" order.id %}">{% trans "View invoice" %}</a>
+ <input type="submit" class="btn btn-sm btn-default" value="{% trans "Re-send order email" %}">
+ </form>
+ </td>
+ </tr>
+ {% endfor %}
+ </tbody>
+</table>
+{% pagination_for orders %}
+
+{% else %}
+<p>{% trans "You have not ordered anything from us yet." %}</p>
+{% endif %}
+
+{% endblock %}
--- /dev/null
+{% if not LANGUAGE_BIDI %}
+ {% include "shop/includes/order_details.html" %}
+{% else %}
+ {% include "shop/includes/order_details_rtl.html" %}
+{% endif %}
--- /dev/null
+{% extends "shop/order_invoice.html" %}
--- /dev/null
+{% extends "shop/checkout.html" %}
+{% load i18n mezzanine_tags %}
+
+{% block fields %}
+{% if request.cart.has_items %}
+{% errors_for form %}
+{% include "shop/includes/payment_fields.html" %}
+{% fields_for form.other_fields %}
+{% endif %}
+{% endblock %}
--- /dev/null
+{% extends "shop/base.html" %}
+{% load staticfiles mezzanine_tags shop_tags rating_tags i18n %}
+
+{% block meta_title %}{{ product.meta_title }}{% endblock %}
+{% block body_id %}category{% endblock %}
+
+{% block meta_keywords %}{% metablock %}
+{% for keyword in product.keywords.all %}
+ {% if not forloop.first %}, {% endif %}
+ {{ keyword }}
+{% endfor %}
+{% endmetablock %}{% endblock %}
+
+{% block meta_description %}{% metablock %}
+{{ product.description }}
+{% endmetablock %}{% endblock %}
+
+{% block extra_css %}
+{{ block.super }}
+<link rel="stylesheet" href="{% static "mezzanine/css/magnific-popup.css" %}">
+{% endblock %}
+
+{% block extra_js %}
+{{ block.super }}
+<script src="{% static "mezzanine/js/magnific-popup.js" %}"></script>
+<script>
+$(document).ready(function() {
+ $('#product-images-large').magnificPopup({
+ delegate: 'a',
+ type: 'image',
+ gallery: {
+ enabled: true,
+ }
+ });
+});
+</script>
+{% endblock %}
+
+{% block extra_head %}
+{{ block.super }}
+<script>var variations = {{ variations_json|safe }};</script>
+<script src="{% static "cartridge/js/product_variations.js" %}"></script>
+{% endblock %}
+
+{% block breadcrumb_menu %}
+{{ block.super }}
+<li>{{ product.title }}</li>
+{% endblock %}
+
+{% block title %}
+{% editable product.title %}{{ product.title }}{% endeditable %}
+{% endblock %}
+
+{% block main %}
+
+{% if images %}
+{% spaceless %}
+<ul id="product-images-large" class="list-unstyled list-inline">
+ {% for image in images %}
+ <li id="image-{{ image.id }}-large"{% if not forloop.first %}style="display:none;"{% endif %}>
+ <a class="product-image-large" href="{{ MEDIA_URL }}{{ image.file }}">
+ <img alt="{{ image.description }}" src="{{ MEDIA_URL }}{% thumbnail image.file 0 300 %}" class="img-thumbnail img-responsive col-xs-12">
+ </a>
+ </li>
+ {% endfor %}
+</ul>
+
+{% if images|length != 1 %}
+<ul id="product-images-thumb" class="list-unstyled list-inline">
+ {% for image in images %}
+ <li>
+ <a class="thumbnail" id="image-{{ image.id }}" href="{{ MEDIA_URL }}{{ image.file }}">
+ <img alt="{{ image.description }}" src="{{ MEDIA_URL }}{% thumbnail image.file 75 75 %}">
+ </a>
+ </li>
+ {% endfor %}
+</ul>
+{% endif %}
+
+{% endspaceless %}
+{% endif %}
+
+{% editable product.content %}
+{{ product.content|richtext_filters|safe }}
+{% endeditable %}
+
+{% if product.available and has_available_variations %}
+<ul id="variations" class="list-unstyled">
+ {% for variation in variations %}
+ <li id="variation-{{ variation.sku }}"
+ {% if not variation.default %}style="display:none;"{% endif %}>
+ {% if variation.has_price %}
+ {% if variation.on_sale %}
+ <span class="old-price">{{ variation.unit_price|currency }}</span>
+ {% trans "On sale:" %}
+ {% endif %}
+ <span class="price">{{ variation.price|currency }}</span>
+ {% else %}
+ {% if has_available_variations %}
+ <span class="error-msg">
+ {% trans "The selected options are currently unavailable." %}
+ </span>
+ {% endif %}
+ {% endif %}
+ </li>
+ {% endfor %}
+</ul>
+
+{% errors_for add_product_form %}
+
+<form method="post" id="add-cart" class="shop-form">
+ {% fields_for add_product_form %}
+ <div class="form-actions">
+ <input type="submit" class="btn btn-primary btn-lg pull-right" name="add_cart" value="{% trans "Buy" %}">
+ {% if settings.SHOP_USE_WISHLIST %}
+ <input type="submit" class="btn btn-default btn-lg pull-left" name="add_wishlist" value="{% trans "Save for later" %}">
+ {% endif %}
+ </div>
+</form>
+{% else %}
+<p class="error-msg">{% trans "This product is currently unavailable." %}</p>
+{% endif %}
+
+{% if settings.SHOP_USE_RATINGS %}
+<div class="panel panel-default rating">
+ <div class="panel-body">{% rating_for product %}</div>
+</div>
+{% endif %}
+
+{% if settings.SHOP_USE_RELATED_PRODUCTS and related_products %}
+<h2>{% trans "Related Products" %}</h2>
+<div class="row related-products">
+ {% for product in related_products %}
+ <div class="col-xs-6 col-sm-4 col-md-3 product-thumb">
+ <a class="thumbnail" href="{{ product.get_absolute_url }}">
+ {% if product.image %}
+ <img src="{{ MEDIA_URL }}{% thumbnail product.image 90 90 %}">
+ {% endif %}
+ <div class="caption">
+ <h6>{{ product }}</h6>
+ <div class="price-info">
+ {% if product.has_price %}
+ {% if product.on_sale %}
+ <span class="old-price">{{ product.unit_price|currency }}</span>
+ {% trans "On sale:" %}
+ {% endif %}
+ <span class="price">{{ product.price|currency }}</span>
+ {% else %}
+ <span class="coming-soon">{% trans "Coming soon" %}</span>
+ {% endif %}
+ </div>
+ </div>
+ </a>
+ </div>
+ {% endfor %}
+</div>
+{% endif %}
+
+{% endblock %}
--- /dev/null
+{% extends "shop/base.html" %}
+{% load mezzanine_tags shop_tags i18n %}
+
+{% block meta_title %}{% trans "Your Wishlist" %}{% endblock %}
+{% block title %}{% trans "Your Wishlist" %}{% endblock %}
+
+{% block breadcrumb_menu %}
+{{ block.super }}
+<li>{% trans "Your Wishlist" %}</li>
+{% endblock %}
+
+{% block main %}
+{% if error %}{{ error }}{% endif %}
+{% if request.wishlist %}
+<table class="table table-striped wishlist">
+ {% for item in wishlist_items %}
+ <tr>
+ <td width="30">
+ {% if item.image %}
+ <a href="{{ item.get_absolute_url }}"><img alt="{{ item }}" src="{{ MEDIA_URL }}{% thumbnail item.image.file 30 30 %}"></a>
+ {% else %}
+
+ {% endif %}
+ </td>
+ <td>
+ <a href="{{ item.get_absolute_url }}">{{ item }}</a>
+ </td>
+ <td class="wishlist-actions">
+ <form method="post">
+ {{ item.unit_price|currency }}
+ {% csrf_token %}
+ <input type="hidden" name="sku" value="{{ item.sku }}">
+ <input type="hidden" name="quantity" value="1">
+ <input type="submit" class="btn btn-sm btn-primary" name="add_cart" value="{% trans "Buy" %}">
+ <input type="submit" class="btn btn-sm btn-default" name="remove_wishlist" value="{% trans "Remove" %}">
+ </form>
+ </td>
+ </tr>
+ {% endfor %}
+</table>
+{% else %}
+<p>{% trans "Your wishlist is empty." %}</p>
+<br>
+<p><a class="btn btn-large btn-primary" href="{% url "page" "shop" %}">{% trans "Continue Shopping" %}</a></p>
+{% endif %}
+{% endblock %}
urlpatterns += [
# App urls
-
url("^", include('organization.urls')),
url("^styles/$", direct_to_template, {"template": "styles.html"}, name="styles"),