2013-08-05 09:29:54 +00:00
|
|
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
|
|
|
|
# License: GNU General Public License v3. See license.txt
|
|
|
|
|
2013-09-10 12:59:39 +00:00
|
|
|
import webnotes
|
|
|
|
from webnotes.utils import cint
|
2013-09-10 10:19:18 +00:00
|
|
|
|
2013-09-11 10:01:58 +00:00
|
|
|
def get_website_settings(context):
|
|
|
|
post_login = []
|
|
|
|
cart_enabled = cint(webnotes.conn.get_default("shopping_cart_enabled"))
|
|
|
|
if cart_enabled:
|
|
|
|
post_login += [{"label": "Cart", "url": "cart", "icon": "icon-shopping-cart", "class": "cart-count"},
|
|
|
|
{"class": "divider"}]
|
|
|
|
|
|
|
|
post_login += [
|
|
|
|
{"label": "Profile", "url": "profile", "icon": "icon-user"},
|
|
|
|
{"label": "Addresses", "url": "addresses", "icon": "icon-map-marker"},
|
|
|
|
{"label": "My Orders", "url": "orders", "icon": "icon-list"},
|
|
|
|
{"label": "My Tickets", "url": "tickets", "icon": "icon-tags"},
|
|
|
|
{"label": "Invoices", "url": "invoices", "icon": "icon-file-text"},
|
|
|
|
{"label": "Shipments", "url": "shipments", "icon": "icon-truck"},
|
|
|
|
{"class": "divider"}
|
|
|
|
]
|
|
|
|
context.update({
|
|
|
|
"shopping_cart_enabled": cart_enabled,
|
|
|
|
"post_login": post_login + context.get("post_login", [])
|
|
|
|
})
|