diff --git a/erpnext/accounts/doctype/shipping_rule/shipping_rule.json b/erpnext/accounts/doctype/shipping_rule/shipping_rule.json index 97828d6f1b..62d5cb8e0c 100644 --- a/erpnext/accounts/doctype/shipping_rule/shipping_rule.json +++ b/erpnext/accounts/doctype/shipping_rule/shipping_rule.json @@ -141,17 +141,17 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, - "description": "Specify a list of Territories, for which, this Shipping Rule is valid", - "fieldname": "territories", + "fieldname": "countries", "fieldtype": "Table", "hidden": 0, "ignore_user_permissions": 0, "in_filter": 0, "in_list_view": 0, - "label": "Valid For Territories", + "label": "Valid for Countries", "no_copy": 0, - "options": "Applicable Territory", + "options": "Shipping Rule Country", "permlevel": 0, + "precision": "", "print_hide": 0, "read_only": 0, "report_hide": 0, @@ -296,7 +296,7 @@ "is_submittable": 0, "issingle": 0, "istable": 0, - "modified": "2015-09-07 15:51:26", + "modified": "2015-09-17 06:44:05.127516", "modified_by": "Administrator", "module": "Accounts", "name": "Shipping Rule", @@ -304,7 +304,7 @@ "permissions": [ { "amend": 0, - "apply_user_permissions": 0, + "apply_user_permissions": 1, "cancel": 0, "create": 0, "delete": 0, @@ -324,7 +324,7 @@ }, { "amend": 0, - "apply_user_permissions": 0, + "apply_user_permissions": 1, "cancel": 0, "create": 0, "delete": 0, diff --git a/erpnext/accounts/doctype/shipping_rule_country/__init__.py b/erpnext/accounts/doctype/shipping_rule_country/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/accounts/doctype/shipping_rule_country/shipping_rule_country.json b/erpnext/accounts/doctype/shipping_rule_country/shipping_rule_country.json new file mode 100644 index 0000000000..90fe3d3dd3 --- /dev/null +++ b/erpnext/accounts/doctype/shipping_rule_country/shipping_rule_country.json @@ -0,0 +1,53 @@ +{ + "allow_copy": 0, + "allow_import": 0, + "allow_rename": 0, + "creation": "2015-09-17 06:43:22.767534", + "custom": 0, + "docstatus": 0, + "doctype": "DocType", + "document_type": "Other", + "fields": [ + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "fieldname": "country", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 1, + "label": "Country", + "no_copy": 0, + "options": "Country", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + } + ], + "hide_heading": 0, + "hide_toolbar": 0, + "in_create": 0, + "in_dialog": 0, + "is_submittable": 0, + "issingle": 0, + "istable": 1, + "modified": "2015-09-17 06:43:22.767534", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Shipping Rule Country", + "name_case": "", + "owner": "Administrator", + "permissions": [], + "read_only": 0, + "read_only_onload": 0, + "sort_field": "modified", + "sort_order": "DESC" +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/shipping_rule_country/shipping_rule_country.py b/erpnext/accounts/doctype/shipping_rule_country/shipping_rule_country.py new file mode 100644 index 0000000000..b9646cfc29 --- /dev/null +++ b/erpnext/accounts/doctype/shipping_rule_country/shipping_rule_country.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +import frappe +from frappe.model.document import Document + +class ShippingRuleCountry(Document): + pass diff --git a/erpnext/public/js/shopping_cart.js b/erpnext/public/js/shopping_cart.js index cff831d714..f52c296e3d 100644 --- a/erpnext/public/js/shopping_cart.js +++ b/erpnext/public/js/shopping_cart.js @@ -30,7 +30,7 @@ $.extend(shopping_cart, { args: { item_code: opts.item_code, qty: opts.qty, - with_doc: opts.with_doc || 0 + with_items: opts.with_items || 0 }, btn: opts.btn, callback: function(r) { diff --git a/erpnext/shopping_cart/cart.py b/erpnext/shopping_cart/cart.py index 6ff164b229..0d28406f06 100644 --- a/erpnext/shopping_cart/cart.py +++ b/erpnext/shopping_cart/cart.py @@ -28,6 +28,8 @@ def get_cart_quotation(doc=None): doc = quotation set_cart_count(quotation) + print get_applicable_shipping_rules(party) + return { "doc": decorate_quotation_doc(doc), "addresses": [{"name": address.name, "display": address.display} @@ -63,7 +65,7 @@ def place_order(): return sales_order.name @frappe.whitelist() -def update_cart(item_code, qty, with_doc): +def update_cart(item_code, qty, with_items=False): quotation = _get_cart_quotation() qty = flt(qty) @@ -95,8 +97,15 @@ def update_cart(item_code, qty, with_doc): set_cart_count(quotation) - if with_doc: - return get_cart_quotation(quotation) + + if with_items: + context = get_cart_quotation(quotation) + return { + "items": frappe.render_template("templates/includes/cart/cart_items.html", + context), + "taxes": frappe.render_template("templates/includes/order/order_taxes.html", + context), + } else: return quotation.name diff --git a/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.py b/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.py index da7d27af10..a8a4b7653f 100644 --- a/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.py +++ b/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.py @@ -8,8 +8,7 @@ import frappe from frappe import _, msgprint from frappe.utils import comma_and from frappe.model.document import Document -from frappe.utils.nestedset import get_ancestors_of, get_root_of -from erpnext.utilities.doctype.address.address import get_territory_from_address +from frappe.utils.nestedset import get_root_of class ShoppingCartSetupError(frappe.ValidationError): pass @@ -19,57 +18,8 @@ class ShoppingCartSettings(Document): def validate(self): if self.enabled: - self.validate_price_lists() + self.validate_tax_masters() self.validate_exchange_rates_exist() - self.validate_tax_rule() - - def validate_overlapping_territories(self, parentfield, fieldname): - # for displaying message - doctype = self.meta.get_field(parentfield).options - - # specify atleast one entry in the table - self.validate_table_has_rows(parentfield, raise_exception=ShoppingCartSetupError) - - territory_name_map = self.get_territory_name_map(parentfield, fieldname) - for territory, names in territory_name_map.items(): - if len(names) > 1: - frappe.throw(_("{0} {1} has a common territory {2}").format(_(doctype), comma_and(names), territory), ShoppingCartSetupError) - - return territory_name_map - - def validate_price_lists(self): - self.validate_overlapping_territories("price_lists", "selling_price_list") - - # validate that a Shopping Cart Price List exists for the default territory as a catch all! - price_list_for_default_territory = self.get_name_from_territory(self.default_territory, "price_lists", - "selling_price_list") - - if not price_list_for_default_territory: - msgprint(_("Please specify a Price List which is valid for Territory") + - ": " + self.default_territory, raise_exception=ShoppingCartSetupError) - - def get_territory_name_map(self, parentfield, fieldname): - territory_name_map = {} - - # entries in table - names = [doc.get(fieldname) for doc in self.get(parentfield)] - if names: - # for condition in territory check - parenttype = frappe.get_meta(self.meta.get_options(parentfield)).get_options(fieldname) - # to validate territory overlap - # make a map of territory: [list of names] - # if list against each territory has more than one element, raise exception - territory_name = frappe.db.sql("""select `territory`, `parent` - from `tabApplicable Territory` - where `parenttype`=%s and `parent` in (%s)""" % - ("%s", ", ".join(["%s"]*len(names))), tuple([parenttype] + names)) - - for territory, name in territory_name: - territory_name_map.setdefault(territory, []).append(name) - - if len(territory_name_map[territory]) > 1: - territory_name_map[territory].sort(key=lambda val: names.index(val)) - return territory_name_map def validate_exchange_rates_exist(self): """check if exchange rates exist for all Price List currencies (to company's currency)""" @@ -102,20 +52,6 @@ class ShoppingCartSettings(Document): msgprint(_("Missing Currency Exchange Rates for {0}").format(comma_and(missing)), raise_exception=ShoppingCartSetupError) - def get_name_from_territory(self, territory, parentfield, fieldname): - name = None - territory_name_map = self.get_territory_name_map(parentfield, fieldname) - if territory_name_map.get(territory): - name = territory_name_map.get(territory) - else: - territory_ancestry = self.get_territory_ancestry(territory) - for ancestor in territory_ancestry: - if territory_name_map.get(ancestor): - name = territory_name_map.get(ancestor) - break - - return name - def get_price_list(self, billing_territory): price_list = self.get_name_from_territory(billing_territory, "price_lists", "selling_price_list") if not (price_list and price_list[0]): @@ -123,11 +59,11 @@ class ShoppingCartSettings(Document): "price_lists", "selling_price_list") return price_list and price_list[0] or None - + def validate_tax_rule(self): if not frappe.db.get_value("Tax Rule", {"use_for_shopping_cart" : 1}, "name"): frappe.throw(frappe._("Set Tax Rule for shopping cart"), ShoppingCartSetupError) - + def get_tax_master(self, billing_territory): tax_master = self.get_name_from_territory(billing_territory, "sales_taxes_and_charges_masters", "sales_taxes_and_charges_master") @@ -136,15 +72,6 @@ class ShoppingCartSettings(Document): def get_shipping_rules(self, shipping_territory): return self.get_name_from_territory(shipping_territory, "shipping_rules", "shipping_rule") - def get_territory_ancestry(self, territory): - if not hasattr(self, "_territory_ancestry"): - self._territory_ancestry = {} - - if not self._territory_ancestry.get(territory): - self._territory_ancestry[territory] = get_ancestors_of("Territory", territory) - - return self._territory_ancestry[territory] - def validate_cart_settings(doc, method): frappe.get_doc("Shopping Cart Settings", "Shopping Cart Settings").run_method("validate") @@ -163,4 +90,4 @@ def get_default_territory(): def check_shopping_cart_enabled(): if not get_shopping_cart_settings().enabled: frappe.throw(_("You need to enable Shopping Cart"), ShoppingCartSetupError) - + diff --git a/erpnext/stock/doctype/price_list/price_list.json b/erpnext/stock/doctype/price_list/price_list.json index fcd204c18e..0d2baa461f 100644 --- a/erpnext/stock/doctype/price_list/price_list.json +++ b/erpnext/stock/doctype/price_list/price_list.json @@ -163,21 +163,21 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, - "description": "Specify a list of Territories, for which, this Price List is valid", - "fieldname": "territories", + "fieldname": "countries", "fieldtype": "Table", "hidden": 0, "ignore_user_permissions": 0, "in_filter": 0, "in_list_view": 0, - "label": "Valid for Territories", + "label": "Applicable for Countries", "no_copy": 0, - "options": "Applicable Territory", + "options": "Price List Country", "permlevel": 0, + "precision": "", "print_hide": 0, "read_only": 0, "report_hide": 0, - "reqd": 1, + "reqd": 0, "search_index": 0, "set_only_once": 0, "unique": 0 @@ -193,7 +193,7 @@ "issingle": 0, "istable": 0, "max_attachments": 1, - "modified": "2015-09-14 02:55:58.919822", + "modified": "2015-09-17 06:50:31.465221", "modified_by": "Administrator", "module": "Stock", "name": "Price List", @@ -201,7 +201,7 @@ "permissions": [ { "amend": 0, - "apply_user_permissions": 0, + "apply_user_permissions": 1, "cancel": 0, "create": 0, "delete": 0, @@ -241,7 +241,7 @@ }, { "amend": 0, - "apply_user_permissions": 0, + "apply_user_permissions": 1, "cancel": 0, "create": 0, "delete": 0, @@ -281,7 +281,7 @@ }, { "amend": 0, - "apply_user_permissions": 0, + "apply_user_permissions": 1, "cancel": 0, "create": 0, "delete": 0, diff --git a/erpnext/stock/doctype/price_list/price_list.py b/erpnext/stock/doctype/price_list/price_list.py index 6b03bb6b0e..8773b9c33f 100644 --- a/erpnext/stock/doctype/price_list/price_list.py +++ b/erpnext/stock/doctype/price_list/price_list.py @@ -13,19 +13,6 @@ class PriceList(Document): if not cint(self.buying) and not cint(self.selling): throw(_("Price List must be applicable for Buying or Selling")) - try: - # at least one territory - self.validate_table_has_rows("territories") - except frappe.EmptyTableError: - # if no territory, set default territory - if frappe.defaults.get_user_default("territory"): - self.append("territories", { - "doctype": "Applicable Territory", - "territory": frappe.defaults.get_user_default("territory") - }) - else: - raise - def on_update(self): self.set_default_if_missing() self.update_item_price() diff --git a/erpnext/stock/doctype/price_list_country/__init__.py b/erpnext/stock/doctype/price_list_country/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/stock/doctype/price_list_country/price_list_country.json b/erpnext/stock/doctype/price_list_country/price_list_country.json new file mode 100644 index 0000000000..be02c202cc --- /dev/null +++ b/erpnext/stock/doctype/price_list_country/price_list_country.json @@ -0,0 +1,53 @@ +{ + "allow_copy": 0, + "allow_import": 0, + "allow_rename": 0, + "creation": "2015-09-17 06:49:51.810318", + "custom": 0, + "docstatus": 0, + "doctype": "DocType", + "document_type": "", + "fields": [ + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "fieldname": "country", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 1, + "label": "Country", + "no_copy": 0, + "options": "Country", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + } + ], + "hide_heading": 0, + "hide_toolbar": 0, + "in_create": 0, + "in_dialog": 0, + "is_submittable": 0, + "issingle": 0, + "istable": 1, + "modified": "2015-09-17 06:49:51.810318", + "modified_by": "Administrator", + "module": "Stock", + "name": "Price List Country", + "name_case": "", + "owner": "Administrator", + "permissions": [], + "read_only": 0, + "read_only_onload": 0, + "sort_field": "modified", + "sort_order": "DESC" +} \ No newline at end of file diff --git a/erpnext/stock/doctype/price_list_country/price_list_country.py b/erpnext/stock/doctype/price_list_country/price_list_country.py new file mode 100644 index 0000000000..db1a0607e6 --- /dev/null +++ b/erpnext/stock/doctype/price_list_country/price_list_country.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +import frappe +from frappe.model.document import Document + +class PriceListCountry(Document): + pass diff --git a/erpnext/templates/includes/cart.js b/erpnext/templates/includes/cart.js index e0706f7fce..e6ce25a6a8 100644 --- a/erpnext/templates/includes/cart.js +++ b/erpnext/templates/includes/cart.js @@ -14,28 +14,9 @@ $.extend(shopping_cart, { bind_events: function() { shopping_cart.bind_address_select(); + shopping_cart.bind_place_order(); + shopping_cart.bind_change_qty(); - // bind update button - $(document).on("click", ".item-update-cart button", function() { - var item_code = $(this).attr("data-item-code"); - shopping_cart.update_cart({ - item_code: item_code, - qty: $('input[data-item-code="'+item_code+'"]').val(), - with_doc: 1, - btn: this, - callback: function(r) { - if(!r.exc) { - shopping_cart.render(r.message); - var $button = $('button[data-item-code="'+item_code+'"]').addClass("btn-success"); - setTimeout(function() { $button.removeClass("btn-success"); }, 1000); - } - }, - }); - }); - - $(".btn-place-order").on("click", function() { - shopping_cart.place_order(this); - }); }, bind_address_select: function() { @@ -63,95 +44,31 @@ $.extend(shopping_cart, { }, - render: function(out) { - var doc = out.doc; - var addresses = out.addresses; - - var $cart_items = $("#cart-items").empty(); - var $cart_taxes = $("#cart-taxes").empty(); - var $cart_totals = $("#cart-totals").empty(); - var $cart_billing_address = $("#cart-billing-address").empty(); - var $cart_shipping_address = $("#cart-shipping-address").empty(); - - var no_items = $.map(doc.items || [], - function(d) { return d.item_code || null;}).length===0; - if(no_items) { - shopping_cart.show_error("Cart Empty", frappe._("Go ahead and add something to your cart.")); - $("#cart-addresses").toggle(false); - return; - } - - var shipping_rule_added = false; - var taxes_exist = false; - var shipping_rule_labels = $.map(out.shipping_rules || [], function(rule) { return rule[1]; }); - - $.each(doc.items || [], function(i, d) { - shopping_cart.render_item_row($cart_items, d); + bind_place_order: function() { + $(".btn-place-order").on("click", function() { + shopping_cart.place_order(this); }); - - $.each(doc.taxes || [], function(i, d) { - if(out.shipping_rules && out.shipping_rules.length && - shipping_rule_labels.indexOf(d.description)!==-1) { - shipping_rule_added = true; - shopping_cart.render_tax_row($cart_taxes, d, out.shipping_rules); - } else { - shopping_cart.render_tax_row($cart_taxes, d); - } - - taxes_exist = true; - }); - - if(out.shipping_rules && out.shipping_rules.length && !shipping_rule_added) { - shopping_cart.render_tax_row($cart_taxes, {description: "", formatted_tax_amount: ""}, - out.shipping_rules); - taxes_exist = true; - } - - if(taxes_exist) - $('
').appendTo($cart_taxes); - - shopping_cart.render_tax_row($cart_totals, { - description: "", - formatted_tax_amount: __("Total") + ": " + doc.formatted_grand_total_export + "" - }); - - if(!(addresses && addresses.length)) { - $cart_shipping_address.html('

'+frappe._("Please add a new address")+'

'); - } else { - shopping_cart.render_address($cart_shipping_address, addresses, doc.shipping_address_name); - shopping_cart.render_address($cart_billing_address, addresses, doc.customer_address); - } }, - render_item_row: function($cart_items, doc) { - doc.image_html = doc.website_image ? - '
': ""; + bind_change_qty: function() { + // bind update button + $(".cart-items").on("change", ".cart-qty", function() { + var item_code = $(this).attr("data-item-code"); + shopping_cart.update_cart({ + item_code: item_code, + qty: $(this).val(), + with_items: 1, + btn: this, + callback: function(r) { + if(!r.exc) { + $(".cart-items").html(r.message.items); + $(".cart-tax-items").html(r.message.taxes); + } + $(".tax-grand-total").temp_highlight(); + }, + }); + }); - if(doc.description === doc.item_name) doc.description = ""; - - $(repl('
\ -
\ -
\ -
%(image_html)s
\ -
\ -
%(item_name)s
\ -

%(description)s

\ -
\ -
\ -
\ -
\ -
\ - \ -
\ - \ -
\ -
\ -

' + __("Rate") + ': %(formatted_rate)s

\ - %(formatted_amount)s\ -
\ -

', doc)).appendTo($cart_items); }, render_tax_row: function($cart_taxes, doc, shipping_rules) { @@ -201,46 +118,6 @@ $.extend(shopping_cart, { }); }, - render_address: function($address_wrapper, addresses, address_name) { - $.each(addresses, function(i, address) { - $(repl('
\ -
\ -
\ -
%(name)s
\ -
\ -
\ -
\ -
\ -
%(display)s
\ -
\ -
', address)) - .css({"margin": "10px auto"}) - .appendTo($address_wrapper); - }); - - $address_wrapper.find(".panel-heading") - .find(".address-title") - .css({"cursor": "pointer"}) - .on("click", function() { - $address_wrapper.find('.panel-collapse[data-address-name="' - +$(this).attr("data-address-name")+'"]').collapse("toggle"); - }); - - - $address_wrapper.find('input[type="checkbox"][data-address-name="'+ address_name +'"]') - .prop("checked", true); - - $address_wrapper.find(".panel-collapse").collapse({ - parent: $address_wrapper, - toggle: false - }); - - $address_wrapper.find('.panel-collapse[data-address-name="'+ address_name +'"]') - .collapse("show"); - }, - place_order: function(btn) { return frappe.call({ type: "POST", @@ -267,24 +144,4 @@ $.extend(shopping_cart, { $(document).ready(function() { shopping_cart.bind_events(); - // return frappe.call({ - // type: "POST", - // method: "erpnext.shopping_cart.cart.get_cart_quotation", - // callback: function(r) { - // $("#cart-container").removeClass("hide"); - // $(".loading").remove(); - // if(r.exc) { - // if(r.exc.indexOf("WebsitePriceListMissingError")!==-1) { - // shopping_cart.show_error("Configuration Error", frappe._("Price List not configured.")); - // } else if(r["403"]) { - // shopping_cart.show_error("Not Allowed", frappe._("You need to be logged in to view your cart.")); - // } else { - // shopping_cart.show_error("Error", frappe._("Something went wrong.")); - // } - // } else { - // shopping_cart.set_cart_count(); - // shopping_cart.render(r.message); - // } - // } - // }); }); diff --git a/erpnext/templates/includes/cart/cart_item_line.html b/erpnext/templates/includes/cart/cart_item_line.html deleted file mode 100644 index cd157634a0..0000000000 --- a/erpnext/templates/includes/cart/cart_item_line.html +++ /dev/null @@ -1,16 +0,0 @@ -{% from "erpnext/templates/includes/order/order_macros.html" import item_name_and_description %} - -
-
- {{ item_name_and_description(d) }} -
-
-
{{ d.get_formatted('qty') }}
-

- {{ _("Rate") + ': ' + d.get_formatted("rate") }} -

-
-
- {{ d.get_formatted("amount") }} -
-
diff --git a/erpnext/templates/includes/cart/cart_items.html b/erpnext/templates/includes/cart/cart_items.html new file mode 100644 index 0000000000..f7efa78709 --- /dev/null +++ b/erpnext/templates/includes/cart/cart_items.html @@ -0,0 +1,23 @@ +{% from "erpnext/templates/includes/order/order_macros.html" import item_name_and_description %} + +{% for d in doc.items %} +
+
+
+ {{ item_name_and_description(d) }} +
+
+ + +

+ {{ _("Rate") + ': ' + d.get_formatted("rate") }} +

+
+
+ {{ d.get_formatted("amount") }} +
+
+
+{% endfor %} diff --git a/erpnext/templates/includes/issue_row.html b/erpnext/templates/includes/issue_row.html index 8e87fcae7b..2935a24ea4 100644 --- a/erpnext/templates/includes/issue_row.html +++ b/erpnext/templates/includes/issue_row.html @@ -2,13 +2,13 @@
- + {{ doc.name }} {{ doc.subject }}
-
- {{ frappe.format_date(doc.creation) }} +
+ {{ frappe.format_date(doc.modified) }}
diff --git a/erpnext/templates/includes/order/order_taxes.html b/erpnext/templates/includes/order/order_taxes.html index 510e1a3d89..8c8e88621b 100644 --- a/erpnext/templates/includes/order/order_taxes.html +++ b/erpnext/templates/includes/order/order_taxes.html @@ -15,5 +15,8 @@
{{ _("Grand Total") }}
- {{ doc.get_formatted("grand_total") }}
+ + {{ doc.get_formatted("grand_total") }} + +
diff --git a/erpnext/templates/pages/cart.html b/erpnext/templates/pages/cart.html index 837df3b056..a97e65876c 100644 --- a/erpnext/templates/pages/cart.html +++ b/erpnext/templates/pages/cart.html @@ -35,11 +35,9 @@ {% if doc.items %} - {% for d in doc.items %} -
- {% include "templates/includes/cart/cart_item_line.html" %} +
+ {% include "templates/includes/cart/cart_items.html" %}
- {% endfor %} {% else %}

{{ _("Cart is Empty") }}

{% endif %} @@ -48,7 +46,7 @@
-
+
{% include "templates/includes/order/order_taxes.html" %}