Bladeren bron

switched to new commerce product type with mutliple variation types

bach 3 jaren geleden
bovenliggende
commit
9d6f19eeaf

+ 44 - 0
config/sync/core.entity_view_display.commerce_product_variation.materio_product_licence_variatio.add_to_cart.yml

@@ -0,0 +1,44 @@
+uuid: ab56fa3c-d61f-4654-85a2-a8573936df9f
+langcode: en
+status: true
+dependencies:
+  config:
+    - commerce_product.commerce_product_variation_type.materio_product_licence_variatio
+    - core.entity_view_mode.commerce_product_variation.add_to_cart
+    - field.field.commerce_product_variation.materio_product_licence_variatio.field_description
+    - field.field.commerce_product_variation.materio_product_licence_variatio.license_expiration
+    - field.field.commerce_product_variation.materio_product_licence_variatio.license_type
+  module:
+    - commerce_variation_cart_form
+    - text
+third_party_settings:
+  commerce_variation_cart_form:
+    combine: false
+id: commerce_product_variation.materio_product_licence_variatio.add_to_cart
+targetEntityType: commerce_product_variation
+bundle: materio_product_licence_variatio
+mode: add_to_cart
+content:
+  commerce_variation_cart_form:
+    settings: {  }
+    third_party_settings: {  }
+    weight: 1
+    region: content
+  field_description:
+    type: text_default
+    label: hidden
+    settings: {  }
+    third_party_settings: {  }
+    weight: 0
+    region: content
+hidden:
+  langcode: true
+  license_expiration: true
+  license_type: true
+  list_price: true
+  price: true
+  product_id: true
+  search_api_excerpt: true
+  sku: true
+  synonyms: true
+  title: true

+ 18 - 11
config/sync/core.entity_view_display.commerce_product_variation.materio_product_licence_variatio.default.yml

@@ -9,44 +9,51 @@ dependencies:
     - field.field.commerce_product_variation.materio_product_licence_variatio.license_type
   module:
     - commerce_price
+    - commerce_variation_cart_form
     - text
+third_party_settings:
+  commerce_variation_cart_form:
+    combine: true
 id: commerce_product_variation.materio_product_licence_variatio.default
 targetEntityType: commerce_product_variation
 bundle: materio_product_licence_variatio
 mode: default
 content:
+  commerce_variation_cart_form:
+    settings: {  }
+    third_party_settings: {  }
+    weight: 3
+    region: content
   field_description:
     type: text_default
-    label: above
+    label: hidden
     settings: {  }
     third_party_settings: {  }
     weight: 1
     region: content
-  list_price:
+  price:
     type: commerce_price_default
-    label: above
+    label: hidden
     settings:
       strip_trailing_zeroes: false
       currency_display: symbol
     third_party_settings: {  }
-    weight: -1
+    weight: 2
     region: content
-  price:
-    type: commerce_price_default
-    label: above
+  title:
+    type: string
+    label: hidden
     settings:
-      strip_trailing_zeroes: false
-      currency_display: symbol
+      link_to_entity: false
     third_party_settings: {  }
     weight: 0
     region: content
 hidden:
-  commerce_variation_cart_form: true
   langcode: true
   license_expiration: true
   license_type: true
+  list_price: true
   product_id: true
   search_api_excerpt: true
   sku: true
   synonyms: true
-  title: true

+ 51 - 0
config/sync/core.entity_view_display.commerce_product_variation.materio_product_licence_variatio.order_summary.yml

@@ -0,0 +1,51 @@
+uuid: c6ddd2e5-87c0-438b-a7a7-369a443addb5
+langcode: en
+status: true
+dependencies:
+  config:
+    - commerce_product.commerce_product_variation_type.materio_product_licence_variatio
+    - core.entity_view_mode.commerce_product_variation.order_summary
+    - field.field.commerce_product_variation.materio_product_licence_variatio.field_description
+    - field.field.commerce_product_variation.materio_product_licence_variatio.license_expiration
+    - field.field.commerce_product_variation.materio_product_licence_variatio.license_type
+  module:
+    - text
+id: commerce_product_variation.materio_product_licence_variatio.order_summary
+targetEntityType: commerce_product_variation
+bundle: materio_product_licence_variatio
+mode: order_summary
+content:
+  field_description:
+    type: text_default
+    label: hidden
+    settings: {  }
+    third_party_settings: {  }
+    weight: 2
+    region: content
+  product_id:
+    type: entity_reference_entity_view
+    label: hidden
+    settings:
+      view_mode: order_summary
+      link: false
+    third_party_settings: {  }
+    weight: 0
+    region: content
+  title:
+    type: string
+    label: hidden
+    settings:
+      link_to_entity: false
+    third_party_settings: {  }
+    weight: 1
+    region: content
+hidden:
+  commerce_variation_cart_form: true
+  langcode: true
+  license_expiration: true
+  license_type: true
+  list_price: true
+  price: true
+  search_api_excerpt: true
+  sku: true
+  synonyms: true

