mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-06 23:10:26 +00:00
added products + cleanups
This commit is contained in:
@@ -5,14 +5,13 @@
|
||||
{
|
||||
'creation': '2012-01-23 17:05:32',
|
||||
'docstatus': 0,
|
||||
'modified': '2012-01-27 14:30:06',
|
||||
'modified': '2012-01-30 12:19:11',
|
||||
'modified_by': 'Administrator',
|
||||
'owner': 'Administrator'
|
||||
},
|
||||
|
||||
# These values are common for all Module Def Role
|
||||
{
|
||||
'__islocal': 1,
|
||||
'doctype': 'Module Def Role',
|
||||
'name': '__common__',
|
||||
'parent': 'Website',
|
||||
@@ -22,7 +21,6 @@
|
||||
|
||||
# These values are common for all Module Def Item
|
||||
{
|
||||
'__islocal': 1,
|
||||
'doctype': 'Module Def Item',
|
||||
'name': '__common__',
|
||||
'parent': 'Website',
|
||||
@@ -70,30 +68,6 @@
|
||||
'doctype': 'Module Def Item'
|
||||
},
|
||||
|
||||
# Module Def Item
|
||||
{
|
||||
'display_name': 'Top Bar Settings',
|
||||
'doc_name': 'Top Bar Settings',
|
||||
'doc_type': 'Single DocType',
|
||||
'doctype': 'Module Def Item'
|
||||
},
|
||||
|
||||
# Module Def Item
|
||||
{
|
||||
'display_name': 'Contact Us Settings',
|
||||
'doc_name': 'Contact Us Settings',
|
||||
'doc_type': 'Single DocType',
|
||||
'doctype': 'Module Def Item'
|
||||
},
|
||||
|
||||
# Module Def Item
|
||||
{
|
||||
'display_name': 'Home Settings',
|
||||
'doc_name': 'Home Settings',
|
||||
'doc_type': 'Single DocType',
|
||||
'doctype': 'Module Def Item'
|
||||
},
|
||||
|
||||
# Module Def Item
|
||||
{
|
||||
'display_name': 'About Us Settings',
|
||||
@@ -118,6 +92,14 @@
|
||||
'doctype': 'Module Def Item'
|
||||
},
|
||||
|
||||
# Module Def Item
|
||||
{
|
||||
'display_name': 'Products Settings',
|
||||
'doc_name': 'Products Settings',
|
||||
'doc_type': 'Single DocType',
|
||||
'doctype': 'Module Def Item'
|
||||
},
|
||||
|
||||
# Module Def Role
|
||||
{
|
||||
'doctype': 'Module Def Role',
|
||||
|
||||
0
erpnext/website/doctype/product_group/__init__.py
Normal file
0
erpnext/website/doctype/product_group/__init__.py
Normal file
57
erpnext/website/doctype/product_group/product_group.txt
Normal file
57
erpnext/website/doctype/product_group/product_group.txt
Normal file
@@ -0,0 +1,57 @@
|
||||
# DocType, Product Group
|
||||
[
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2012-01-30 12:17:12',
|
||||
'docstatus': 0,
|
||||
'modified': '2012-01-30 12:17:12',
|
||||
'modified_by': 'Administrator',
|
||||
'owner': 'Administrator'
|
||||
},
|
||||
|
||||
# These values are common for all DocType
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'doctype': 'DocType',
|
||||
'istable': 1,
|
||||
'module': 'Website',
|
||||
'name': '__common__',
|
||||
'section_style': 'Simple',
|
||||
'show_in_menu': 0,
|
||||
'version': 1
|
||||
},
|
||||
|
||||
# These values are common for all DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'name': '__common__',
|
||||
'parent': 'Product Group',
|
||||
'parentfield': 'fields',
|
||||
'parenttype': 'DocType',
|
||||
'permlevel': 0
|
||||
},
|
||||
|
||||
# DocType, Product Group
|
||||
{
|
||||
'doctype': 'DocType',
|
||||
'name': 'Product Group'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'item_group',
|
||||
'fieldtype': 'Link',
|
||||
'label': 'Item Group',
|
||||
'options': 'Item Group'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'label',
|
||||
'fieldtype': 'Data',
|
||||
'label': 'Label'
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,72 @@
|
||||
# DocType, Products Settings
|
||||
[
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2012-01-30 12:15:00',
|
||||
'docstatus': 0,
|
||||
'modified': '2012-01-30 13:50:53',
|
||||
'modified_by': 'Administrator',
|
||||
'owner': 'Administrator'
|
||||
},
|
||||
|
||||
# These values are common for all DocType
|
||||
{
|
||||
'_last_update': '1327906116',
|
||||
'colour': 'White:FFF',
|
||||
'description': 'Products are automatically updated from the item master. To add products to the website, go to the <a href="#!List/Item">Item master</a> and check "Show in Website" in the "Website Details"\n\n',
|
||||
'doctype': 'DocType',
|
||||
'issingle': 1,
|
||||
'module': 'Website',
|
||||
'name': '__common__',
|
||||
'section_style': 'Simple',
|
||||
'show_in_menu': 0,
|
||||
'version': 3
|
||||
},
|
||||
|
||||
# These values are common for all DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': 'Product Groups that are listed on the website. The first product group from this list will be listed by default on the "Products Page"',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'groups',
|
||||
'fieldtype': 'Table',
|
||||
'label': 'Groups',
|
||||
'name': '__common__',
|
||||
'options': 'Product Group',
|
||||
'parent': 'Products Settings',
|
||||
'parentfield': 'fields',
|
||||
'parenttype': 'DocType',
|
||||
'permlevel': 0
|
||||
},
|
||||
|
||||
# These values are common for all DocPerm
|
||||
{
|
||||
'create': 1,
|
||||
'doctype': 'DocPerm',
|
||||
'name': '__common__',
|
||||
'parent': 'Products Settings',
|
||||
'parentfield': 'permissions',
|
||||
'parenttype': 'DocType',
|
||||
'permlevel': 0,
|
||||
'read': 1,
|
||||
'role': 'Website Manager',
|
||||
'write': 1
|
||||
},
|
||||
|
||||
# DocType, Products Settings
|
||||
{
|
||||
'doctype': 'DocType',
|
||||
'name': 'Products Settings'
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
'doctype': 'DocPerm'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField'
|
||||
}
|
||||
]
|
||||
@@ -1,4 +1,3 @@
|
||||
wn.require('lib/js/lib/prettydate.js')
|
||||
|
||||
pscript.onload_blog = function(wrapper) {
|
||||
wrapper.blog_list = new wn.widgets.Listing({
|
||||
|
||||
27
erpnext/website/page/products/README.md
Normal file
27
erpnext/website/page/products/README.md
Normal file
@@ -0,0 +1,27 @@
|
||||
## Products
|
||||
|
||||
Contains
|
||||
|
||||
- List of Products tagged by Item master
|
||||
- image
|
||||
- short description (md)
|
||||
- pricing info (if public) (public pricelist)
|
||||
- stock info (website warehouse)
|
||||
- Search
|
||||
- Sidebar contains categories (# of items in each category)
|
||||
|
||||
When Item is Saved, a page for that item is created with
|
||||
|
||||
- Large image
|
||||
- Smaller images
|
||||
- Long Description
|
||||
- Pricing info
|
||||
- Stock info
|
||||
- Contact Button (instead of Buy / Add to cart)
|
||||
|
||||
### Steps
|
||||
|
||||
- update item master
|
||||
- update item category (show in web + priority) (or in a products settings page)
|
||||
- # of public items in each category
|
||||
- validation - item cannot have show in item if parent does not have it
|
||||
0
erpnext/website/page/products/__init__.py
Normal file
0
erpnext/website/page/products/__init__.py
Normal file
11
erpnext/website/page/products/products.html
Normal file
11
erpnext/website/page/products/products.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<div class="layout_wrapper" id="content-products">
|
||||
<div class="web-main-section">
|
||||
<h2 class="products-category"></h2>
|
||||
<div class="products-search">
|
||||
<input name="products-search" /><button class="btn">Search</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="web-side-section">
|
||||
<h3>Categories</h3>
|
||||
</div>
|
||||
</div>
|
||||
11
erpnext/website/page/products/products.js
Normal file
11
erpnext/website/page/products/products.js
Normal file
@@ -0,0 +1,11 @@
|
||||
erpnext.products = {}
|
||||
|
||||
pscript.onload_products = function(wrapper) {
|
||||
// get erpnext.products.default_category
|
||||
|
||||
// make search box
|
||||
|
||||
// make main listing based on default category
|
||||
|
||||
// make sidelisting of categories
|
||||
}
|
||||
43
erpnext/website/page/products/products.txt
Normal file
43
erpnext/website/page/products/products.txt
Normal file
@@ -0,0 +1,43 @@
|
||||
# Page, products
|
||||
[
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2012-01-30 10:49:01',
|
||||
'docstatus': 0,
|
||||
'modified': '2012-01-30 10:49:01',
|
||||
'modified_by': 'Administrator',
|
||||
'owner': 'Administrator'
|
||||
},
|
||||
|
||||
# These values are common for all Page
|
||||
{
|
||||
'doctype': 'Page',
|
||||
'module': 'Website',
|
||||
'name': '__common__',
|
||||
'page_name': 'products',
|
||||
'standard': 'Yes',
|
||||
'title': 'Products'
|
||||
},
|
||||
|
||||
# These values are common for all Page Role
|
||||
{
|
||||
'doctype': 'Page Role',
|
||||
'name': '__common__',
|
||||
'parent': 'products',
|
||||
'parentfield': 'roles',
|
||||
'parenttype': 'Page',
|
||||
'role': 'Guest'
|
||||
},
|
||||
|
||||
# Page, products
|
||||
{
|
||||
'doctype': 'Page',
|
||||
'name': 'products'
|
||||
},
|
||||
|
||||
# Page Role
|
||||
{
|
||||
'doctype': 'Page Role'
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user