mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 11:19:09 +00:00
Merge branch 'responsive' of github.com:webnotes/erpnext into responsive
This commit is contained in:
@@ -16,7 +16,8 @@
|
|||||||
|
|
||||||
//--------- ONLOAD -------------
|
//--------- ONLOAD -------------
|
||||||
cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||||
//
|
if(doc.doctype === "Sales Taxes and Charges Master")
|
||||||
|
erpnext.add_for_territory();
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||||
|
|||||||
5
accounts/doctype/shipping_rule/shipping_rule.js
Normal file
5
accounts/doctype/shipping_rule/shipping_rule.js
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
$.extend(cur_frm.cscript, {
|
||||||
|
onload: function() {
|
||||||
|
erpnext.add_for_territory();
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -30,11 +30,6 @@ class AccountsController(TransactionBase):
|
|||||||
self.validate_date_with_fiscal_year()
|
self.validate_date_with_fiscal_year()
|
||||||
|
|
||||||
if self.meta.get_field("currency"):
|
if self.meta.get_field("currency"):
|
||||||
self.company_currency = get_company_currency(self.doc.company)
|
|
||||||
|
|
||||||
validate_conversion_rate(self.doc.currency, self.doc.conversion_rate,
|
|
||||||
self.meta.get_label("conversion_rate"), self.doc.company)
|
|
||||||
|
|
||||||
self.calculate_taxes_and_totals()
|
self.calculate_taxes_and_totals()
|
||||||
self.validate_value("grand_total", ">=", 0)
|
self.validate_value("grand_total", ">=", 0)
|
||||||
self.set_total_in_words()
|
self.set_total_in_words()
|
||||||
@@ -129,6 +124,14 @@ class AccountsController(TransactionBase):
|
|||||||
self.doclist.append(tax)
|
self.doclist.append(tax)
|
||||||
|
|
||||||
def calculate_taxes_and_totals(self):
|
def calculate_taxes_and_totals(self):
|
||||||
|
# validate conversion rate
|
||||||
|
if not self.doc.currency:
|
||||||
|
self.doc.currency = get_company_currency(self.doc.company)
|
||||||
|
self.doc.conversion_rate = 1.0
|
||||||
|
else:
|
||||||
|
validate_conversion_rate(self.doc.currency, self.doc.conversion_rate,
|
||||||
|
self.meta.get_label("conversion_rate"), self.doc.company)
|
||||||
|
|
||||||
self.doc.conversion_rate = flt(self.doc.conversion_rate)
|
self.doc.conversion_rate = flt(self.doc.conversion_rate)
|
||||||
self.item_doclist = self.doclist.get({"parentfield": self.fname})
|
self.item_doclist = self.doclist.get({"parentfield": self.fname})
|
||||||
self.tax_doclist = self.doclist.get({"parentfield": self.other_fname})
|
self.tax_doclist = self.doclist.get({"parentfield": self.other_fname})
|
||||||
|
|||||||
@@ -197,7 +197,6 @@ patch_list = [
|
|||||||
"execute:webnotes.reload_doc('website', 'doctype', 'blog_post') #2013-03-25",
|
"execute:webnotes.reload_doc('website', 'doctype', 'blog_post') #2013-03-25",
|
||||||
"execute:webnotes.reload_doc('website', 'doctype', 'web_page') #2013-03-25",
|
"execute:webnotes.reload_doc('website', 'doctype', 'web_page') #2013-03-25",
|
||||||
"execute:webnotes.reload_doc('setup', 'doctype', 'sales_partner') #2013-06-25",
|
"execute:webnotes.reload_doc('setup', 'doctype', 'sales_partner') #2013-06-25",
|
||||||
"execute:webnotes.bean('Style Settings').save() #2013-03-25",
|
|
||||||
"execute:webnotes.conn.set_value('Email Settings', None, 'send_print_in_body_and_attachment', 1)",
|
"execute:webnotes.conn.set_value('Email Settings', None, 'send_print_in_body_and_attachment', 1)",
|
||||||
"patches.march_2013.p09_unset_user_type_partner",
|
"patches.march_2013.p09_unset_user_type_partner",
|
||||||
"patches.march_2013.p10_set_fiscal_year_for_stock",
|
"patches.march_2013.p10_set_fiscal_year_for_stock",
|
||||||
@@ -251,4 +250,5 @@ patch_list = [
|
|||||||
"execute:webnotes.delete_doc('Report', 'Received Items To Be Billed')",
|
"execute:webnotes.delete_doc('Report', 'Received Items To Be Billed')",
|
||||||
"patches.july_2013.p02_copy_shipping_address",
|
"patches.july_2013.p02_copy_shipping_address",
|
||||||
"patches.july_2013.p03_cost_center_company",
|
"patches.july_2013.p03_cost_center_company",
|
||||||
|
"execute:webnotes.bean('Style Settings').save() #2013-07-16",
|
||||||
]
|
]
|
||||||
@@ -39,5 +39,14 @@ $.extend(erpnext, {
|
|||||||
cur_frm.toggle_display("company", false);
|
cur_frm.toggle_display("company", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
add_for_territory: function() {
|
||||||
|
if(cur_frm.doc.__islocal &&
|
||||||
|
wn.model.get_doclist(cur_frm.doc.doctype, cur_frm.doc.name).length === 1) {
|
||||||
|
var territory = wn.model.add_child(cur_frm.doc, "For Territory",
|
||||||
|
"valid_for_territories");
|
||||||
|
territory.territory = wn.defaults.get_default("territory");
|
||||||
}
|
}
|
||||||
|
},
|
||||||
});
|
});
|
||||||
@@ -492,6 +492,21 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
shipping_rule: function() {
|
||||||
|
var me = this;
|
||||||
|
if(this.frm.doc.shipping_rule) {
|
||||||
|
this.frm.call({
|
||||||
|
doc: this.frm.doc,
|
||||||
|
method: "apply_shipping_rule",
|
||||||
|
callback: function(r) {
|
||||||
|
if(!r.exc) {
|
||||||
|
me.calculate_taxes_and_totals();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
set_dynamic_labels: function() {
|
set_dynamic_labels: function() {
|
||||||
this._super();
|
this._super();
|
||||||
set_sales_bom_help(this.frm.doc);
|
set_sales_bom_help(this.frm.doc);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-05-02 17:53:24",
|
"creation": "2013-05-02 17:53:24",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-05 14:39:17",
|
"modified": "2013-07-15 15:03:01",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -179,7 +179,6 @@
|
|||||||
"fieldname": "hr",
|
"fieldname": "hr",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"label": "HR",
|
"label": "HR",
|
||||||
"options": "<div style=\"padding-top: 8px;\" class=\"columnHeading\">HR</div>",
|
|
||||||
"read_only": 0
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,11 +14,13 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
cur_frm.cscript.onload = function() {
|
$.extend(cur_frm.cscript, {
|
||||||
|
onload: function() {
|
||||||
cur_frm.cscript.show_item_prices();
|
cur_frm.cscript.show_item_prices();
|
||||||
}
|
erpnext.add_for_territory();
|
||||||
|
},
|
||||||
|
|
||||||
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
refresh: function(doc) {
|
||||||
cur_frm.set_intro("");
|
cur_frm.set_intro("");
|
||||||
if(doc.__islocal) {
|
if(doc.__islocal) {
|
||||||
cur_frm.toggle_display("item_prices_section", false);
|
cur_frm.toggle_display("item_prices_section", false);
|
||||||
@@ -27,9 +29,9 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
|||||||
} else {
|
} else {
|
||||||
cur_frm.cscript.show_item_prices();
|
cur_frm.cscript.show_item_prices();
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
|
||||||
cur_frm.cscript.show_item_prices = function() {
|
show_item_prices: function() {
|
||||||
var item_price = wn.model.get("Item Price", {price_list_name: cur_frm.doc.name});
|
var item_price = wn.model.get("Item Price", {price_list_name: cur_frm.doc.name});
|
||||||
|
|
||||||
var show = item_price && item_price.length;
|
var show = item_price && item_price.length;
|
||||||
@@ -54,3 +56,4 @@ cur_frm.cscript.show_item_prices = function() {
|
|||||||
</table>';
|
</table>';
|
||||||
$(out).appendTo($(cur_frm.fields_dict.item_prices.wrapper));
|
$(out).appendTo($(cur_frm.fields_dict.item_prices.wrapper));
|
||||||
}
|
}
|
||||||
|
});
|
||||||
@@ -82,10 +82,10 @@ def get_profile_args():
|
|||||||
phone = party.phone
|
phone = party.phone
|
||||||
else:
|
else:
|
||||||
mobile_no, phone = webnotes.conn.get_value("Contact", {"email_id": webnotes.session.user,
|
mobile_no, phone = webnotes.conn.get_value("Contact", {"email_id": webnotes.session.user,
|
||||||
"customer": party.name})
|
"customer": party.name}, ["mobile_no", "phone"])
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"company_name": party.customer_name if party.doctype == "Customer" else party.company_name,
|
"company_name": cstr(party.customer_name if party.doctype == "Customer" else party.company_name),
|
||||||
"mobile_no": mobile_no,
|
"mobile_no": cstr(mobile_no),
|
||||||
"phone": phone
|
"phone": cstr(phone)
|
||||||
}
|
}
|
||||||
@@ -186,3 +186,8 @@ fieldset[disabled] .btn-default.active {
|
|||||||
background-color: #a7a9aa;
|
background-color: #a7a9aa;
|
||||||
border-color: #a7a9aa;
|
border-color: #a7a9aa;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.breadcrumb {
|
||||||
|
margin: 0 -20px 20px;
|
||||||
|
border-radius: 0px;
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
$.extend(cur_frm.cscript, {
|
||||||
|
onload: function() {
|
||||||
|
if(cur_frm.doc.__quotation_series) {
|
||||||
|
cur_frm.fields_dict.quotation_series.df.options = cur_frm.doc.__quotation_series;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -9,6 +9,9 @@ from webnotes.model.controller import DocListController
|
|||||||
class ShoppingCartSetupError(webnotes.ValidationError): pass
|
class ShoppingCartSetupError(webnotes.ValidationError): pass
|
||||||
|
|
||||||
class DocType(DocListController):
|
class DocType(DocListController):
|
||||||
|
def onload(self):
|
||||||
|
self.doc.fields["__quotation_series"] = webnotes.get_doctype("Quotation").get_options("naming_series")
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
if self.doc.enabled:
|
if self.doc.enabled:
|
||||||
self.validate_price_lists()
|
self.validate_price_lists()
|
||||||
@@ -17,6 +20,7 @@ class DocType(DocListController):
|
|||||||
|
|
||||||
def on_update(self):
|
def on_update(self):
|
||||||
webnotes.conn.set_default("shopping_cart_enabled", self.doc.fields.get("enabled") or 0)
|
webnotes.conn.set_default("shopping_cart_enabled", self.doc.fields.get("enabled") or 0)
|
||||||
|
webnotes.conn.set_default("shopping_cart_quotation_series", self.doc.fields.get("quotation_series"))
|
||||||
|
|
||||||
def validate_overlapping_territories(self, parentfield, fieldname):
|
def validate_overlapping_territories(self, parentfield, fieldname):
|
||||||
# for displaying message
|
# for displaying message
|
||||||
@@ -92,6 +96,7 @@ class DocType(DocListController):
|
|||||||
for currency in price_list_currency_map.values()
|
for currency in price_list_currency_map.values()
|
||||||
if currency != company_currency]
|
if currency != company_currency]
|
||||||
|
|
||||||
|
if expected_to_exist:
|
||||||
exists = webnotes.conn.sql_list("""select name from `tabCurrency Exchange`
|
exists = webnotes.conn.sql_list("""select name from `tabCurrency Exchange`
|
||||||
where name in (%s)""" % (", ".join(["%s"]*len(expected_to_exist)),),
|
where name in (%s)""" % (", ".join(["%s"]*len(expected_to_exist)),),
|
||||||
tuple(expected_to_exist))
|
tuple(expected_to_exist))
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-06-19 15:57:32",
|
"creation": "2013-06-19 15:57:32",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-10 18:42:29",
|
"modified": "2013-07-15 17:33:05",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -78,6 +78,13 @@
|
|||||||
"options": "Customer Group",
|
"options": "Customer Group",
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"doctype": "DocField",
|
||||||
|
"fieldname": "quotation_series",
|
||||||
|
"fieldtype": "Select",
|
||||||
|
"label": "Quotation Series",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "section_break_6",
|
"fieldname": "section_break_6",
|
||||||
|
|||||||
@@ -58,6 +58,10 @@ def update_cart(item_code, qty, with_doclist=0):
|
|||||||
qty = flt(qty)
|
qty = flt(qty)
|
||||||
if qty == 0:
|
if qty == 0:
|
||||||
quotation.set_doclist(quotation.doclist.get({"item_code": ["!=", item_code]}))
|
quotation.set_doclist(quotation.doclist.get({"item_code": ["!=", item_code]}))
|
||||||
|
if not quotation.doclist.get({"parentfield": "quotation_details"}) and \
|
||||||
|
not quotation.doc.fields.get("__islocal"):
|
||||||
|
quotation.__delete = True
|
||||||
|
|
||||||
else:
|
else:
|
||||||
quotation_items = quotation.doclist.get({"item_code": item_code})
|
quotation_items = quotation.doclist.get({"item_code": item_code})
|
||||||
if not quotation_items:
|
if not quotation_items:
|
||||||
@@ -72,6 +76,10 @@ def update_cart(item_code, qty, with_doclist=0):
|
|||||||
|
|
||||||
apply_cart_settings(quotation=quotation)
|
apply_cart_settings(quotation=quotation)
|
||||||
|
|
||||||
|
if hasattr(quotation, "__delete"):
|
||||||
|
webnotes.delete_doc("Quotation", quotation.doc.name, ignore_permissions=True)
|
||||||
|
quotation = _get_cart_quotation()
|
||||||
|
else:
|
||||||
quotation.ignore_permissions = True
|
quotation.ignore_permissions = True
|
||||||
quotation.save()
|
quotation.save()
|
||||||
|
|
||||||
@@ -191,7 +199,7 @@ def decorate_quotation_doclist(doclist):
|
|||||||
for d in doclist:
|
for d in doclist:
|
||||||
if d.item_code:
|
if d.item_code:
|
||||||
d.fields.update(webnotes.conn.get_value("Item", d.item_code,
|
d.fields.update(webnotes.conn.get_value("Item", d.item_code,
|
||||||
["website_image", "web_short_description", "page_name"], as_dict=True))
|
["website_image", "description", "page_name"], as_dict=True))
|
||||||
d.formatted_rate = fmt_money(d.export_rate, currency=doclist[0].currency)
|
d.formatted_rate = fmt_money(d.export_rate, currency=doclist[0].currency)
|
||||||
d.formatted_amount = fmt_money(d.export_amount, currency=doclist[0].currency)
|
d.formatted_amount = fmt_money(d.export_amount, currency=doclist[0].currency)
|
||||||
elif d.charge_type:
|
elif d.charge_type:
|
||||||
@@ -215,7 +223,7 @@ def _get_cart_quotation(party=None):
|
|||||||
else:
|
else:
|
||||||
qbean = webnotes.bean({
|
qbean = webnotes.bean({
|
||||||
"doctype": "Quotation",
|
"doctype": "Quotation",
|
||||||
"naming_series": "QTN-CART-",
|
"naming_series": webnotes.defaults.get_user_default("shopping_cart_quotation_series") or "QTN-CART-",
|
||||||
"quotation_to": party.doctype,
|
"quotation_to": party.doctype,
|
||||||
"company": webnotes.defaults.get_user_default("company"),
|
"company": webnotes.defaults.get_user_default("company"),
|
||||||
"order_type": "Shopping Cart",
|
"order_type": "Shopping Cart",
|
||||||
@@ -224,7 +232,10 @@ def _get_cart_quotation(party=None):
|
|||||||
(party.doctype.lower()): party.name
|
(party.doctype.lower()): party.name
|
||||||
})
|
})
|
||||||
|
|
||||||
# map_contact_fields(qbean, party)
|
if party.doctype == "Customer":
|
||||||
|
qbean.doc.contact_person = webnotes.conn.get_value("Contact", {"email_id": webnotes.session.user,
|
||||||
|
"customer": party.name})
|
||||||
|
qbean.run_method("set_contact_fields")
|
||||||
|
|
||||||
qbean.run_method("onload_post_render")
|
qbean.run_method("onload_post_render")
|
||||||
apply_cart_settings(party, qbean)
|
apply_cart_settings(party, qbean)
|
||||||
@@ -259,6 +270,7 @@ def update_party(fullname, company_name=None, mobile_no=None, phone=None):
|
|||||||
party_bean.save()
|
party_bean.save()
|
||||||
|
|
||||||
qbean = _get_cart_quotation(party)
|
qbean = _get_cart_quotation(party)
|
||||||
|
if not qbean.doc.fields.get("__islocal"):
|
||||||
qbean.doc.customer_name = company_name or fullname
|
qbean.doc.customer_name = company_name or fullname
|
||||||
qbean.run_method("set_contact_fields")
|
qbean.run_method("set_contact_fields")
|
||||||
qbean.ignore_permissions = True
|
qbean.ignore_permissions = True
|
||||||
@@ -374,27 +386,26 @@ def get_address_territory(address_name):
|
|||||||
|
|
||||||
return territory
|
return territory
|
||||||
|
|
||||||
@webnotes.whitelist()
|
|
||||||
def checkout():
|
|
||||||
quotation = _get_cart_quotation()
|
|
||||||
|
|
||||||
quotation.ignore_permissions = True
|
|
||||||
quotation.submit()
|
|
||||||
|
|
||||||
from selling.doctype.quotation.quotation import make_sales_order
|
|
||||||
|
|
||||||
sales_order = webnotes.bean(make_sales_order(quotation.doc.name))
|
|
||||||
|
|
||||||
sales_order.ignore_permissions = True
|
|
||||||
sales_order.insert()
|
|
||||||
sales_order.submit()
|
|
||||||
|
|
||||||
return sales_order
|
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
test_dependencies = ["Item", "Price List", "Contact"]
|
test_dependencies = ["Item", "Price List", "Contact", "Shopping Cart Settings"]
|
||||||
|
|
||||||
class TestCart(unittest.TestCase):
|
class TestCart(unittest.TestCase):
|
||||||
|
def tearDown(self):
|
||||||
|
return
|
||||||
|
|
||||||
|
cart_settings = webnotes.bean("Shopping Cart Settings")
|
||||||
|
cart_settings.ignore_permissions = True
|
||||||
|
cart_settings.doc.enabled = 0
|
||||||
|
cart_settings.save()
|
||||||
|
|
||||||
|
def enable_shopping_cart(self):
|
||||||
|
return
|
||||||
|
if not webnotes.conn.get_value("Shopping Cart Settings", None, "enabled"):
|
||||||
|
cart_settings = webnotes.bean("Shopping Cart Settings")
|
||||||
|
cart_settings.ignore_permissions = True
|
||||||
|
cart_settings.doc.enabled = 1
|
||||||
|
cart_settings.save()
|
||||||
|
|
||||||
def test_get_lead_or_customer(self):
|
def test_get_lead_or_customer(self):
|
||||||
webnotes.session.user = "test@example.com"
|
webnotes.session.user = "test@example.com"
|
||||||
party1 = get_lead_or_customer()
|
party1 = get_lead_or_customer()
|
||||||
@@ -407,7 +418,9 @@ class TestCart(unittest.TestCase):
|
|||||||
self.assertEquals(party.name, "_Test Customer")
|
self.assertEquals(party.name, "_Test Customer")
|
||||||
|
|
||||||
def test_add_to_cart(self):
|
def test_add_to_cart(self):
|
||||||
|
self.enable_shopping_cart()
|
||||||
webnotes.session.user = "test@example.com"
|
webnotes.session.user = "test@example.com"
|
||||||
|
|
||||||
update_cart("_Test Item", 1)
|
update_cart("_Test Item", 1)
|
||||||
|
|
||||||
quotation = _get_cart_quotation()
|
quotation = _get_cart_quotation()
|
||||||
@@ -440,8 +453,9 @@ class TestCart(unittest.TestCase):
|
|||||||
quotation_items = quotation.doclist.get({"parentfield": "quotation_details", "item_code": "_Test Item"})
|
quotation_items = quotation.doclist.get({"parentfield": "quotation_details", "item_code": "_Test Item"})
|
||||||
self.assertEquals(quotation_items, [])
|
self.assertEquals(quotation_items, [])
|
||||||
|
|
||||||
def test_checkout(self):
|
def test_place_order(self):
|
||||||
quotation = self.test_update_cart()
|
quotation = self.test_update_cart()
|
||||||
sales_order = checkout()
|
sales_order_name = place_order()
|
||||||
|
sales_order = webnotes.bean("Sales Order", sales_order_name)
|
||||||
self.assertEquals(sales_order.doclist.getone({"item_code": "_Test Item"}).prevdoc_docname, quotation.doc.name)
|
self.assertEquals(sales_order.doclist.getone({"item_code": "_Test Item"}).prevdoc_docname, quotation.doc.name)
|
||||||
|
|
||||||
@@ -7,4 +7,7 @@
|
|||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
line-height: 200%;
|
line-height: 200%;
|
||||||
}
|
}
|
||||||
|
.item-stock {
|
||||||
|
margin-bottom: 10px !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -32,8 +32,7 @@
|
|||||||
<p class="help">Item Code: <span itemprop="productID">{{ name }}</span></p>
|
<p class="help">Item Code: <span itemprop="productID">{{ name }}</span></p>
|
||||||
<h4>Product Description</h4>
|
<h4>Product Description</h4>
|
||||||
<div itemprop="description">
|
<div itemprop="description">
|
||||||
{{ web_long_description or web_short_description or description or
|
{{ web_long_description or description or "[No description given]" }}
|
||||||
"[No description given]" }}
|
|
||||||
</div>
|
</div>
|
||||||
<div style="min-height: 100px; margin: 10px 0;">
|
<div style="min-height: 100px; margin: 10px 0;">
|
||||||
<div class="item-price-info" style="display: none;">
|
<div class="item-price-info" style="display: none;">
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ $.extend(wn.cart, {
|
|||||||
'<div style="height: 120px; overflow: hidden;"><img src="' + doc.image + '" /></div>' :
|
'<div style="height: 120px; overflow: hidden;"><img src="' + doc.image + '" /></div>' :
|
||||||
'{% include "app/website/templates/html/product_missing_image.html" %}';
|
'{% include "app/website/templates/html/product_missing_image.html" %}';
|
||||||
|
|
||||||
if(!doc.web_short_description) doc.web_short_description = doc.description;
|
if(doc.description === doc.item_name) doc.description = "";
|
||||||
|
|
||||||
$(repl('<div class="row">\
|
$(repl('<div class="row">\
|
||||||
<div class="col col-lg-9 col-sm-9">\
|
<div class="col col-lg-9 col-sm-9">\
|
||||||
@@ -151,7 +151,7 @@ $.extend(wn.cart, {
|
|||||||
<div class="col col-lg-3">%(image_html)s</div>\
|
<div class="col col-lg-3">%(image_html)s</div>\
|
||||||
<div class="col col-lg-9">\
|
<div class="col col-lg-9">\
|
||||||
<h4><a href="%(page_name)s">%(item_name)s</a></h4>\
|
<h4><a href="%(page_name)s">%(item_name)s</a></h4>\
|
||||||
<p>%(web_short_description)s</p>\
|
<p>%(description)s</p>\
|
||||||
</div>\
|
</div>\
|
||||||
</div>\
|
</div>\
|
||||||
</div>\
|
</div>\
|
||||||
|
|||||||
Reference in New Issue
Block a user