Commit aec91c6f authored by Sven Franck's avatar Sven Franck

data: hack product/categories to allow displaying variations and size

parent e0036dff
......@@ -155,68 +155,29 @@
}
}
},
"sub_category_list": {
"type": "ListField",
"widget": {
"id": "sub_category_list",
"title_i18n": "portal_type_dict.computer_dict.field_dict.sub_category_list.title",
"description_i18n": "portal_type_dict.computer_dict.field_dict.sub_category_list.description",
"alternate_name": "sub_category_list",
"default_value": null,
"css_class": null,
"hidden": false,
"size": 1,
"items": null,
"select_first_item": true,
"extra_per_item": null,
"extra": null
},
"properties": {
"enabled": true,
"editable": true,
"external_validator": null,
"required": null,
"preserve_whitespace": null,
"unicode": null
},
"messages": {
"external_validator_failed": {
"message": "The input failed the external validator.",
"i18n": "validation_dict.external"
},
"required_not_found": {
"message": "Input is required but no input given.",
"i18n": "validation_dict.required"
},
"unknown_selection": {
"message":"You selected on option not on the menu",
"i18n": "validation_dict.option_not_available"
}
}
},
"parent_category_list": {
"type": "ListField",
"reference_category": {
"type": "StringField",
"widget": {
"id": "parent_category_list",
"title_i18n": "portal_type_dict.computer_dict.field_dict.parent_category_list.title",
"description_i18n": "portal_type_dict.computer_dict.field_dict.parent_category_list.description",
"alternate_name": "parent_category_list",
"id": "reference_category",
"title_i18n": "portal_type_dict.category_dict.field_dict.reference_category.title",
"description_i18n": "portal_type_dict.category_dict.field_dict.reference_category.description",
"alternate_name": "reference_category",
"default_value": null,
"css_class": null,
"hidden": false,
"size": 1,
"items": null,
"select_first_item": true,
"extra_per_item": null,
"extra": null
"display_width": 30,
"maximum_input": null,
"extra": {}
},
"properties": {
"enabled": true,
"editable": true,
"external_validator": null,
"required": null,
"required": true,
"preserve_whitespace": null,
"unicode": null
"unicode": null,
"maximum_length": null,
"truncate": null
},
"messages": {
"external_validator_failed": {
......@@ -227,9 +188,9 @@
"message": "Input is required but no input given.",
"i18n": "validation_dict.required"
},
"unknown_selection": {
"message":"You selected on option not on the menu",
"i18n": "validation_dict.option_not_available"
"too_long": {
"message":"Too much input given.",
"i18n": "validation_dict.too_much_input"
}
}
}
......
This diff is collapsed.
......@@ -5,7 +5,9 @@
"initial_query": {"include_docs": true},
"property_dict": {
"initial_query_url_identifier": "reference",
"spawn_on": "image_list"
"spawn_on": "image_list",
"class_list": "left",
"wrap_gadget": 2
},
"scheme": [{
"position": "content",
......@@ -15,6 +17,8 @@
"generate": "widget",
"type": "carousel",
"property_dict": {
"corners": true,
"class_list": "custom_preview",
"handles": true,
"captions": true,
"captiontheme": "slapos-white",
......
......@@ -559,6 +559,90 @@
}
}
},
"product_subordinate_reference_category": {
"type":"RelationStringField",
"widget": {
"id": "product_subordinate_reference_category",
"title_i18n": "portal_type_dict.product_dict.field_dict.product_subordinate_reference_category.title",
"description_i18n": "portal_type_dict.product_dict.field_dict.product_subordinate_reference_category.description",
"alternate_name": "product_subordinate_reference_category",
"default_value": null,
"css_class": null,
"hidden": null,
"display_width": null,
"display_maxwidth": null,
"maximum_input": null,
"extra": null
},
"properties": {
"enabled": true,
"editable": true,
"maximum_length": null,
"first_item": null,
"extra_item": null,
"external_validator": null,
"items": null,
"list_method": null,
"jump_method": null,
"max_length": null,
"max_linelength": null,
"max_lines": null,
"parameter_list": null,
"portal_type": null,
"catalog_index": null,
"base_category": null,
"allow_jump": null,
"allow_creation": null,
"columns": null,
"container_getter_id": null,
"relation_setter_id": null,
"required": true,
"size": 1,
"sort": null,
"truncate": null,
"unicode": null,
"preserve_whitespace": 0,
"update_method": null
},
"message": {
"external_validator_failed": {
"message": "The input failed the external validator.",
"i18n": "validation_dict.external_validator_failed"
},
"line_too_long": {
"message": "A line was too long.",
"i18n": "validation_dict.line_too_long"
},
"relation_result_ambiguous": {
"message": "Relation_result_ambiguous.",
"i18n": "validation_dict.relation_result_ambiguous"
},
"relation_result_ambiguous": {
"message": "Select appropriate document in the list.",
"i18n": "validation_dict.relation_result_ambiguous"
},
"relation_result_empty": {
"message": "No such document was found.",
"i18n": "validation_dict.relation_result_empty"
},
"relation_result_too_long": {
"message": "Too many documents were found.",
"i18n": "validation_dict.relation_result_too_long"
},
"required_not_found": {
"message": "Input is required but no input given.",
"i18n": "validation_dict.required_not_found"
},
"too_long": {
"message": "You entered too many characters.",
"i18n": "validation_dict.too_long"
},
"too_many_lines": {
"message": "You entered too many lines.",
"i18n": "validation_dict.too_many_lines"
}
}
},
"size_range": {
"type": "StringField",
"widget": {
......@@ -598,6 +682,44 @@
}
}
},
"size_list": {
"type":"MultiListField",
"widget": {
"id": "size_list",
"title_i18n": "portal_type_dict.person_dict.field_dict.size_list.title",
"description_i18n": "portal_type_dict.person_dict.field_dict.size_list.description",
"alternate_name": "size_list",
"default_value": null,
"css_class": null,
"hidden": null,
"items": null,
"size": null,
"view_separator": null,
"extra": null,
"extra_per_item": null
},
"properties": {
"enabled": true,
"editable": true,
"external_validator": null,
"required": null,
"unicode": null
},
"message": {
"external_validator_failed": {
"message": "The input failed the external validator.",
"i18n": "validation_dict.external"
},
"required_not_found": {
"message": "Input required but not found.",
"i18n": "validation_dict.required"
},
"unknown_selection": {
"message": "You selected an item that was not in the list.",
"i18n": "validation_dict.unknown_selection"
}
}
},
"variation_list": {
"type":"MultiListField",
"widget": {
......
{
"property_dict":{},
"children": []
}
\ No newline at end of file
......@@ -23,8 +23,10 @@
},
"view_dict": {
"default": [
{"href": "product_carousel"},
{"href": "product_view"},
{"href": "product_carousel"}
{"href": "product_variations"},
{"href": "product_sizes"}
]
}
}
......
......@@ -18,7 +18,8 @@
"date_created": "2013/10/24",
"weight": "",
"price": 240,
"size_range": "set_023",
"product_subordinate_reference_category": "set_023",
"size_list":["one size"],
"variation_list": ["var_001"],
"subject": ""
}, {
......@@ -40,7 +41,8 @@
"date_created": "2013/09/01",
"weight": "",
"price": 35,
"size_range": "set_025",
"size_list":["XS", "S", "M", "L", "XL", "XXL"],
"product_subordinate_reference_category": "set_025",
"variation_list": ["var_002"],
"subject": ""
}, {
......@@ -62,7 +64,8 @@
"date_created": "2014/02/01",
"weight": "",
"price": 40,
"size_range": "set_025",
"size_list":["XS", "S", "M", "L", "XL", "XXL"],
"product_subordinate_reference_category": "set_025",
"variation_list": ["var_034", "var_035"],
"subject": ""
}, {
......@@ -84,7 +87,8 @@
"date_created": "2014/02/04",
"weight": "",
"price": 65,
"size_range": "set_032",
"size_list":["T0", "T1", "T2", "T3", "T4"],
"product_subordinate_reference_category": "set_032",
"variation_list": ["var_033"],
"subject": ""
}, {
......@@ -106,7 +110,8 @@
"date_created": "2013/11/21",
"weight": "",
"price": 65,
"size_range": "set_025",
"size_list":["XS", "S", "M", "L", "XL", "XXL"],
"product_subordinate_reference_category": "set_025",
"variation_list":["var_031", "var_032"],
"subject": ""
}, {
......@@ -128,7 +133,8 @@
"date_created": "2013/05/16",
"weight": "",
"price": 98,
"size_range": "set_032",
"size_list":["T0", "T1", "T2", "T3", "T4"],
"product_subordinate_reference_category": "set_032",
"variation_list": ["var_028", "var_029", "var_030"],
"subject": ""
}, {
......@@ -150,7 +156,8 @@
"date_created": "2014/03/02",
"weight": "",
"price": 99.95,
"size_range": "set_038",
"size_list":["34", "36", "38", "40", "42"],
"product_subordinate_reference_category": "set_038",
"variation_list": ["var_027"],
"subject": ""
}, {
......@@ -172,7 +179,8 @@
"date_created": "2013/11/21",
"weight": "",
"price": 89,
"size_range": "set_032",
"size_list":["T0", "T1", "T2", "T3", "T4"],
"product_subordinate_reference_category": "set_032",
"variation_list": ["var_026"],
"subject": ""
}, {
......@@ -194,7 +202,8 @@
"date_created": "2012/12/01",
"weight": "",
"price": 45,
"size_range": "set_032",
"size_list":["T0", "T1", "T2", "T3", "T4"],
"product_subordinate_reference_category": "set_032",
"variation_list": ["var_025"],
"subject": "best"
}, {
......@@ -216,7 +225,8 @@
"date_created": "2014/02/09",
"weight": "",
"price": 45,
"size_range": "set_025",
"size_list":["XS", "S", "M", "L", "XL", "XXL"],
"product_subordinate_reference_category": "set_025",
"variation_list": ["var_023", "var_024"],
"subject": ""
}, {
......@@ -238,7 +248,8 @@
"date_created": "2013/10/11",
"weight": "",
"price": 90,
"size_range": "set_023",
"size_list":["one size"],
"product_subordinate_reference_category": "set_023",
"variation_list": ["var_019", "var_020", "var_021", "var_022"],
"subject": ""
}, {
......@@ -260,7 +271,8 @@
"date_created": "2012/09/01",
"weight": "",
"price": 59.95,
"size_range": "set_023",
"size_list":["one size"],
"product_subordinate_reference_category": "set_023",
"variation_list": ["var_017", "var_018"],
"subject": "best"
}, {
......@@ -282,7 +294,8 @@
"date_created": "2013/11/21",
"weight": "",
"price": 130,
"size_range": "set_038",
"size_list":["34", "36", "38", "40", "42"],
"product_subordinate_reference_category": "set_038",
"variation_list": ["var_016"],
"subject": ""
}, {
......@@ -304,7 +317,8 @@
"date_created": "2013/12/21",
"weight": "550.0g",
"price": 180,
"size_range": "set_023",
"size_list":["one size"],
"product_subordinate_reference_category": "set_023",
"variation_list": ["var_012", "var_013", "var_014", "var_015"],
"subject": ""
}, {
......@@ -326,7 +340,8 @@
"date_created": "2014/01/01",
"weight": "",
"price": 180,
"size_range": "set_023",
"size_list":["one size"],
"product_subordinate_reference_category": "set_023",
"variation_list": ["var_007", "var_008", "var_009", "var_010", "var_011"],
"subject": "best"
} , {
......@@ -348,7 +363,8 @@
"date_created": "2014/04/02",
"weight": "",
"price": 95,
"size_range": "set_025",
"size_list":["XS", "S", "M", "L", "XL", "XXL"],
"product_subordinate_reference_category": "set_025",
"variation_list": ["var_006"],
"subject": ""
}, {
......@@ -370,7 +386,8 @@
"date_created": "2013/12/21",
"weight": "",
"price": 160,
"size_range": "set_025",
"size_list":["XS", "S", "M", "L", "XL", "XXL"],
"product_subordinate_reference_category": "set_025",
"variation_list": ["var_005"],
"subject": ""
}, {
......@@ -391,7 +408,8 @@
"date_created": "2014/02/01",
"weight": "",
"price": 115,
"size_range": "set_025",
"size_list":["XS", "S", "M", "L", "XL", "XXL"],
"product_subordinate_reference_category": "set_025",
"variation_list": ["var_004"],
"subject": "best"
}, {
......@@ -413,7 +431,8 @@
"date_created": "2013/12/01",
"weight": "",
"price": 95,
"size_range": "set_025",
"size_list":["XS", "S", "M", "L", "XL", "XXL"],
"product_subordinate_reference_category": "set_025",
"variation_list":["var_003"],
"subject": ""
}
......
{
"portal_type_source": "Product",
"portal_type_title": "product",
"skip_total_records": true,
"initial_query": {"include_docs": true},
"property_dict": {
"initial_query_url_identifier": "_id",
"spawn_on": "size_list",
"wrap_gadget": 2,
"class_list": "left"
},
"scheme":[{
"position": "center",
"field_list":[
{"field": "size_list", "type": "span"}
]
}, {
"position": "right",
"field_list": [
{"field": "_id", "setKey": "id", "type": "radio"}
]
}],
"children": [{
"type": "h3",
"direct": {"className": "translate"},
"attributes": {"data-i18n": "global_dict.choose_size"}
}, {
"generate": "widget",
"type": "listview",
"property_dict": {
"inset": "true",
"class_list": "custom_force_position",
"map_children": "listItem",
"dynamic": true
},
"children":[]
}]
}
\ No newline at end of file
{
"portal_type_source": "Product Individual Variation",
"portal_type_title": "product_individual_variation",
"skip_total_records": true,
"initial_query": {"include_docs": true},
"property_dict": {
"initial_query_url_identifier": "reference",
"wrap_gadget": 2,
"class_list": "left"
},
"scheme":[{
"position": "center",
"field_list":[
{"field": "title", "type": "h3"}
]
}, {
"position": "right",
"field_list": [
{"field": "_id", "setKey": "id", "type": "radio"}
]
}],
"children": [{
"type": "h3",
"direct": {"className": "translate"},
"attributes": {"data-i18n": "global_dict.choose_color"}
}, {
"generate": "widget",
"type": "listview",
"property_dict": {
"inset": "true",
"class_list": "custom_force_position",
"map_children": "listItem",
"dynamic": true
},
"children":[]
}]
}
\ No newline at end of file
......@@ -2,33 +2,48 @@
"portal_type_source": "Product",
"portal_type_title": "product",
"skip_total_records": true,
"initial_query": {"include_docs": true, "limit": [0,1], "select_list": ["currency", "_id", "brand", "description_short", "price", "default_image_path"]},
"initial_query": {"include_docs": true, "limit": [0,1]},
"property_dict": {
"initial_query_url_indentifier": "_id"
"initial_query_url_indentifier": "_id",
"direct_map": true,
"wrap_gadget": 2,
"class_list": "left"
},
"scheme": [
{
"position": "left",
"field_list": [
{"field": "default_image_path", "type":"image"}
]
}, {
"position": "center",
"field_list": [
{"field": "brand", "type": "h3", "mergeText": "description_short"},
{"field": "price", "type": "p", "format": {"type": "integer", "digits": 2}, "mergeText": "currency"}
]
}
],
"children": [{
"generate": "widget",
"type": "listview",
"type": "controlbar",
"property_dict": {
"class_list": "responsive",
"theme": "slapos-white",
"map_children": "listItem",
"dynamic": true
},
"children":[]
"children": [
{
"type": "h3",
"direct": {"className": "product_headline"},
"logic": {"setParam": [["text", "brand"]]}
},
{
"type": "p",
"direct": {"className": "product_headline_short"},
"logic": {"setParam": [["text", "description_short"]]}
},
{
"type": "p",
"direct": {"className": "product_headline_price ui-li-aside"},
"logic": {"setParam": [["text", "price"], ["text", "currency"]]}
},
{
"type": "hr",
"direct": {"className": "ui-hr"}
},
{
"type": "p",
"direct": {"className": "product_desc ui-content-element"},
"logic": {"setParam": [["text", "description_long"]]}
},
{
"type": "hr",
"direct": {"className": "ui-hr"}
}
]
}]
}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment