refactored front pricing to use graphql, refactored to add 2 products (web & web+showroom) each one with 2 variations (monthly, annual)

This commit is contained in:
2021-01-04 22:11:11 +01:00
parent 830f5a5909
commit 7f027f322c
15 changed files with 967 additions and 59 deletions

View File

@@ -7,6 +7,7 @@ dependencies:
- field.field.commerce_product_variation.materio_product_variation_type.billing_schedule
- field.field.commerce_product_variation.materio_product_variation_type.field_description
- field.field.commerce_product_variation.materio_product_variation_type.field_multiple
- field.field.commerce_product_variation.materio_product_variation_type.field_price_description
- field.field.commerce_product_variation.materio_product_variation_type.license_expiration
- field.field.commerce_product_variation.materio_product_variation_type.license_type
- field.field.commerce_product_variation.materio_product_variation_type.subscription_type
@@ -40,6 +41,14 @@ content:
third_party_settings: { }
type: boolean_checkbox
region: content
field_price_description:
weight: 94
settings:
rows: 5
placeholder: ''
third_party_settings: { }
type: text_textarea
region: content
langcode:
type: language_select
weight: 2

View File

@@ -7,6 +7,8 @@ dependencies:
- core.entity_view_mode.commerce_product_variation.add_to_cart
- field.field.commerce_product_variation.materio_product_variation_type.billing_schedule
- field.field.commerce_product_variation.materio_product_variation_type.field_description
- field.field.commerce_product_variation.materio_product_variation_type.field_multiple
- field.field.commerce_product_variation.materio_product_variation_type.field_price_description
- field.field.commerce_product_variation.materio_product_variation_type.license_expiration
- field.field.commerce_product_variation.materio_product_variation_type.license_type
- field.field.commerce_product_variation.materio_product_variation_type.subscription_type
@@ -29,6 +31,7 @@ hidden:
billing_schedule: true
field_description: true
field_multiple: true
field_price_description: true
langcode: true
license_expiration: true
license_type: true

View File

@@ -7,6 +7,7 @@ dependencies:
- field.field.commerce_product_variation.materio_product_variation_type.billing_schedule
- field.field.commerce_product_variation.materio_product_variation_type.field_description
- field.field.commerce_product_variation.materio_product_variation_type.field_multiple
- field.field.commerce_product_variation.materio_product_variation_type.field_price_description
- field.field.commerce_product_variation.materio_product_variation_type.license_expiration
- field.field.commerce_product_variation.materio_product_variation_type.license_type
- field.field.commerce_product_variation.materio_product_variation_type.subscription_type
@@ -44,6 +45,13 @@ content:
format_custom_true: ''
format_custom_false: ''
third_party_settings: { }
field_price_description:
weight: 5
label: above
settings: { }
third_party_settings: { }
type: text_default
region: content
price:
type: commerce_price_default
weight: 2

View File

@@ -8,6 +8,7 @@ dependencies:
- field.field.commerce_product_variation.materio_product_variation_type.billing_schedule
- field.field.commerce_product_variation.materio_product_variation_type.field_description
- field.field.commerce_product_variation.materio_product_variation_type.field_multiple
- field.field.commerce_product_variation.materio_product_variation_type.field_price_description
- field.field.commerce_product_variation.materio_product_variation_type.license_expiration
- field.field.commerce_product_variation.materio_product_variation_type.license_type
- field.field.commerce_product_variation.materio_product_variation_type.subscription_type
@@ -41,6 +42,7 @@ hidden:
billing_schedule: true
commerce_variation_cart_form: true
field_multiple: true
field_price_description: true
langcode: true
license_expiration: true
license_type: true

View File

@@ -0,0 +1,21 @@
uuid: 40f453ec-fa1a-4367-bdef-a74bab61d5ad
langcode: en
status: true
dependencies:
config:
- commerce_product.commerce_product_variation_type.materio_product_variation_type
- field.storage.commerce_product_variation.field_price_description
module:
- text
id: commerce_product_variation.materio_product_variation_type.field_price_description
field_name: field_price_description
entity_type: commerce_product_variation
bundle: materio_product_variation_type
label: 'price description'
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: text_long

View File

@@ -0,0 +1,23 @@
uuid: 9a3272dc-0077-4def-bd19-6c401287e4a3
langcode: en
status: true
dependencies:
module:
- commerce_product
- field_permissions
- text
third_party_settings:
field_permissions:
permission_type: public
id: commerce_product_variation.field_price_description
field_name: field_price_description
entity_type: commerce_product_variation
type: text_long
settings: { }
module: text
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

View File

