// ERPNext - web based ERP (http://erpnext.com)
// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
// js inside blog page
$(document).ready(function() {
// make list of items in the cart
// wn.cart.render();
wn.cart.bind_events();
wn.call({
type: "POST",
method: "website.helpers.cart.get_cart_quotation",
callback: function(r) {
console.log(r);
$("#cart-container").removeClass("hide");
$(".progress").remove();
if(r.exc) {
if(r.exc.indexOf("WebsitePriceListMissingError")!==-1) {
wn.cart.show_error("Oops!", "Price List not configured.");
} else {
wn.cart.show_error("Oops!", "Something went wrong.");
}
} else {
wn.cart.render(r.message);
}
}
});
});
// shopping cart
if(!wn.cart) wn.cart = {};
$.extend(wn.cart, {
show_error: function(title, text) {
$("#cart-container").html('