+ 52 - 0
config/sync/core.entity_view_display.commerce_product_variation.materio_product_licence_variatio.summary.yml

@@ -0,0 +1,52 @@
+uuid: 64366592-bee7-4ed3-ae6a-4b3982d7ccd3
+langcode: en
+status: true
+dependencies:
+  config:
+    - commerce_product.commerce_product_variation_type.materio_product_licence_variatio
+    - core.entity_view_mode.commerce_product_variation.summary
+    - field.field.commerce_product_variation.materio_product_licence_variatio.field_description
+    - field.field.commerce_product_variation.materio_product_licence_variatio.license_expiration
+    - field.field.commerce_product_variation.materio_product_licence_variatio.license_type
+  module:
+    - commerce_price
+id: commerce_product_variation.materio_product_licence_variatio.summary
+targetEntityType: commerce_product_variation
+bundle: materio_product_licence_variatio
+mode: summary
+content:
+  price:
+    type: commerce_price_default
+    label: hidden
+    settings:
+      strip_trailing_zeroes: false
+      currency_display: symbol
+    third_party_settings: {  }
+    weight: 2
+    region: content
+  product_id:
+    type: entity_reference_label
+    label: hidden
+    settings:
+      link: false
+    third_party_settings: {  }
+    weight: 0
+    region: content
+  title:
+    type: string
+    label: hidden
+    settings:
+      link_to_entity: false
+    third_party_settings: {  }
+    weight: 1
+    region: content
+hidden:
+  commerce_variation_cart_form: true
+  field_description: true
+  langcode: true
+  license_expiration: true
+  license_type: true
+  list_price: true
+  search_api_excerpt: true
+  sku: true
+  synonyms: true

+ 33 - 2
config/sync/views.view.pricing_products.yml

@@ -3,7 +3,7 @@ langcode: en
 status: true
 dependencies:
   config:
-    - commerce_product.commerce_product_type.materio_product_type
+    - commerce_product.commerce_product_type.materio_product_license_type
     - field.storage.commerce_product.body
     - system.menu.header
   module:
@@ -405,14 +405,45 @@ display:
           id: type
           table: commerce_product_field_data
           field: type
+          relationship: none
+          group_type: group
+          admin_label: ''
           entity_type: commerce_product
           entity_field: type
           plugin_id: commerce_entity_bundle
+          operator: in
           value:
-            materio_product_type: materio_product_type
+            materio_product_license_type: materio_product_license_type
+          group: 1
+          exposed: false
           expose:
+            operator_id: ''
+            label: ''
+            description: ''
+            use_operator: false
+            operator: ''
             operator_limit_selection: false
             operator_list: {  }
+            identifier: ''
+            required: false
+            remember: false
+            multiple: false
+            remember_roles:
+              authenticated: authenticated
+            reduce: false
+            hide_single_bundle: true
+          is_grouped: false
+          group_info:
+            label: ''
+            description: ''
+            identifier: ''
+            optional: true
+            widget: select
+            multiple: false
+            remember: false
+            default_group: All
+            default_group_multiple: {  }
+            group_items: {  }
         langcode:
           id: langcode
           table: commerce_product_field_data

File diff suppressed because it is too large
+ 0 - 0
web/themes/custom/materiotheme/assets/dist/main.js


BIN
web/themes/custom/materiotheme/assets/dist/main.js.gz


File diff suppressed because it is too large
+ 0 - 0
web/themes/custom/materiotheme/assets/dist/module-pricing.46c403a3723d5309dc4b.bundle.js


BIN
web/themes/custom/materiotheme/assets/dist/module-pricing.46c403a3723d5309dc4b.bundle.js.gz


BIN
web/themes/custom/materiotheme/assets/dist/module-pricing.f39149436228499ed25f.bundle.js.gz


+ 6 - 5
web/themes/custom/materiotheme/vuejs/components/Content/Product.vue

@@ -23,7 +23,7 @@
           </button>
         </div>
       </div>
-      <div v-if="product.id == 3">
+      <div v-if="product.id == 8">
         <a href="/pricing/multijoueur" class="btn">
           {{ $t("default.Ask for a quote") }}
         </a>
@@ -44,14 +44,15 @@ export default {
   props: ['product'],
   mixins: [productsMixins],
   data(){
+    // thoose should be on a field of the variation
     return {
       quantity: 1,
       // showLoginModal:false
       variation_btn_txt: {
-        1: 'Yeees!',
-        2: 'Yay!',
-        3: 'Great!',
-        4: 'OKAY!'
+        6: 'Yeees!',
+        7: 'Yay!',
+        8: 'Great!',
+        9: 'OKAY!'
       }
     }
   },

Some files were not shown because too many files changed in this diff