@@ -1,9 +1,10 @@
uuid: 85b6fa75-c392-415a-9e3f-58322aeba35f
langcode: en
status: true
status: false
dependencies:
config:
- commerce_product.commerce_product_variation_type.materio_product_variation_type
- core.entity_view_mode.commerce_product_variation.add_to_cart
- field.storage.commerce_product_variation.field_description
- field.storage.commerce_product_variation.field_multiple
- system.menu.header
@@ -464,6 +465,57 @@ display:
separator: ', '
field_api_classes: false
plugin_id: field
rendered_entity:
id: rendered_entity
table: commerce_product_variation
field: rendered_entity
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
view_mode: add_to_cart
entity_type: commerce_product_variation
plugin_id: rendered_entity
filters:
status:
value: '1'
@@ -505,6 +557,11 @@ display:
- 'languages:language_interface'
- url.query_args
tags:
- 'config:core.entity_view_display.commerce_product_variation.default.cart'
- 'config:core.entity_view_display.commerce_product_variation.default.summary'
- 'config:core.entity_view_display.commerce_product_variation.materio_product_variation_type.add_to_cart'
- 'config:core.entity_view_display.commerce_product_variation.materio_product_variation_type.default'
- 'config:core.entity_view_display.commerce_product_variation.materio_product_variation_type.summary'
- 'config:field.storage.commerce_product_variation.field_description'
- 'config:field.storage.commerce_product_variation.field_multiple'
page_1:
@@ -584,6 +641,7 @@ display:
- 'config:core.entity_view_display.commerce_product_variation.default.summary'
- 'config:core.entity_view_display.commerce_product_variation.materio_product_variation_type.add_to_cart'
- 'config:core.entity_view_display.commerce_product_variation.materio_product_variation_type.default'
- 'config:core.entity_view_display.commerce_product_variation.materio_product_variation_type.summary'
rest_export_1:
display_plugin: rest_export
id: rest_export_1
@@ -633,5 +691,10 @@ display:
- 'languages:language_interface'
- request_format
tags:
- 'config:core.entity_view_display.commerce_product_variation.default.cart'
- 'config:core.entity_view_display.commerce_product_variation.default.summary'
- 'config:core.entity_view_display.commerce_product_variation.materio_product_variation_type.add_to_cart'
- 'config:core.entity_view_display.commerce_product_variation.materio_product_variation_type.default'
- 'config:core.entity_view_display.commerce_product_variation.materio_product_variation_type.summary'
- 'config:field.storage.commerce_product_variation.field_description'
- 'config:field.storage.commerce_product_variation.field_multiple'

View File

@@ -0,0 +1,569 @@
uuid: 4b5e7b90-17fd-49e5-9306-6c2f2d4da413
langcode: en
status: true
dependencies:
config:
- commerce_product.commerce_product_type.materio_product_type
- field.storage.commerce_product.body
module:
- commerce
- commerce_product
- rest
- serialization
- text
id: pricing_products
label: Pricing
module: views
description: ''
tag: ''
base_table: commerce_product_field_data
base_field: product_id
display:
default:
display_plugin: default
id: default
display_title: Master
position: 0
display_options:
access:
type: none
options: { }
cache:
type: tag
options: { }
query:
type: views_query
options:
disable_sql_rewrite: false
distinct: false
replica: false
query_comment: ''
query_tags: { }
exposed_form:
type: basic
options:
submit_button: Apply
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
expose_sort_order: true
sort_asc_label: Asc
sort_desc_label: Desc
pager:
type: mini
options:
items_per_page: 10
offset: 0
id: 0
total_pages: null
expose:
items_per_page: false
items_per_page_label: 'Items per page'
items_per_page_options: '5, 10, 25, 50'
items_per_page_options_all: false
items_per_page_options_all_label: '- All -'
offset: false
offset_label: Offset
tags:
previous:
next:
style:
type: default
options:
grouping: { }
row_class: ''
default_row_class: true
row:
type: fields
fields:
title:
table: commerce_product_field_data
field: title
id: title
entity_type: null
entity_field: title
plugin_id: field
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: true
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: string
settings: { }
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
body:
id: body
table: commerce_product__body
field: body
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: text_default
settings: { }
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
plugin_id: field
product_id:
id: product_id
table: commerce_product_field_data
field: product_id
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: true
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: number_integer
settings:
thousand_separator: ''
prefix_suffix: true
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
entity_type: commerce_product
entity_field: product_id
plugin_id: field
uuid:
id: uuid
table: commerce_product
field: uuid
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: true
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: string
settings:
link_to_entity: false
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
entity_type: commerce_product
entity_field: uuid
plugin_id: field
variations_target_id:
id: variations_target_id
table: commerce_product__variations
field: variations_target_id
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: target_id
type: entity_reference_entity_view
settings:
view_mode: add_to_cart
group_column: target_id
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: ul
separator: ', '
field_api_classes: false
entity_type: commerce_product
entity_field: variations
plugin_id: field
filters:
status:
value: '1'
table: commerce_product_field_data
field: status
plugin_id: boolean
entity_type: commerce_product
entity_field: status
id: status
expose:
operator: ''
operator_limit_selection: false
operator_list: { }
group: 1
type:
id: type
table: commerce_product_field_data
field: type
value:
materio_product_type: materio_product_type
entity_type: commerce_product
entity_field: type
plugin_id: commerce_entity_bundle
expose:
operator_limit_selection: false
operator_list: { }
sorts: { }
title: Pricing
header: { }
footer: { }
empty: { }
relationships: { }
arguments: { }
display_extenders: { }
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url.query_args
tags:
- 'config:field.storage.commerce_product.body'
page_1:
display_plugin: page
id: page_1
display_title: Page
position: 1
display_options:
display_extenders:
views_ef_fieldset: { }
path: pricing
group_by: false
defaults:
group_by: false
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url.query_args
tags:
- 'config:field.storage.commerce_product.body'
rest_export_1:
display_plugin: rest_export
id: rest_export_1
display_title: 'REST export'
position: 2
display_options:
display_extenders:
views_ef_fieldset: { }
path: pricing_rest
style:
type: serializer
defaults:
style: false
row: false
fields: false
row:
type: data_field
options:
field_options:
title:
alias: ''
raw_output: false
body:
alias: ''
raw_output: false
variations_target_id:
alias: variations
raw_output: false
pager:
type: some
options:
items_per_page: 10
offset: 0
fields:
product_id:
id: product_id
table: commerce_product_field_data
field: product_id
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: number_integer
settings:
thousand_separator: ''
prefix_suffix: false
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
entity_type: commerce_product
entity_field: product_id
plugin_id: field
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- request_format
tags: { }