commerce new product type with two diffrent variation type
This commit is contained in:
parent
3be2a932c7
commit
53beb7b00a
|
@ -0,0 +1,17 @@
|
|||
digraph commerce {
|
||||
materio_checkout_flow
|
||||
materio_order_type
|
||||
materio_order_item_type
|
||||
materio_product_licence_variatio[label=<materio_product_licence_variatio<br/><b>no subscription</b>>]
|
||||
materio_product_variation_type[label=<materio_product_variation_type<br/><b>recurring</b>>]
|
||||
|
||||
materio_product_type
|
||||
materio_product_license_type
|
||||
|
||||
materio_order_type -> materio_checkout_flow
|
||||
materio_order_item_type -> materio_order_type
|
||||
materio_product_licence_variatio -> materio_order_item_type
|
||||
materio_product_variation_type -> materio_order_item_type
|
||||
materio_product_type -> materio_product_variation_type
|
||||
materio_product_license_type -> materio_product_licence_variatio
|
||||
}
|
|
@ -74,7 +74,7 @@
|
|||
"drupal/ckeditor_font": "^1.2",
|
||||
"drupal/ckeditor_uploadimage": "^2.0",
|
||||
"drupal/colorbutton": "^1.3",
|
||||
"drupal/commerce": "^2.29.0",
|
||||
"drupal/commerce": "2.x-dev@dev",
|
||||
"drupal/commerce_cart_api": "^1.4",
|
||||
"drupal/commerce_cart_redirection": "^3.0",
|
||||
"drupal/commerce_license": "^2.x-dev@dev",
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "d52543a5e9c33de597427a41497c8de2",
|
||||
"content-hash": "7e5161e71162b953571789b872f90251",
|
||||
"packages": [
|
||||
{
|
||||
"name": "alchemy/zippy",
|
||||
|
@ -4006,17 +4006,11 @@
|
|||
},
|
||||
{
|
||||
"name": "drupal/commerce",
|
||||
"version": "2.29.0",
|
||||
"version": "dev-2.x",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://git.drupalcode.org/project/commerce.git",
|
||||
"reference": "8.x-2.29"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://ftp.drupal.org/files/projects/commerce-8.x-2.29.zip",
|
||||
"reference": "8.x-2.29",
|
||||
"shasum": "189145431fb4e196b3286c96cae8d7764b8fe7bb"
|
||||
"reference": "48c9dcc538557958f1dcea4bf38e0ba912b8261b"
|
||||
},
|
||||
"require": {
|
||||
"commerceguys/intl": "^1.0.0",
|
||||
|
@ -4050,12 +4044,15 @@
|
|||
},
|
||||
"type": "drupal-module",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-2.x": "2.x-dev"
|
||||
},
|
||||
"drupal": {
|
||||
"version": "8.x-2.29",
|
||||
"datestamp": "1643900314",
|
||||
"version": "8.x-2.x-dev",
|
||||
"datestamp": "1647003334",
|
||||
"security-coverage": {
|
||||
"status": "covered",
|
||||
"message": "Covered by Drupal's security advisory policy"
|
||||
"status": "not-covered",
|
||||
"message": "Dev releases are not covered by Drupal security advisories."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -24788,6 +24785,7 @@
|
|||
"drupal/advagg": 20,
|
||||
"drupal/auto_entitylabel": 20,
|
||||
"drupal/better_messages": 15,
|
||||
"drupal/commerce": 20,
|
||||
"drupal/commerce_license": 20,
|
||||
"drupal/commerce_pricelist": 20,
|
||||
"drupal/commerce_recurring": 20,
|
||||
|
|
|
@ -4,7 +4,10 @@ status: true
|
|||
dependencies:
|
||||
module:
|
||||
- commerce_payment
|
||||
- commerce_promotion
|
||||
- commerce_stripe
|
||||
- email_registration
|
||||
- materio_commerce
|
||||
_core:
|
||||
default_config_hash: wwkDVBiXUqSzRifJbb71ajFBklJdNJ_DgS67IF-_qgY
|
||||
label: Default
|
||||
|
@ -12,6 +15,7 @@ id: default
|
|||
plugin: multistep_default
|
||||
configuration:
|
||||
display_checkout_progress: true
|
||||
display_checkout_progress_breadcrumb_links: false
|
||||
panes:
|
||||
login:
|
||||
step: login
|
||||
|
@ -22,16 +26,58 @@ configuration:
|
|||
step: order_information
|
||||
weight: 1
|
||||
double_entry: true
|
||||
billing_information:
|
||||
step: order_information
|
||||
weight: 2
|
||||
review:
|
||||
step: review
|
||||
weight: 3
|
||||
completion_message:
|
||||
step: complete
|
||||
weight: 4
|
||||
weight: 7
|
||||
message:
|
||||
value: "Your order number is [commerce_order:order_number].\r\nYou can view your order on your account page when logged in."
|
||||
format: plain_text
|
||||
order_summary:
|
||||
step: _sidebar
|
||||
weight: 5
|
||||
weight: 9
|
||||
view: commerce_checkout_order_summary
|
||||
completion_register:
|
||||
step: complete
|
||||
weight: 8
|
||||
payment_information:
|
||||
step: order_information
|
||||
weight: 2
|
||||
payment_process:
|
||||
step: payment
|
||||
weight: 6
|
||||
capture: true
|
||||
coupon_redemption:
|
||||
step: _sidebar
|
||||
weight: 10
|
||||
allow_multiple: false
|
||||
stripe_review:
|
||||
step: review
|
||||
weight: 4
|
||||
button_id: edit-actions-next
|
||||
setup_future_usage: ''
|
||||
email_registration_login:
|
||||
step: _disabled
|
||||
weight: 12
|
||||
allow_guest_checkout: true
|
||||
allow_registration: false
|
||||
email_registration_completion_registration:
|
||||
step: _disabled
|
||||
weight: 13
|
||||
materio_commerce_agree_nominative:
|
||||
step: _disabled
|
||||
weight: 11
|
||||
path: null
|
||||
text: null
|
||||
link_text: null
|
||||
invalid_text: 'You must agree with the nominative terms before continuing'
|
||||
materio_commerce_agree_terms:
|
||||
step: review
|
||||
weight: 5
|
||||
path: null
|
||||
link_text: 'Terms and Conditions'
|
||||
prefix_text: 'I agree with the %terms'
|
||||
invalid_text: 'You must agree with the %terms before continuing'
|
||||
new_window: 1
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
uuid: a3e1f865-2647-437a-8339-95e9049f2375
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies: { }
|
||||
id: materio_product_license_type
|
||||
label: 'materio product license type'
|
||||
traits: { }
|
||||
locked: false
|
||||
description: ''
|
||||
variationType: materio_product_licence_variatio
|
||||
variationTypes:
|
||||
- materio_product_licence_variatio
|
||||
- materio_product_variation_type
|
||||
multipleVariations: true
|
||||
injectVariationFields: true
|
|
@ -0,0 +1,21 @@
|
|||
uuid: 1e6371d9-c8ab-473c-88b2-a74e6f118d4b
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies:
|
||||
module:
|
||||
- commerce_license
|
||||
third_party_settings:
|
||||
commerce_license:
|
||||
license_types:
|
||||
role: role
|
||||
activate_on_place: false
|
||||
allow_renewal: true
|
||||
interval: '1'
|
||||
period: month
|
||||
id: materio_product_licence_variatio
|
||||
label: 'materio product licence variation type'
|
||||
traits:
|
||||
- commerce_license
|
||||
locked: false
|
||||
orderItemType: materio_order_item_type
|
||||
generateTitle: false
|
|
@ -13,7 +13,7 @@ third_party_settings:
|
|||
interval: '1'
|
||||
period: month
|
||||
id: materio_product_variation_type
|
||||
label: 'materio product variation type'
|
||||
label: 'materio product licence subscription variation type'
|
||||
traits:
|
||||
- commerce_license
|
||||
- purchasable_entity_subscription
|
||||
|
|
|
@ -0,0 +1,96 @@
|
|||
uuid: 27dd62b8-f7c5-4397-9f3a-fdb6f136c2f6
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- commerce_product.commerce_product_type.materio_product_license_type
|
||||
- field.field.commerce_product.materio_product_license_type.body
|
||||
- field.field.commerce_product.materio_product_license_type.field_price_description
|
||||
module:
|
||||
- commerce
|
||||
- path
|
||||
- text
|
||||
id: commerce_product.materio_product_license_type.default
|
||||
targetEntityType: commerce_product
|
||||
bundle: materio_product_license_type
|
||||
mode: default
|
||||
content:
|
||||
body:
|
||||
type: text_textarea_with_summary
|
||||
weight: 1
|
||||
region: content
|
||||
settings:
|
||||
rows: 9
|
||||
summary_rows: 3
|
||||
placeholder: ''
|
||||
show_summary: false
|
||||
third_party_settings: { }
|
||||
created:
|
||||
type: datetime_timestamp
|
||||
weight: 10
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
field_price_description:
|
||||
type: text_textarea
|
||||
weight: 91
|
||||
region: content
|
||||
settings:
|
||||
rows: 5
|
||||
placeholder: ''
|
||||
third_party_settings: { }
|
||||
langcode:
|
||||
type: language_select
|
||||
weight: 2
|
||||
region: content
|
||||
settings:
|
||||
include_locked: true
|
||||
third_party_settings: { }
|
||||
path:
|
||||
type: path
|
||||
weight: 30
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
status:
|
||||
type: boolean_checkbox
|
||||
weight: 90
|
||||
region: content
|
||||
settings:
|
||||
display_label: true
|
||||
third_party_settings: { }
|
||||
stores:
|
||||
type: commerce_entity_select
|
||||
weight: -10
|
||||
region: content
|
||||
settings:
|
||||
hide_single_entity: true
|
||||
autocomplete_threshold: 7
|
||||
autocomplete_size: 60
|
||||
autocomplete_placeholder: ''
|
||||
third_party_settings: { }
|
||||
title:
|
||||
type: string_textfield
|
||||
weight: -5
|
||||
region: content
|
||||
settings:
|
||||
size: 60
|
||||
placeholder: ''
|
||||
third_party_settings: { }
|
||||
translation:
|
||||
weight: 10
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
uid:
|
||||
type: entity_reference_autocomplete
|
||||
weight: 5
|
||||
region: content
|
||||
settings:
|
||||
match_operator: CONTAINS
|
||||
match_limit: 10
|
||||
size: 60
|
||||
placeholder: ''
|
||||
third_party_settings: { }
|
||||
hidden:
|
||||
variations: true
|
|
@ -0,0 +1,73 @@
|
|||
uuid: 4e26ae2b-7899-4933-9e6a-08a1718e05c8
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- commerce_product.commerce_product_variation_type.materio_product_licence_variatio
|
||||
- field.field.commerce_product_variation.materio_product_licence_variatio.license_expiration
|
||||
- field.field.commerce_product_variation.materio_product_licence_variatio.license_type
|
||||
module:
|
||||
- commerce
|
||||
- commerce_price
|
||||
id: commerce_product_variation.materio_product_licence_variatio.default
|
||||
targetEntityType: commerce_product_variation
|
||||
bundle: materio_product_licence_variatio
|
||||
mode: default
|
||||
content:
|
||||
langcode:
|
||||
type: language_select
|
||||
weight: 2
|
||||
region: content
|
||||
settings:
|
||||
include_locked: true
|
||||
third_party_settings: { }
|
||||
license_expiration:
|
||||
type: commerce_plugin_select
|
||||
weight: 21
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
license_type:
|
||||
type: commerce_plugin_select
|
||||
weight: 20
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
list_price:
|
||||
type: commerce_list_price
|
||||
weight: -1
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
price:
|
||||
type: commerce_price_default
|
||||
weight: 0
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
sku:
|
||||
type: string_textfield
|
||||
weight: -4
|
||||
region: content
|
||||
settings:
|
||||
size: 60
|
||||
placeholder: ''
|
||||
third_party_settings: { }
|
||||
status:
|
||||
type: boolean_checkbox
|
||||
weight: 90
|
||||
region: content
|
||||
settings:
|
||||
display_label: true
|
||||
third_party_settings: { }
|
||||
title:
|
||||
type: string_textfield
|
||||
weight: -5
|
||||
region: content
|
||||
settings:
|
||||
size: 60
|
||||
placeholder: ''
|
||||
third_party_settings: { }
|
||||
hidden:
|
||||
created: true
|
||||
uid: true
|
|
@ -0,0 +1,53 @@
|
|||
uuid: 9e6ae8d7-9897-4d97-a6ee-8535463fe08b
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- commerce_product.commerce_product_type.materio_product_license_type
|
||||
- field.field.commerce_product.materio_product_license_type.body
|
||||
- field.field.commerce_product.materio_product_license_type.field_price_description
|
||||
module:
|
||||
- text
|
||||
id: commerce_product.materio_product_license_type.default
|
||||
targetEntityType: commerce_product
|
||||
bundle: materio_product_license_type
|
||||
mode: default
|
||||
content:
|
||||
body:
|
||||
type: text_default
|
||||
label: above
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
weight: 1
|
||||
region: content
|
||||
field_price_description:
|
||||
type: text_default
|
||||
label: hidden
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
weight: 2
|
||||
region: content
|
||||
title:
|
||||
type: string
|
||||
label: above
|
||||
settings:
|
||||
link_to_entity: false
|
||||
third_party_settings: { }
|
||||
weight: 0
|
||||
region: content
|
||||
variations:
|
||||
type: entity_reference_entity_view
|
||||
label: hidden
|
||||
settings:
|
||||
view_mode: add_to_cart
|
||||
link: false
|
||||
third_party_settings: { }
|
||||
weight: 3
|
||||
region: content
|
||||
hidden:
|
||||
created: true
|
||||
langcode: true
|
||||
search_api_excerpt: true
|
||||
stores: true
|
||||
synonyms: true
|
||||
uid: true
|
|
@ -0,0 +1,48 @@
|
|||
uuid: 9e1988a2-8dae-4aeb-915d-46805d6f6298
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- commerce_product.commerce_product_type.materio_product_license_type
|
||||
- core.entity_view_mode.commerce_product.home_summary
|
||||
- field.field.commerce_product.materio_product_license_type.body
|
||||
- field.field.commerce_product.materio_product_license_type.field_price_description
|
||||
module:
|
||||
- text
|
||||
id: commerce_product.materio_product_license_type.home_summary
|
||||
targetEntityType: commerce_product
|
||||
bundle: materio_product_license_type
|
||||
mode: home_summary
|
||||
content:
|
||||
body:
|
||||
type: text_default
|
||||
label: hidden
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
weight: 1
|
||||
region: content
|
||||
title:
|
||||
type: string
|
||||
label: hidden
|
||||
settings:
|
||||
link_to_entity: false
|
||||
third_party_settings: { }
|
||||
weight: 0
|
||||
region: content
|
||||
variations:
|
||||
type: entity_reference_entity_view
|
||||
label: hidden
|
||||
settings:
|
||||
view_mode: add_to_cart
|
||||
link: false
|
||||
third_party_settings: { }
|
||||
weight: 2
|
||||
region: content
|
||||
hidden:
|
||||
created: true
|
||||
field_price_description: true
|
||||
langcode: true
|
||||
search_api_excerpt: true
|
||||
stores: true
|
||||
synonyms: true
|
||||
uid: true
|
|
@ -0,0 +1,40 @@
|
|||
uuid: 6f8bea43-4418-4039-ab29-f1b5803e409f
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- commerce_product.commerce_product_type.materio_product_license_type
|
||||
- core.entity_view_mode.commerce_product.order_summary
|
||||
- field.field.commerce_product.materio_product_license_type.body
|
||||
- field.field.commerce_product.materio_product_license_type.field_price_description
|
||||
module:
|
||||
- text
|
||||
id: commerce_product.materio_product_license_type.order_summary
|
||||
targetEntityType: commerce_product
|
||||
bundle: materio_product_license_type
|
||||
mode: order_summary
|
||||
content:
|
||||
body:
|
||||
type: text_default
|
||||
label: hidden
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
weight: 1
|
||||
region: content
|
||||
title:
|
||||
type: string
|
||||
label: hidden
|
||||
settings:
|
||||
link_to_entity: false
|
||||
third_party_settings: { }
|
||||
weight: 0
|
||||
region: content
|
||||
hidden:
|
||||
created: true
|
||||
field_price_description: true
|
||||
langcode: true
|
||||
search_api_excerpt: true
|
||||
stores: true
|
||||
synonyms: true
|
||||
uid: true
|
||||
variations: true
|
|
@ -0,0 +1,23 @@
|
|||
uuid: 6be9dad5-a25e-4e00-934d-4147d5a961f3
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- commerce_product.commerce_product_type.materio_product_license_type
|
||||
- field.storage.commerce_product.body
|
||||
module:
|
||||
- text
|
||||
id: commerce_product.materio_product_license_type.body
|
||||
field_name: body
|
||||
entity_type: commerce_product
|
||||
bundle: materio_product_license_type
|
||||
label: Body
|
||||
description: ''
|
||||
required: false
|
||||
translatable: true
|
||||
default_value: { }
|
||||
default_value_callback: null
|
||||
settings:
|
||||
display_summary: false
|
||||
required_summary: false
|
||||
field_type: text_with_summary
|
|
@ -0,0 +1,21 @@
|
|||
uuid: fef2dd85-4997-4ee0-9dfd-5e443dcd1463
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- commerce_product.commerce_product_type.materio_product_license_type
|
||||
- field.storage.commerce_product.field_price_description
|
||||
module:
|
||||
- text
|
||||
id: commerce_product.materio_product_license_type.field_price_description
|
||||
field_name: field_price_description
|
||||
entity_type: commerce_product
|
||||
bundle: materio_product_license_type
|
||||
label: 'Price description'
|
||||
description: ''
|
||||
required: false
|
||||
translatable: true
|
||||
default_value: { }
|
||||
default_value_callback: ''
|
||||
settings: { }
|
||||
field_type: text_long
|
|
@ -0,0 +1,21 @@
|
|||
uuid: fdf75672-dcdf-43cd-b8f8-5f993986e07e
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- commerce_product.commerce_product_variation_type.materio_product_licence_variatio
|
||||
- field.storage.commerce_product_variation.license_expiration
|
||||
module:
|
||||
- commerce
|
||||
id: commerce_product_variation.materio_product_licence_variatio.license_expiration
|
||||
field_name: license_expiration
|
||||
entity_type: commerce_product_variation
|
||||
bundle: materio_product_licence_variatio
|
||||
label: 'License Expiration'
|
||||
description: ''
|
||||
required: true
|
||||
translatable: false
|
||||
default_value: { }
|
||||
default_value_callback: null
|
||||
settings: { }
|
||||
field_type: 'commerce_plugin_item:recurring_period'
|
|
@ -0,0 +1,21 @@
|
|||
uuid: a2390abb-6a52-4285-b01b-a2e43b59c437
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- commerce_product.commerce_product_variation_type.materio_product_licence_variatio
|
||||
- field.storage.commerce_product_variation.license_type
|
||||
module:
|
||||
- commerce
|
||||
id: commerce_product_variation.materio_product_licence_variatio.license_type
|
||||
field_name: license_type
|
||||
entity_type: commerce_product_variation
|
||||
bundle: materio_product_licence_variatio
|
||||
label: 'License Type'
|
||||
description: ''
|
||||
required: true
|
||||
translatable: false
|
||||
default_value: { }
|
||||
default_value_callback: null
|
||||
settings: { }
|
||||
field_type: 'commerce_plugin_item:commerce_license_type'
|
|
@ -0,0 +1,11 @@
|
|||
uuid: afb95e91-4166-489a-9a13-fecfedc72938
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- commerce_product.commerce_product_type.materio_product_license_type
|
||||
id: commerce_product.materio_product_license_type
|
||||
target_entity_type_id: commerce_product
|
||||
target_bundle: materio_product_license_type
|
||||
default_langcode: site_default
|
||||
language_alterable: false
|
|
@ -0,0 +1,16 @@
|
|||
uuid: d8e42c10-738f-4700-bfcc-4c6d7f1152f1
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- commerce_product.commerce_product_variation_type.materio_product_licence_variatio
|
||||
module:
|
||||
- content_translation
|
||||
third_party_settings:
|
||||
content_translation:
|
||||
enabled: true
|
||||
id: commerce_product_variation.materio_product_licence_variatio
|
||||
target_entity_type_id: commerce_product_variation
|
||||
target_bundle: materio_product_licence_variatio
|
||||
default_langcode: site_default
|
||||
language_alterable: true
|
Loading…
Reference in New Issue