fix: docs link for store page in shopping cart settings

This commit is contained in:
prssanna 2021-02-01 18:57:30 +05:30
parent cee3670167
commit 7863118994
2 changed files with 19 additions and 1 deletions

View File

@ -12,6 +12,18 @@ frappe.ui.form.on("Shopping Cart Settings", {
return { 'filters': { 'payment_channel': "Email" } };
});
},
refresh: function(frm) {
if (frm.doc.enabled) {
frm.get_field('store_page_docs').$wrapper.removeClass('hide-control').html(
`<div>${__("Follow these steps to create a landing page for your store")}:
<a href="https://docs.erpnext.com/docs/user/manual/en/website/store-landing-page"
style="color: var(--gray-600)">
docs/store-landing-page
</a>
</div>`
);
}
},
enabled: function(frm) {
if (frm.doc.enabled === 1) {
frm.set_value('enable_variants', 1);

View File

@ -7,6 +7,7 @@
"engine": "InnoDB",
"field_order": [
"enabled",
"store_page_docs",
"display_settings",
"show_attachments",
"show_price",
@ -174,13 +175,18 @@
"fieldname": "save_quotations_as_draft",
"fieldtype": "Check",
"label": "Save Quotations as Draft"
},
{
"depends_on": "doc.enabled",
"fieldname": "store_page_docs",
"fieldtype": "HTML"
}
],
"icon": "fa fa-shopping-cart",
"idx": 1,
"issingle": 1,
"links": [],
"modified": "2020-09-24 16:28:07.192525",
"modified": "2021-02-01 18:18:54.606535",
"modified_by": "Administrator",
"module": "Shopping Cart",
"name": "Shopping Cart Settings",