├── .gitignore ├── .travis-before-script.sh ├── .travis-simpletest-js.sh ├── .travis.yml ├── README.md ├── commerce.api.php ├── commerce.info.yml ├── commerce.install ├── commerce.libraries.yml ├── commerce.links.menu.yml ├── commerce.module ├── commerce.permissions.yml ├── commerce.plugin_type.yml ├── commerce.routing.yml ├── commerce.services.yml ├── composer.json ├── config └── schema │ └── commerce.schema.yml ├── css └── commerce.icons.css ├── drupalci.yml ├── icons ├── 787878 │ ├── cart.png │ ├── cart.svg │ ├── drupal-cart.png │ └── drupal-cart.svg ├── 000000 │ ├── cart.png │ ├── cart.svg │ ├── drupal-cart.png │ └── drupal-cart.svg ├── 5181c6 │ ├── cart.png │ ├── cart.svg │ ├── drupal-cart.png │ └── drupal-cart.svg ├── 73b355 │ ├── cart.png │ ├── cart.svg │ ├── drupal-cart.png │ └── drupal-cart.svg ├── bebebe │ ├── cart.png │ ├── cart.svg │ ├── drupal-cart.png │ └── drupal-cart.svg ├── e29700 │ ├── cart.png │ ├── cart.svg │ ├── drupal-cart.png │ └── drupal-cart.svg ├── ea2800 │ ├── cart.png │ ├── cart.svg │ ├── drupal-cart.png │ └── drupal-cart.svg └── ffffff │ ├── cart.png │ ├── cart.svg │ ├── drupal-cart.png │ └── drupal-cart.svg ├── js └── conditions.js ├── ludwig.json ├── modules ├── cart │ ├── commerce_cart.info.yml │ ├── commerce_cart.libraries.yml │ ├── commerce_cart.module │ ├── commerce_cart.post_update.php │ ├── commerce_cart.routing.yml │ ├── commerce_cart.services.yml │ ├── commerce_cart.views_execution.inc │ ├── config │ │ ├── install │ │ │ ├── core.entity_form_mode.commerce_order_item.add_to_cart.yml │ │ │ ├── core.entity_view_mode.commerce_product_attribute_value.add_to_cart.yml │ │ │ ├── views.view.commerce_cart_block.yml │ │ │ ├── views.view.commerce_cart_form.yml │ │ │ └── views.view.commerce_carts.yml │ │ └── schema │ │ │ └── commerce_cart.schema.yml │ ├── css │ │ ├── commerce_cart.admin.css │ │ ├── commerce_cart.layout.css │ │ └── commerce_cart.theme.css │ ├── js │ │ ├── commerce_cart.form.js │ │ └── commerce_cart.js │ ├── src │ │ ├── Cache │ │ │ └── Context │ │ │ │ └── CartCacheContext.php │ │ ├── CartManager.php │ │ ├── CartManagerInterface.php │ │ ├── CartProvider.php │ │ ├── CartProviderInterface.php │ │ ├── CartSession.php │ │ ├── CartSessionInterface.php │ │ ├── Controller │ │ │ └── CartController.php │ │ ├── Cron.php │ │ ├── CronInterface.php │ │ ├── Event │ │ │ ├── CartEmptyEvent.php │ │ │ ├── CartEntityAddEvent.php │ │ │ ├── CartEvents.php │ │ │ ├── CartOrderItemRemoveEvent.php │ │ │ ├── CartOrderItemUpdateEvent.php │ │ │ └── OrderItemComparisonFieldsEvent.php │ │ ├── EventSubscriber │ │ │ ├── CartEventSubscriber.php │ │ │ ├── OrderEventSubscriber.php │ │ │ └── QueryAccessSubscriber.php │ │ ├── Exception │ │ │ ├── DuplicateCartException.php │ │ │ └── ExceptionInterface.php │ │ ├── Form │ │ │ ├── AddToCartForm.php │ │ │ └── AddToCartFormInterface.php │ │ ├── OrderItemMatcher.php │ │ ├── OrderItemMatcherInterface.php │ │ └── Plugin │ │ │ ├── Block │ │ │ └── CartBlock.php │ │ │ ├── QueueWorker │ │ │ └── CartExpiration.php │ │ │ └── views │ │ │ ├── area │ │ │ └── EmptyCartButton.php │ │ │ └── field │ │ │ ├── EditQuantity.php │ │ │ └── RemoveButton.php │ ├── templates │ │ ├── commerce-cart-block.html.twig │ │ └── commerce-cart-empty-page.html.twig │ └── tests │ │ ├── modules │ │ ├── commerce_cart_big_pipe │ │ │ ├── commerce_cart_big_pipe.info.yml │ │ │ ├── commerce_cart_big_pipe.install │ │ │ ├── commerce_cart_big_pipe.module │ │ │ └── src │ │ │ │ └── Form │ │ │ │ └── BigPipeAddToCartForm.php │ │ ├── commerce_cart_test │ │ │ ├── commerce_cart_test.info.yml │ │ │ ├── commerce_cart_test.module │ │ │ └── config │ │ │ │ └── install │ │ │ │ ├── commerce_order.commerce_order_type.cart_test.yml │ │ │ │ ├── views.view.test_empty_cart_button_form.yml │ │ │ │ ├── views.view.test_multiple_cart_forms.yml │ │ │ │ └── views.view.test_multiple_cart_forms_fields.yml │ │ └── extra_order_item_field │ │ │ ├── config │ │ │ └── install │ │ │ │ ├── field.field.commerce_order_item.default.field_custom_text.yml │ │ │ │ └── field.storage.commerce_order_item.field_custom_text.yml │ │ │ └── extra_order_item_field.info.yml │ │ └── src │ │ ├── Functional │ │ ├── AddToCartFormTest.php │ │ ├── CartBlockTest.php │ │ ├── CartBrowserTestBase.php │ │ ├── CartEntityAccessTest.php │ │ ├── CartTest.php │ │ ├── EmptyCartButtonTest.php │ │ └── MultipleCartMultipleVariationTypesTest.php │ │ ├── FunctionalJavascript │ │ ├── AddToCartFieldReplacementTest.php │ │ ├── AddToCartMultiAttributeTest.php │ │ ├── AddToCartMultilingualTest.php │ │ ├── CartWebDriverTestBase.php │ │ ├── MultipleCartFormsTest.php │ │ └── MultipleCartMultipleVariationTypesTest.php │ │ ├── Kernel │ │ ├── CartExpirationTest.php │ │ ├── CartKernelTestBase.php │ │ ├── CartManagerTest.php │ │ ├── CartOrderPlacedTest.php │ │ ├── CartProviderTest.php │ │ ├── CartQueryAccessTest.php │ │ └── OrderItemMatcherTest.php │ │ ├── Traits │ │ ├── CartBrowserTestTrait.php │ │ └── CartManagerTestTrait.php │ │ └── Unit │ │ └── CartCacheContextTest.php ├── checkout │ ├── commerce_checkout.info.yml │ ├── commerce_checkout.install │ ├── commerce_checkout.libraries.yml │ ├── commerce_checkout.links.action.yml │ ├── commerce_checkout.links.menu.yml │ ├── commerce_checkout.module │ ├── commerce_checkout.permissions.yml │ ├── commerce_checkout.plugin_type.yml │ ├── commerce_checkout.post_update.php │ ├── commerce_checkout.routing.yml │ ├── commerce_checkout.services.yml │ ├── config │ │ ├── install │ │ │ ├── commerce_checkout.commerce_checkout_flow.default.yml │ │ │ ├── core.entity_view_display.commerce_product_variation.default.summary.yml │ │ │ ├── core.entity_view_mode.commerce_product_variation.summary.yml │ │ │ └── views.view.commerce_checkout_order_summary.yml │ │ └── schema │ │ │ └── commerce_checkout.schema.yml │ ├── css │ │ ├── commerce_checkout.admin.css │ │ ├── commerce_checkout.form.css │ │ ├── commerce_checkout.layout.css │ │ └── commerce_checkout.progress.css │ ├── js │ │ └── commerce_checkout.admin.js │ ├── src │ │ ├── Annotation │ │ │ ├── CommerceCheckoutFlow.php │ │ │ └── CommerceCheckoutPane.php │ │ ├── CheckoutFlowListBuilder.php │ │ ├── CheckoutFlowManager.php │ │ ├── CheckoutOrderManager.php │ │ ├── CheckoutOrderManagerInterface.php │ │ ├── CheckoutPaneManager.php │ │ ├── Controller │ │ │ └── CheckoutController.php │ │ ├── Entity │ │ │ ├── CheckoutFlow.php │ │ │ └── CheckoutFlowInterface.php │ │ ├── Event │ │ │ ├── CheckoutCompletionRegisterEvent.php │ │ │ └── CheckoutEvents.php │ │ ├── Form │ │ │ └── CheckoutFlowForm.php │ │ ├── Plugin │ │ │ ├── Block │ │ │ │ └── CheckoutProgressBlock.php │ │ │ └── Commerce │ │ │ │ ├── CheckoutFlow │ │ │ │ ├── CheckoutFlowBase.php │ │ │ │ ├── CheckoutFlowInterface.php │ │ │ │ ├── CheckoutFlowWithPanesBase.php │ │ │ │ ├── CheckoutFlowWithPanesInterface.php │ │ │ │ └── MultistepDefault.php │ │ │ │ └── CheckoutPane │ │ │ │ ├── BillingInformation.php │ │ │ │ ├── CheckoutPaneBase.php │ │ │ │ ├── CheckoutPaneInterface.php │ │ │ │ ├── CompletionMessage.php │ │ │ │ ├── CompletionRegister.php │ │ │ │ ├── ContactInformation.php │ │ │ │ ├── Login.php │ │ │ │ ├── OrderSummary.php │ │ │ │ └── Review.php │ │ └── Resolver │ │ │ ├── ChainCheckoutFlowResolver.php │ │ │ ├── ChainCheckoutFlowResolverInterface.php │ │ │ ├── CheckoutFlowResolverInterface.php │ │ │ └── DefaultCheckoutFlowResolver.php │ ├── templates │ │ ├── commerce-checkout-completion-message.html.twig │ │ ├── commerce-checkout-completion-register.html.twig │ │ ├── commerce-checkout-form--with-sidebar.html.twig │ │ ├── commerce-checkout-form.html.twig │ │ ├── commerce-checkout-order-summary.html.twig │ │ ├── commerce-checkout-pane.html.twig │ │ └── commerce-checkout-progress.html.twig │ └── tests │ │ ├── modules │ │ └── commerce_checkout_test │ │ │ ├── commerce_checkout_test.info.yml │ │ │ ├── commerce_checkout_test.services.yml │ │ │ └── src │ │ │ └── EventSubscriber │ │ │ └── CheckoutSubscriber.php │ │ └── src │ │ ├── Functional │ │ ├── CheckoutFlowTest.php │ │ └── CheckoutOrderTest.php │ │ └── Kernel │ │ ├── ChainCheckoutFlowResolverTest.php │ │ ├── CheckoutAccessTest.php │ │ └── CheckoutOrderManagerTest.php ├── log │ ├── commerce_log.commerce_log_categories.yml │ ├── commerce_log.commerce_log_templates.yml │ ├── commerce_log.info.yml │ ├── commerce_log.module │ ├── commerce_log.permissions.yml │ ├── commerce_log.post_update.php │ ├── commerce_log.services.yml │ ├── commerce_log.views.inc │ ├── config │ │ └── install │ │ │ └── views.view.commerce_activity.yml │ ├── src │ │ ├── CommerceLogServiceProvider.php │ │ ├── Entity │ │ │ ├── Log.php │ │ │ └── LogInterface.php │ │ ├── EventSubscriber │ │ │ ├── CartEventSubscriber.php │ │ │ ├── OrderEventSubscriber.php │ │ │ └── OrderMailEventSubscriber.php │ │ ├── Form │ │ │ └── LogCommentForm.php │ │ ├── LogAccessControlHandler.php │ │ ├── LogCategoryManager.php │ │ ├── LogCategoryManagerInterface.php │ │ ├── LogCommentPermissions.php │ │ ├── LogListBuilder.php │ │ ├── LogStorage.php │ │ ├── LogStorageInterface.php │ │ ├── LogTemplateManager.php │ │ ├── LogTemplateManagerInterface.php │ │ ├── LogViewBuilder.php │ │ └── Plugin │ │ │ ├── LogCategory │ │ │ ├── LogCategory.php │ │ │ └── LogCategoryInterface.php │ │ │ ├── LogTemplate │ │ │ ├── LogTemplate.php │ │ │ └── LogTemplateInterface.php │ │ │ └── views │ │ │ └── area │ │ │ └── AdminCommentForm.php │ └── tests │ │ ├── module │ │ ├── commerce_log_test.commerce_log_categories.yml │ │ ├── commerce_log_test.commerce_log_templates.yml │ │ ├── commerce_log_test.info.yml │ │ └── commerce_log_test.module │ │ └── src │ │ ├── Functional │ │ └── OrderCommentsTest.php │ │ ├── Kernel │ │ ├── CartIntegrationTest.php │ │ ├── LogAccessTest.php │ │ ├── LogTest.php │ │ └── OrderIntegrationTest.php │ │ └── Unit │ │ ├── LogCategoryTest.php │ │ └── LogTemplateTest.php ├── number_pattern │ ├── commerce_number_pattern.info.yml │ ├── commerce_number_pattern.install │ ├── commerce_number_pattern.links.action.yml │ ├── commerce_number_pattern.links.menu.yml │ ├── commerce_number_pattern.module │ ├── commerce_number_pattern.permissions.yml │ ├── commerce_number_pattern.services.yml │ ├── config │ │ └── schema │ │ │ └── commerce_number_pattern.schema.yml │ ├── src │ │ ├── Annotation │ │ │ └── CommerceNumberPattern.php │ │ ├── Entity │ │ │ ├── NumberPattern.php │ │ │ └── NumberPatternInterface.php │ │ ├── Form │ │ │ ├── NumberPatternForm.php │ │ │ └── NumberPatternResetSequenceForm.php │ │ ├── NumberPatternAccessControlHandler.php │ │ ├── NumberPatternListBuilder.php │ │ ├── NumberPatternManager.php │ │ ├── NumberPatternRouteProvider.php │ │ ├── Plugin │ │ │ └── Commerce │ │ │ │ └── NumberPattern │ │ │ │ ├── Infinite.php │ │ │ │ ├── Monthly.php │ │ │ │ ├── NumberPatternBase.php │ │ │ │ ├── NumberPatternInterface.php │ │ │ │ ├── SequentialNumberPatternBase.php │ │ │ │ ├── SequentialNumberPatternInterface.php │ │ │ │ └── Yearly.php │ │ └── Sequence.php │ └── tests │ │ ├── modules │ │ └── commerce_number_pattern_test │ │ │ ├── commerce_number_pattern_test.info.yml │ │ │ └── src │ │ │ └── Entity │ │ │ └── EntityTestWithStore.php │ │ └── src │ │ ├── FunctionalJavascript │ │ └── NumberPatternTest.php │ │ └── Kernel │ │ ├── Entity │ │ └── NumberPatternTest.php │ │ ├── NumberPatternKernelTestBase.php │ │ └── Plugin │ │ └── Commerce │ │ └── NumberPattern │ │ ├── InfiniteTest.php │ │ ├── MonthlyTest.php │ │ └── YearlyTest.php ├── order │ ├── commerce_order.commerce_adjustment_types.yml │ ├── commerce_order.info.yml │ ├── commerce_order.install │ ├── commerce_order.libraries.yml │ ├── commerce_order.links.action.yml │ ├── commerce_order.links.menu.yml │ ├── commerce_order.links.task.yml │ ├── commerce_order.module │ ├── commerce_order.permissions.yml │ ├── commerce_order.plugin_type.yml │ ├── commerce_order.post_update.php │ ├── commerce_order.routing.yml │ ├── commerce_order.services.yml │ ├── commerce_order.tokens.inc │ ├── commerce_order.views.inc │ ├── commerce_order.workflow_groups.yml │ ├── commerce_order.workflows.yml │ ├── config │ │ ├── install │ │ │ ├── commerce_number_pattern.commerce_number_pattern.order_default.yml │ │ │ ├── commerce_order.commerce_order_type.default.yml │ │ │ ├── core.entity_form_display.commerce_order.default.default.yml │ │ │ ├── core.entity_form_display.profile.customer.default.yml │ │ │ ├── core.entity_form_mode.profile.billing.yml │ │ │ ├── core.entity_view_display.commerce_order.default.default.yml │ │ │ ├── core.entity_view_display.commerce_order.default.user.yml │ │ │ ├── core.entity_view_display.profile.customer.admin.yml │ │ │ ├── core.entity_view_display.profile.customer.default.yml │ │ │ ├── core.entity_view_mode.commerce_order.user.yml │ │ │ ├── core.entity_view_mode.profile.admin.yml │ │ │ ├── field.field.profile.customer.address.yml │ │ │ ├── field.storage.profile.address.yml │ │ │ ├── profile.type.customer.yml │ │ │ ├── system.action.commerce_order_delete_action.yml │ │ │ ├── views.view.commerce_order_item_table.yml │ │ │ ├── views.view.commerce_orders.yml │ │ │ └── views.view.commerce_user_orders.yml │ │ └── schema │ │ │ └── commerce_order.schema.yml │ ├── css │ │ ├── commerce_order.address_book.css │ │ ├── commerce_order.module.css │ │ └── commerce_order.total_summary.css │ ├── src │ │ ├── Access │ │ │ ├── AddressBookAccessCheck.php │ │ │ └── OrderUserViewAccessCheck.php │ │ ├── AddressBook.php │ │ ├── AddressBookInterface.php │ │ ├── Adjustment.php │ │ ├── AdjustmentTransformer.php │ │ ├── AdjustmentTransformerInterface.php │ │ ├── AdjustmentTypeManager.php │ │ ├── AvailabilityCheckerInterface.php │ │ ├── AvailabilityManager.php │ │ ├── AvailabilityManagerInterface.php │ │ ├── AvailabilityOrderProcessor.php │ │ ├── AvailabilityResult.php │ │ ├── CommerceOrderServiceProvider.php │ │ ├── Comparator │ │ │ └── AdjustmentComparator.php │ │ ├── Controller │ │ │ └── AddressBookController.php │ │ ├── DependencyInjection │ │ │ └── Compiler │ │ │ │ └── PriceCalculatorPass.php │ │ ├── Element │ │ │ └── ProfileSelect.php │ │ ├── Entity │ │ │ ├── Order.php │ │ │ ├── OrderInterface.php │ │ │ ├── OrderItem.php │ │ │ ├── OrderItemInterface.php │ │ │ ├── OrderItemType.php │ │ │ ├── OrderItemTypeInterface.php │ │ │ ├── OrderType.php │ │ │ └── OrderTypeInterface.php │ │ ├── EntityAdjustableInterface.php │ │ ├── EntityPrint │ │ │ └── OrderRenderer.php │ │ ├── Event │ │ │ ├── OrderAssignEvent.php │ │ │ ├── OrderEvent.php │ │ │ ├── OrderEvents.php │ │ │ ├── OrderItemEvent.php │ │ │ └── OrderProfilesEvent.php │ │ ├── EventSubscriber │ │ │ ├── AddressBookSubscriber.php │ │ │ ├── OrderNumberSubscriber.php │ │ │ ├── OrderReceiptSubscriber.php │ │ │ ├── ProfileLabelSubscriber.php │ │ │ └── TimestampEventSubscriber.php │ │ ├── Form │ │ │ ├── CustomerFormTrait.php │ │ │ ├── OrderAddForm.php │ │ │ ├── OrderForm.php │ │ │ ├── OrderItemInlineForm.php │ │ │ ├── OrderItemTypeForm.php │ │ │ ├── OrderReassignForm.php │ │ │ ├── OrderReceiptResendForm.php │ │ │ ├── OrderTypeForm.php │ │ │ ├── OrderUnlockForm.php │ │ │ ├── ProfileAddressBookDeleteForm.php │ │ │ └── ProfileAddressBookForm.php │ │ ├── Mail │ │ │ ├── OrderReceiptMail.php │ │ │ └── OrderReceiptMailInterface.php │ │ ├── OrderAccessControlHandler.php │ │ ├── OrderAssignment.php │ │ ├── OrderAssignmentInterface.php │ │ ├── OrderItemAccessControlHandler.php │ │ ├── OrderItemPermissionProvider.php │ │ ├── OrderItemStorage.php │ │ ├── OrderItemStorageInterface.php │ │ ├── OrderItemTypeListBuilder.php │ │ ├── OrderItemViewsData.php │ │ ├── OrderListBuilder.php │ │ ├── OrderPermissionProvider.php │ │ ├── OrderProcessorInterface.php │ │ ├── OrderQueryAccessHandler.php │ │ ├── OrderRefresh.php │ │ ├── OrderRefreshInterface.php │ │ ├── OrderRouteProvider.php │ │ ├── OrderStorage.php │ │ ├── OrderTotalSummary.php │ │ ├── OrderTotalSummaryInterface.php │ │ ├── OrderTypeListBuilder.php │ │ ├── Plugin │ │ │ ├── Commerce │ │ │ │ ├── AdjustmentType │ │ │ │ │ ├── AdjustmentType.php │ │ │ │ │ └── AdjustmentTypeInterface.php │ │ │ │ ├── Condition │ │ │ │ │ ├── OrderBillingAddress.php │ │ │ │ │ ├── OrderCurrency.php │ │ │ │ │ ├── OrderCustomerRole.php │ │ │ │ │ ├── OrderEmail.php │ │ │ │ │ ├── OrderItemPurchasedEntity.php │ │ │ │ │ ├── OrderPurchasedEntity.php │ │ │ │ │ ├── OrderStore.php │ │ │ │ │ ├── OrderTotalPrice.php │ │ │ │ │ ├── OrderType.php │ │ │ │ │ ├── PurchasedEntityConditionBase.php │ │ │ │ │ └── PurchasedEntityConditionDeriver.php │ │ │ │ └── InlineForm │ │ │ │ │ └── CustomerProfile.php │ │ │ ├── Field │ │ │ │ ├── FieldFormatter │ │ │ │ │ ├── OrderItemTable.php │ │ │ │ │ ├── OrderTotalSummary.php │ │ │ │ │ └── PriceCalculatedFormatter.php │ │ │ │ ├── FieldType │ │ │ │ │ ├── AdjustmentItem.php │ │ │ │ │ ├── AdjustmentItemList.php │ │ │ │ │ └── AdjustmentItemListInterface.php │ │ │ │ └── FieldWidget │ │ │ │ │ ├── AdjustmentDefaultWidget.php │ │ │ │ │ ├── BillingProfileWidget.php │ │ │ │ │ ├── QuantityWidget.php │ │ │ │ │ └── UnitPriceWidget.php │ │ │ ├── Validation │ │ │ │ └── Constraint │ │ │ │ │ ├── PurchasedEntityAvailableConstraint.php │ │ │ │ │ └── PurchasedEntityAvailableConstraintValidator.php │ │ │ └── views │ │ │ │ └── area │ │ │ │ └── OrderTotal.php │ │ ├── PriceCalculator.php │ │ ├── PriceCalculatorInterface.php │ │ ├── PriceCalculatorResult.php │ │ ├── PriceSplitter.php │ │ ├── PriceSplitterInterface.php │ │ └── Resolver │ │ │ ├── ChainOrderTypeResolver.php │ │ │ ├── ChainOrderTypeResolverInterface.php │ │ │ ├── DefaultOrderTypeResolver.php │ │ │ ├── OrderStoreResolver.php │ │ │ └── OrderTypeResolverInterface.php │ ├── templates │ │ ├── commerce-order--admin.html.twig │ │ ├── commerce-order--user.html.twig │ │ ├── commerce-order-add-list.html.twig │ │ ├── commerce-order-edit-form.html.twig │ │ ├── commerce-order-item.html.twig │ │ ├── commerce-order-receipt--entity-print.html.twig │ │ ├── commerce-order-receipt.html.twig │ │ ├── commerce-order-total-summary.html.twig │ │ └── commerce-order.html.twig │ └── tests │ │ ├── modules │ │ ├── commerce_order_entity_print_test │ │ │ ├── commerce_order_entity_print_test.info.yml │ │ │ ├── commerce_order_entity_print_test.module │ │ │ └── templates │ │ │ │ └── commerce-order-receipt--entity-print.html.twig │ │ └── commerce_order_test │ │ │ ├── commerce_order_test.commerce_adjustment_types.yml │ │ │ ├── commerce_order_test.info.yml │ │ │ ├── commerce_order_test.module │ │ │ ├── commerce_order_test.routing.yml │ │ │ ├── commerce_order_test.services.yml │ │ │ ├── commerce_order_test.workflows.yml │ │ │ └── src │ │ │ ├── EventSubscriber │ │ │ └── OrderPaidSubscriber.php │ │ │ ├── Form │ │ │ └── CustomerProfileTestForm.php │ │ │ ├── TestAdjustmentProcessor.php │ │ │ └── TestAvailabilityChecker.php │ │ └── src │ │ ├── Functional │ │ ├── CustomerProfileTypeTest.php │ │ ├── OrderBrowserTestBase.php │ │ ├── OrderItemTypeTest.php │ │ ├── OrderNoStoreTest.php │ │ ├── OrderTest.php │ │ ├── OrderTypeTest.php │ │ └── OrderUserTest.php │ │ ├── FunctionalJavascript │ │ ├── AddressBookTest.php │ │ ├── CustomerProfileTest.php │ │ ├── OrderAdminTest.php │ │ ├── OrderReassignTest.php │ │ └── OrderWebDriverTestBase.php │ │ ├── Kernel │ │ ├── AddressBookTest.php │ │ ├── AdjustmentItemTest.php │ │ ├── AdjustmentTest.php │ │ ├── AdjustmentTransformerTest.php │ │ ├── ChainOrderTypeResolverTest.php │ │ ├── Entity │ │ │ ├── OrderItemTest.php │ │ │ └── OrderTest.php │ │ ├── EntityPrintOrderRendererTest.php │ │ ├── Formatter │ │ │ └── PriceCalculatedFormatterTest.php │ │ ├── Jsonapi │ │ │ └── OrderCollectionFilterTest.php │ │ ├── Mail │ │ │ └── OrderReceiptMailTest.php │ │ ├── OrderAccessControlHandlerTest.php │ │ ├── OrderAssignmentTest.php │ │ ├── OrderItemAccessTest.php │ │ ├── OrderKernelTestBase.php │ │ ├── OrderMultilingualTest.php │ │ ├── OrderNumberTest.php │ │ ├── OrderQueryAccessHandlerTest.php │ │ ├── OrderReceiptTest.php │ │ ├── OrderRefreshTest.php │ │ ├── OrderStoreResolverTest.php │ │ ├── OrderTokensTest.php │ │ ├── OrderTotalSummaryTest.php │ │ ├── Plugin │ │ │ └── Commerce │ │ │ │ └── Condition │ │ │ │ └── PurchasedEntityConditionTest.php │ │ ├── PriceCalculatorTest.php │ │ ├── PriceSplitterTest.php │ │ └── PurchasedEntityConstraintValidatorTest.php │ │ └── Unit │ │ ├── AvailabilityManagerTest.php │ │ └── Plugin │ │ └── Commerce │ │ └── Condition │ │ ├── OrderBillingAddressTest.php │ │ ├── OrderCurrencyTest.php │ │ ├── OrderCustomerRoleTest.php │ │ ├── OrderEmailTest.php │ │ ├── OrderItemPurchasedEntityTest.php │ │ ├── OrderPurchasedEntityTest.php │ │ ├── OrderStoreTest.php │ │ ├── OrderTotalPriceTest.php │ │ └── OrderTypeTest.php ├── payment │ ├── commerce_payment.info.yml │ ├── commerce_payment.install │ ├── commerce_payment.libraries.yml │ ├── commerce_payment.links.action.yml │ ├── commerce_payment.links.menu.yml │ ├── commerce_payment.links.task.yml │ ├── commerce_payment.module │ ├── commerce_payment.permissions.yml │ ├── commerce_payment.plugin_type.yml │ ├── commerce_payment.post_update.php │ ├── commerce_payment.routing.yml │ ├── commerce_payment.services.yml │ ├── commerce_payment.workflow_groups.yml │ ├── commerce_payment.workflows.yml │ ├── config │ │ ├── install │ │ │ ├── field.field.user.user.commerce_remote_id.yml │ │ │ └── field.storage.user.commerce_remote_id.yml │ │ └── schema │ │ │ └── commerce_payment.schema.yml │ ├── css │ │ ├── commerce_payment.payment_method_form.css │ │ └── commerce_payment.payment_method_icons.css │ ├── images │ │ ├── amex.svg │ │ ├── dinersclub.svg │ │ ├── discover.svg │ │ ├── jcb.svg │ │ ├── maestro.svg │ │ ├── mastercard.svg │ │ ├── unionpay.svg │ │ └── visa.svg │ ├── js │ │ └── offsite-redirect.js │ ├── src │ │ ├── Access │ │ │ ├── PaymentMethodAccessCheck.php │ │ │ └── PaymentOperationAccessCheck.php │ │ ├── Annotation │ │ │ ├── CommercePaymentGateway.php │ │ │ ├── CommercePaymentMethodType.php │ │ │ └── CommercePaymentType.php │ │ ├── Controller │ │ │ ├── PaymentCheckoutController.php │ │ │ └── PaymentNotificationController.php │ │ ├── CreditCard.php │ │ ├── CreditCardType.php │ │ ├── Element │ │ │ └── PaymentGatewayForm.php │ │ ├── Entity │ │ │ ├── EntityWithPaymentGatewayInterface.php │ │ │ ├── Payment.php │ │ │ ├── PaymentGateway.php │ │ │ ├── PaymentGatewayInterface.php │ │ │ ├── PaymentInterface.php │ │ │ ├── PaymentMethod.php │ │ │ └── PaymentMethodInterface.php │ │ ├── Event │ │ │ ├── FilterPaymentGatewaysEvent.php │ │ │ ├── PaymentEvent.php │ │ │ └── PaymentEvents.php │ │ ├── EventSubscriber │ │ │ ├── FilterConditionsEventSubscriber.php │ │ │ ├── OrderAssignSubscriber.php │ │ │ └── OrderPaidSubscriber.php │ │ ├── Exception │ │ │ ├── AuthenticationException.php │ │ │ ├── DeclineException.php │ │ │ ├── HardDeclineException.php │ │ │ ├── InvalidRequestException.php │ │ │ ├── InvalidResponseException.php │ │ │ ├── PaymentGatewayException.php │ │ │ └── SoftDeclineException.php │ │ ├── Form │ │ │ ├── PaymentAddForm.php │ │ │ ├── PaymentGatewayForm.php │ │ │ ├── PaymentMethodAddForm.php │ │ │ ├── PaymentMethodDeleteForm.php │ │ │ ├── PaymentMethodEditForm.php │ │ │ └── PaymentOperationForm.php │ │ ├── PaymentAccessControlHandler.php │ │ ├── PaymentGatewayListBuilder.php │ │ ├── PaymentGatewayManager.php │ │ ├── PaymentGatewayStorage.php │ │ ├── PaymentGatewayStorageInterface.php │ │ ├── PaymentListBuilder.php │ │ ├── PaymentMethodAccessControlHandler.php │ │ ├── PaymentMethodListBuilder.php │ │ ├── PaymentMethodStorage.php │ │ ├── PaymentMethodStorageInterface.php │ │ ├── PaymentMethodTypeManager.php │ │ ├── PaymentOption.php │ │ ├── PaymentOptionsBuilder.php │ │ ├── PaymentOptionsBuilderInterface.php │ │ ├── PaymentOrderProcessor.php │ │ ├── PaymentOrderUpdater.php │ │ ├── PaymentOrderUpdaterInterface.php │ │ ├── PaymentStorage.php │ │ ├── PaymentStorageInterface.php │ │ ├── PaymentTypeManager.php │ │ ├── Plugin │ │ │ └── Commerce │ │ │ │ ├── CheckoutPane │ │ │ │ ├── PaymentInformation.php │ │ │ │ └── PaymentProcess.php │ │ │ │ ├── Condition │ │ │ │ └── OrderPaymentGateway.php │ │ │ │ ├── InlineForm │ │ │ │ └── PaymentGatewayForm.php │ │ │ │ ├── PaymentGateway │ │ │ │ ├── HasPaymentInstructionsInterface.php │ │ │ │ ├── Manual.php │ │ │ │ ├── ManualPaymentGatewayInterface.php │ │ │ │ ├── OffsitePaymentGatewayBase.php │ │ │ │ ├── OffsitePaymentGatewayInterface.php │ │ │ │ ├── OnsitePaymentGatewayBase.php │ │ │ │ ├── OnsitePaymentGatewayInterface.php │ │ │ │ ├── PaymentGatewayBase.php │ │ │ │ ├── PaymentGatewayInterface.php │ │ │ │ ├── SupportsAuthorizationsInterface.php │ │ │ │ ├── SupportsCreatingPaymentMethodsInterface.php │ │ │ │ ├── SupportsNotificationsInterface.php │ │ │ │ ├── SupportsRefundsInterface.php │ │ │ │ ├── SupportsStoredPaymentMethodsInterface.php │ │ │ │ ├── SupportsUpdatingStoredPaymentMethodsInterface.php │ │ │ │ └── SupportsVoidsInterface.php │ │ │ │ ├── PaymentMethodType │ │ │ │ ├── CreditCard.php │ │ │ │ ├── PayPal.php │ │ │ │ ├── PaymentMethodTypeBase.php │ │ │ │ └── PaymentMethodTypeInterface.php │ │ │ │ └── PaymentType │ │ │ │ ├── PaymentDefault.php │ │ │ │ ├── PaymentManual.php │ │ │ │ ├── PaymentTypeBase.php │ │ │ │ └── PaymentTypeInterface.php │ │ └── PluginForm │ │ │ ├── ManualPaymentAddForm.php │ │ │ ├── OnsitePaymentAddForm.php │ │ │ ├── PaymentCaptureForm.php │ │ │ ├── PaymentGatewayFormBase.php │ │ │ ├── PaymentGatewayFormInterface.php │ │ │ ├── PaymentMethodAddForm.php │ │ │ ├── PaymentMethodEditForm.php │ │ │ ├── PaymentMethodFormBase.php │ │ │ ├── PaymentOffsiteForm.php │ │ │ ├── PaymentReceiveForm.php │ │ │ ├── PaymentRefundForm.php │ │ │ └── PaymentVoidForm.php │ ├── templates │ │ ├── commerce-payment-method--credit-card.html.twig │ │ └── commerce-payment-method.html.twig │ └── tests │ │ ├── modules │ │ └── commerce_payment_test │ │ │ ├── commerce_payment_test.info.yml │ │ │ ├── commerce_payment_test.services.yml │ │ │ ├── config │ │ │ ├── optional │ │ │ │ └── views.view.payment_methods.yml │ │ │ └── schema │ │ │ │ └── commerce_payment_test.schema.yml │ │ │ └── src │ │ │ ├── EventSubscriber │ │ │ └── FilterPaymentGatewaysSubscriber.php │ │ │ └── Plugin │ │ │ └── Commerce │ │ │ └── PaymentGateway │ │ │ ├── TestOffsite.php │ │ │ └── TestOnsite.php │ │ └── src │ │ ├── Functional │ │ ├── DefaultPaymentAdminTest.php │ │ ├── ManualPaymentAdminTest.php │ │ ├── PaymentGatewayTest.php │ │ └── PaymentMethodTest.php │ │ ├── FunctionalJavascript │ │ ├── OffsiteOrderDataTest.php │ │ └── PaymentCheckoutTest.php │ │ ├── Kernel │ │ ├── Entity │ │ │ ├── PaymentMethodTest.php │ │ │ └── PaymentTest.php │ │ ├── FilterPaymentGatewaysEventTest.php │ │ ├── OrderPaidSubscriberTest.php │ │ ├── PaymentAccessTest.php │ │ ├── PaymentMethodAccessTest.php │ │ ├── PaymentMethodStorageTest.php │ │ ├── PaymentOptionsBuilderTest.php │ │ ├── PaymentOrderUpdaterTest.php │ │ └── ViewsIntegrationTest.php │ │ └── Unit │ │ ├── CreditCardTest.php │ │ ├── CreditCardTypeTest.php │ │ └── Plugin │ │ └── Commerce │ │ └── Condition │ │ └── OrderPaymentGatewayTest.php ├── payment_example │ ├── commerce_payment_example.info.yml │ ├── commerce_payment_example.routing.yml │ ├── config │ │ └── schema │ │ │ └── commerce_payment_example.schema.yml │ └── src │ │ ├── Controller │ │ └── DummyRedirectController.php │ │ ├── Plugin │ │ └── Commerce │ │ │ └── PaymentGateway │ │ │ ├── OffsiteRedirect.php │ │ │ ├── Onsite.php │ │ │ ├── OnsiteInterface.php │ │ │ └── StoredOffsiteRedirect.php │ │ └── PluginForm │ │ ├── OffsiteRedirect │ │ └── PaymentOffsiteForm.php │ │ └── Onsite │ │ └── PaymentMethodAddForm.php ├── price │ ├── commerce_price.info.yml │ ├── commerce_price.install │ ├── commerce_price.libraries.yml │ ├── commerce_price.links.action.yml │ ├── commerce_price.links.menu.yml │ ├── commerce_price.module │ ├── commerce_price.permissions.yml │ ├── commerce_price.routing.yml │ ├── commerce_price.services.yml │ ├── commerce_price.views.inc │ ├── config │ │ └── schema │ │ │ └── commerce_price.schema.yml │ ├── css │ │ └── commerce_price.admin.css │ ├── src │ │ ├── Calculator.php │ │ ├── CommercePriceServiceProvider.php │ │ ├── Comparator │ │ │ ├── NumberComparator.php │ │ │ └── PriceComparator.php │ │ ├── CurrencyFormatter.php │ │ ├── CurrencyImporter.php │ │ ├── CurrencyImporterInterface.php │ │ ├── CurrencyListBuilder.php │ │ ├── CurrencyRouteProvider.php │ │ ├── Element │ │ │ ├── Number.php │ │ │ └── Price.php │ │ ├── Entity │ │ │ ├── Currency.php │ │ │ └── CurrencyInterface.php │ │ ├── Event │ │ │ ├── NumberFormatDefinitionEvent.php │ │ │ ├── NumberFormatEvent.php │ │ │ └── PriceEvents.php │ │ ├── Exception │ │ │ └── CurrencyMismatchException.php │ │ ├── Form │ │ │ ├── CurrencyForm.php │ │ │ └── CurrencyImportForm.php │ │ ├── LegacyNumberFormatter.php │ │ ├── NumberFormatter.php │ │ ├── NumberFormatterFactory.php │ │ ├── NumberFormatterFactoryInterface.php │ │ ├── PhysicalNumberFormatter.php │ │ ├── Plugin │ │ │ ├── DataType │ │ │ │ └── FormattedPrice.php │ │ │ ├── Field │ │ │ │ ├── FieldFormatter │ │ │ │ │ ├── PriceCalculatedFormatter.php │ │ │ │ │ ├── PriceDefaultFormatter.php │ │ │ │ │ └── PricePlainFormatter.php │ │ │ │ ├── FieldType │ │ │ │ │ └── PriceItem.php │ │ │ │ └── FieldWidget │ │ │ │ │ ├── ListPriceWidget.php │ │ │ │ │ └── PriceDefaultWidget.php │ │ │ ├── Validation │ │ │ │ └── Constraint │ │ │ │ │ ├── CurrencyConstraint.php │ │ │ │ │ └── CurrencyConstraintValidator.php │ │ │ └── views │ │ │ │ └── filter │ │ │ │ └── Currency.php │ │ ├── Price.php │ │ ├── Repository │ │ │ ├── CurrencyRepository.php │ │ │ └── NumberFormatRepository.php │ │ ├── Resolver │ │ │ ├── ChainPriceResolver.php │ │ │ ├── ChainPriceResolverInterface.php │ │ │ ├── DefaultPriceResolver.php │ │ │ └── PriceResolverInterface.php │ │ ├── Rounder.php │ │ ├── RounderInterface.php │ │ └── TwigExtension │ │ │ └── PriceTwigExtension.php │ ├── templates │ │ └── commerce-price-plain.html.twig │ └── tests │ │ ├── modules │ │ └── commerce_price_test │ │ │ ├── commerce_price_test.info.yml │ │ │ ├── commerce_price_test.module │ │ │ ├── commerce_price_test.routing.yml │ │ │ ├── commerce_price_test.services.yml │ │ │ ├── src │ │ │ ├── Form │ │ │ │ ├── AjaxPriceTestForm.php │ │ │ │ ├── NumberTestForm.php │ │ │ │ └── PriceTestForm.php │ │ │ ├── Normalizer │ │ │ │ └── PriceNumberNormalizer.php │ │ │ └── TestPriceResolver.php │ │ │ └── templates │ │ │ └── commerce-price-test-price-filter.html.twig │ │ └── src │ │ ├── Functional │ │ ├── CurrencyTest.php │ │ ├── NumberElementTest.php │ │ └── PriceElementTest.php │ │ ├── FunctionalJavascript │ │ └── AjaxPriceElementTest.php │ │ ├── Kernel │ │ ├── CurrencyRepositoryTest.php │ │ ├── FormattedPriceTest.php │ │ ├── PriceEqualsTest.php │ │ ├── PriceFormattersTest.php │ │ ├── PriceItemGeneratedSampleValueTest.php │ │ └── PriceTwigExtensionTest.php │ │ └── Unit │ │ ├── CalculatorTest.php │ │ ├── PriceTest.php │ │ └── RounderTest.php ├── product │ ├── commerce_product.info.yml │ ├── commerce_product.install │ ├── commerce_product.libraries.yml │ ├── commerce_product.links.action.yml │ ├── commerce_product.links.menu.yml │ ├── commerce_product.links.task.yml │ ├── commerce_product.module │ ├── commerce_product.permissions.yml │ ├── commerce_product.post_update.php │ ├── commerce_product.routing.yml │ ├── commerce_product.services.yml │ ├── commerce_product.views.inc │ ├── config │ │ ├── install │ │ │ ├── commerce_product.commerce_product_type.default.yml │ │ │ ├── commerce_product.commerce_product_variation_type.default.yml │ │ │ ├── core.entity_form_display.commerce_product.default.default.yml │ │ │ ├── core.entity_form_display.commerce_product_variation.default.default.yml │ │ │ ├── core.entity_view_display.commerce_product.default.default.yml │ │ │ ├── field.field.commerce_product.default.body.yml │ │ │ ├── field.storage.commerce_product.body.yml │ │ │ ├── system.action.commerce_product_delete_action.yml │ │ │ ├── system.action.commerce_publish_product.yml │ │ │ ├── system.action.commerce_unpublish_product.yml │ │ │ └── views.view.commerce_products.yml │ │ ├── optional │ │ │ ├── commerce_order.commerce_order_item_type.default.yml │ │ │ ├── core.entity_form_display.commerce_order_item.default.add_to_cart.yml │ │ │ ├── core.entity_form_display.commerce_order_item.default.default.yml │ │ │ ├── core.entity_view_display.commerce_order_item.default.default.yml │ │ │ ├── core.entity_view_display.commerce_product_variation.default.cart.yml │ │ │ └── core.entity_view_mode.commerce_product_variation.cart.yml │ │ └── schema │ │ │ └── commerce_product.schema.yml │ ├── css │ │ ├── commerce_product.rendered-attributes.css │ │ └── product.form.css │ ├── src │ │ ├── Access │ │ │ ├── ProductVariationCollectionAccessCheck.php │ │ │ └── ProductVariationCreateAccessCheck.php │ │ ├── CommerceProductServiceProvider.php │ │ ├── ConfigTranslation │ │ │ └── ProductAttributeMapper.php │ │ ├── ContextProvider │ │ │ ├── ProductRouteContext.php │ │ │ └── ProductVariationContext.php │ │ ├── Controller │ │ │ └── ProductVariationController.php │ │ ├── Element │ │ │ └── CommerceProductRenderedAttribute.php │ │ ├── Entity │ │ │ ├── Product.php │ │ │ ├── ProductAttribute.php │ │ │ ├── ProductAttributeInterface.php │ │ │ ├── ProductAttributeValue.php │ │ │ ├── ProductAttributeValueInterface.php │ │ │ ├── ProductInterface.php │ │ │ ├── ProductType.php │ │ │ ├── ProductTypeInterface.php │ │ │ ├── ProductVariation.php │ │ │ ├── ProductVariationInterface.php │ │ │ ├── ProductVariationType.php │ │ │ └── ProductVariationTypeInterface.php │ │ ├── Event │ │ │ ├── FilterVariationsEvent.php │ │ │ ├── ProductAttributeValueEvent.php │ │ │ ├── ProductDefaultVariationEvent.php │ │ │ ├── ProductEvent.php │ │ │ ├── ProductEvents.php │ │ │ ├── ProductVariationAjaxChangeEvent.php │ │ │ └── ProductVariationEvent.php │ │ ├── Form │ │ │ ├── ProductAttributeDeleteForm.php │ │ │ ├── ProductAttributeForm.php │ │ │ ├── ProductAttributeTranslationAddForm.php │ │ │ ├── ProductAttributeTranslationEditForm.php │ │ │ ├── ProductAttributeTranslationFormTrait.php │ │ │ ├── ProductForm.php │ │ │ ├── ProductTypeForm.php │ │ │ ├── ProductVariationDeleteForm.php │ │ │ ├── ProductVariationForm.php │ │ │ ├── ProductVariationInlineForm.php │ │ │ └── ProductVariationTypeForm.php │ │ ├── Plugin │ │ │ ├── Action │ │ │ │ ├── PublishProduct.php │ │ │ │ └── UnpublishProduct.php │ │ │ ├── Block │ │ │ │ └── VariationFieldBlock.php │ │ │ ├── Commerce │ │ │ │ └── Condition │ │ │ │ │ ├── OrderItemProduct.php │ │ │ │ │ ├── OrderItemProductCategory.php │ │ │ │ │ ├── OrderItemProductType.php │ │ │ │ │ ├── OrderItemVariationType.php │ │ │ │ │ ├── OrderProduct.php │ │ │ │ │ ├── OrderProductCategory.php │ │ │ │ │ ├── OrderProductType.php │ │ │ │ │ ├── OrderVariationType.php │ │ │ │ │ ├── ProductCategoryTrait.php │ │ │ │ │ ├── ProductTrait.php │ │ │ │ │ ├── ProductTypeTrait.php │ │ │ │ │ └── VariationTypeTrait.php │ │ │ ├── EntityReferenceSelection │ │ │ │ └── ProductVariationSelection.php │ │ │ ├── Field │ │ │ │ ├── FieldFormatter │ │ │ │ │ ├── AddToCartFormatter.php │ │ │ │ │ └── ProductAttributesOverview.php │ │ │ │ └── FieldWidget │ │ │ │ │ ├── ProductVariationAttributesWidget.php │ │ │ │ │ ├── ProductVariationTitleWidget.php │ │ │ │ │ ├── ProductVariationWidgetBase.php │ │ │ │ │ └── SingleVariationWidget.php │ │ │ ├── PanelizerEntity │ │ │ │ └── PanelizerProduct.php │ │ │ ├── Validation │ │ │ │ └── Constraint │ │ │ │ │ ├── ProductVariationSkuConstraint.php │ │ │ │ │ └── ProductVariationSkuConstraintValidator.php │ │ │ └── views │ │ │ │ ├── argument_default │ │ │ │ ├── Product.php │ │ │ │ └── ProductVariation.php │ │ │ │ ├── field │ │ │ │ └── ProductVariationViewLink.php │ │ │ │ └── filter │ │ │ │ └── ProductAttributeValue.php │ │ ├── PreparedAttribute.php │ │ ├── ProductAttributeFieldManager.php │ │ ├── ProductAttributeFieldManagerInterface.php │ │ ├── ProductAttributeListBuilder.php │ │ ├── ProductAttributeValueAccessControlHandler.php │ │ ├── ProductAttributeValueStorage.php │ │ ├── ProductAttributeValueStorageInterface.php │ │ ├── ProductLazyBuilders.php │ │ ├── ProductListBuilder.php │ │ ├── ProductTranslationHandler.php │ │ ├── ProductTypeListBuilder.php │ │ ├── ProductVariationAccessControlHandler.php │ │ ├── ProductVariationAttributeMapper.php │ │ ├── ProductVariationAttributeMapperInterface.php │ │ ├── ProductVariationFieldRenderer.php │ │ ├── ProductVariationFieldRendererInterface.php │ │ ├── ProductVariationFieldRendererLayoutBuilder.php │ │ ├── ProductVariationListBuilder.php │ │ ├── ProductVariationPermissionProvider.php │ │ ├── ProductVariationRouteProvider.php │ │ ├── ProductVariationStorage.php │ │ ├── ProductVariationStorageInterface.php │ │ ├── ProductVariationTypeAccessControlHandler.php │ │ ├── ProductVariationTypeListBuilder.php │ │ ├── ProductVariationViewsData.php │ │ └── ProductViewBuilder.php │ ├── templates │ │ ├── commerce-product-attribute-value.html.twig │ │ ├── commerce-product-form.html.twig │ │ ├── commerce-product-variation.html.twig │ │ └── commerce-product.html.twig │ └── tests │ │ ├── modules │ │ └── commerce_product_test │ │ │ ├── commerce_product_test.info.yml │ │ │ ├── commerce_product_test.module │ │ │ ├── commerce_product_test.services.yml │ │ │ ├── src │ │ │ └── EventSubscriber │ │ │ │ └── DefaultVariationSubscriber.php │ │ │ └── test_views │ │ │ └── views.view.test_product_variations.yml │ │ └── src │ │ ├── Functional │ │ ├── Jsonapi │ │ │ └── ProductVariationResourceTest.php │ │ ├── ProductAdminTest.php │ │ ├── ProductAttributeTest.php │ │ ├── ProductAttributeTranslationTest.php │ │ ├── ProductBrowserTestBase.php │ │ ├── ProductNoStoreTest.php │ │ ├── ProductTranslationTest.php │ │ ├── ProductTypeTest.php │ │ ├── ProductVariationFieldInjectionTest.php │ │ ├── ProductVariationTitleGenerationTest.php │ │ └── ProductVariationTypeTest.php │ │ ├── FunctionalJavascript │ │ ├── ProductAttributeJavascriptTest.php │ │ ├── ProductLayoutBuilderIntegrationTest.php │ │ └── ProductWebDriverTestBase.php │ │ ├── Kernel │ │ ├── Entity │ │ │ ├── ProductTest.php │ │ │ └── ProductVariationTest.php │ │ ├── ProductAttributeFieldManagerTest.php │ │ ├── ProductAttributeValueAccessTest.php │ │ ├── ProductAttributeValueStorageTest.php │ │ ├── ProductAttributesOverviewFormatterTest.php │ │ ├── ProductDefaultVariationEventTest.php │ │ ├── ProductMultilingualTest.php │ │ ├── ProductVariationAccessTest.php │ │ ├── ProductVariationAttributeMapperTest.php │ │ ├── ProductVariationFieldRendererTest.php │ │ ├── ProductVariationGeneratedTitleTest.php │ │ ├── ProductVariationStorageTest.php │ │ └── Views │ │ │ └── ProductAttributeValueFilterTest.php │ │ ├── Traits │ │ └── ProductAttributeTestTrait.php │ │ └── Unit │ │ └── Plugin │ │ └── Commerce │ │ └── Condition │ │ ├── OrderItemProductCategoryTest.php │ │ ├── OrderItemProductTest.php │ │ ├── OrderItemProductTypeTest.php │ │ ├── OrderItemVariationTypeTest.php │ │ ├── OrderProductCategoryTest.php │ │ ├── OrderProductTest.php │ │ ├── OrderProductTypeTest.php │ │ └── OrderVariationTypeTest.php ├── promotion │ ├── commerce_promotion.info.yml │ ├── commerce_promotion.install │ ├── commerce_promotion.libraries.yml │ ├── commerce_promotion.links.action.yml │ ├── commerce_promotion.links.menu.yml │ ├── commerce_promotion.links.task.yml │ ├── commerce_promotion.module │ ├── commerce_promotion.permissions.yml │ ├── commerce_promotion.plugin_type.yml │ ├── commerce_promotion.post_update.php │ ├── commerce_promotion.routing.yml │ ├── commerce_promotion.services.yml │ ├── commerce_promotion.views.inc │ ├── config │ │ └── schema │ │ │ └── commerce_promotion.schema.yml │ ├── css │ │ └── promotion.form.css │ ├── js │ │ └── commerce_promotion.coupon_redemption_form.js │ ├── src │ │ ├── Annotation │ │ │ └── CommercePromotionOffer.php │ │ ├── CouponAccessControlHandler.php │ │ ├── CouponCodeGenerator.php │ │ ├── CouponCodeGeneratorInterface.php │ │ ├── CouponCodePattern.php │ │ ├── CouponListBuilder.php │ │ ├── CouponRouteProvider.php │ │ ├── CouponStorage.php │ │ ├── CouponStorageInterface.php │ │ ├── Element │ │ │ └── CouponRedemptionForm.php │ │ ├── Entity │ │ │ ├── Coupon.php │ │ │ ├── CouponInterface.php │ │ │ ├── Promotion.php │ │ │ └── PromotionInterface.php │ │ ├── Event │ │ │ ├── CouponEvent.php │ │ │ ├── PromotionEvent.php │ │ │ └── PromotionEvents.php │ │ ├── EventSubscriber │ │ │ ├── CartEventSubscriber.php │ │ │ ├── FilterConditionsEventSubscriber.php │ │ │ └── OrderEventSubscriber.php │ │ ├── Form │ │ │ ├── CouponForm.php │ │ │ ├── CouponGenerateForm.php │ │ │ └── PromotionForm.php │ │ ├── Plugin │ │ │ ├── Commerce │ │ │ │ ├── CheckoutPane │ │ │ │ │ └── CouponRedemption.php │ │ │ │ ├── Condition │ │ │ │ │ └── OrderItemQuantity.php │ │ │ │ ├── InlineForm │ │ │ │ │ └── CouponRedemption.php │ │ │ │ └── PromotionOffer │ │ │ │ │ ├── BuyXGetY.php │ │ │ │ │ ├── FixedAmountOffTrait.php │ │ │ │ │ ├── OrderFixedAmountOff.php │ │ │ │ │ ├── OrderItemFixedAmountOff.php │ │ │ │ │ ├── OrderItemPercentageOff.php │ │ │ │ │ ├── OrderItemPromotionOfferBase.php │ │ │ │ │ ├── OrderItemPromotionOfferInterface.php │ │ │ │ │ ├── OrderPercentageOff.php │ │ │ │ │ ├── OrderPromotionOfferBase.php │ │ │ │ │ ├── OrderPromotionOfferInterface.php │ │ │ │ │ ├── PercentageOffTrait.php │ │ │ │ │ ├── PromotionOfferBase.php │ │ │ │ │ └── PromotionOfferInterface.php │ │ │ ├── Field │ │ │ │ └── FieldWidget │ │ │ │ │ └── UsageLimitWidget.php │ │ │ ├── Validation │ │ │ │ └── Constraint │ │ │ │ │ ├── CouponCodeConstraint.php │ │ │ │ │ ├── CouponValidConstraint.php │ │ │ │ │ └── CouponValidConstraintValidator.php │ │ │ └── views │ │ │ │ └── area │ │ │ │ └── CouponRedemption.php │ │ ├── PromotionListBuilder.php │ │ ├── PromotionOfferManager.php │ │ ├── PromotionOrderProcessor.php │ │ ├── PromotionStorage.php │ │ ├── PromotionStorageInterface.php │ │ ├── PromotionTranslationHandler.php │ │ ├── PromotionUsage.php │ │ ├── PromotionUsageInterface.php │ │ └── PromotionViewsData.php │ ├── templates │ │ ├── commerce-coupon-redemption-form.html.twig │ │ ├── commerce-promotion-form.html.twig │ │ └── commerce-promotion.html.twig │ └── tests │ │ ├── modules │ │ └── commerce_promotion_test │ │ │ ├── commerce_promotion_test.info.yml │ │ │ └── commerce_promotion_test.module │ │ └── src │ │ ├── Functional │ │ └── CouponTest.php │ │ ├── FunctionalJavascript │ │ ├── CartCouponRedemptionElementTest.php │ │ ├── CouponRedemptionElementTest.php │ │ ├── CouponRedemptionPaneTest.php │ │ └── PromotionTest.php │ │ ├── Kernel │ │ ├── CouponAccessTest.php │ │ ├── CouponCodeGeneratorTest.php │ │ ├── CouponStorageTest.php │ │ ├── CouponValidConstraintValidatorTest.php │ │ ├── CouponValidationTest.php │ │ ├── Entity │ │ │ ├── CouponTest.php │ │ │ └── PromotionTest.php │ │ ├── Plugin │ │ │ └── Commerce │ │ │ │ └── PromotionOffer │ │ │ │ ├── BuyXGetYTest.php │ │ │ │ ├── OrderFixedAmountOffTest.php │ │ │ │ ├── OrderItemFixedAmountOffTest.php │ │ │ │ ├── OrderItemPercentageOffTest.php │ │ │ │ └── OrderPercentageOffTest.php │ │ ├── PromotionAvailabilityTest.php │ │ ├── PromotionCartTest.php │ │ ├── PromotionCompatibilityTest.php │ │ ├── PromotionConditionTest.php │ │ ├── PromotionMultilingualTest.php │ │ ├── PromotionOrderProcessorTest.php │ │ ├── PromotionStorageTest.php │ │ └── UsageTest.php │ │ └── Unit │ │ └── Plugin │ │ └── Commerce │ │ └── Condition │ │ └── OrderItemQuantityTest.php ├── store │ ├── commerce_store.info.yml │ ├── commerce_store.install │ ├── commerce_store.links.action.yml │ ├── commerce_store.links.menu.yml │ ├── commerce_store.module │ ├── commerce_store.permissions.yml │ ├── commerce_store.post_update.php │ ├── commerce_store.services.yml │ ├── config │ │ ├── install │ │ │ ├── commerce_store.commerce_store_type.online.yml │ │ │ ├── core.entity_form_display.commerce_store.online.default.yml │ │ │ ├── core.entity_view_display.commerce_store.online.default.yml │ │ │ ├── system.action.commerce_store_delete_action.yml │ │ │ └── views.view.commerce_stores.yml │ │ └── schema │ │ │ └── commerce_store.schema.yml │ ├── console.services.yml │ ├── console │ │ └── translations │ │ │ └── en │ │ │ └── commerce.create.store.yml │ ├── src │ │ ├── Cache │ │ │ └── Context │ │ │ │ └── StoreCacheContext.php │ │ ├── Command │ │ │ └── CreateStoreCommand.php │ │ ├── CurrentStore.php │ │ ├── CurrentStoreInterface.php │ │ ├── Entity │ │ │ ├── EntityStoreInterface.php │ │ │ ├── EntityStoresInterface.php │ │ │ ├── Store.php │ │ │ ├── StoreInterface.php │ │ │ ├── StoreType.php │ │ │ └── StoreTypeInterface.php │ │ ├── Event │ │ │ ├── StoreEvent.php │ │ │ └── StoreEvents.php │ │ ├── Form │ │ │ ├── StoreForm.php │ │ │ └── StoreTypeForm.php │ │ ├── Plugin │ │ │ ├── Field │ │ │ │ ├── FieldFormatter │ │ │ │ │ └── StoreDateTimeFormatter.php │ │ │ │ └── FieldWidget │ │ │ │ │ └── StoreDateTimeWidget.php │ │ │ └── views │ │ │ │ ├── argument_default │ │ │ │ └── CurrentStore.php │ │ │ │ ├── field │ │ │ │ └── Store.php │ │ │ │ └── filter │ │ │ │ └── StoreDate.php │ │ ├── Resolver │ │ │ ├── ChainStoreResolver.php │ │ │ ├── ChainStoreResolverInterface.php │ │ │ ├── DefaultStoreResolver.php │ │ │ ├── StoreCountryResolver.php │ │ │ └── StoreResolverInterface.php │ │ ├── SelectStoreTrait.php │ │ ├── StoreCreationTrait.php │ │ ├── StoreListBuilder.php │ │ ├── StoreStorage.php │ │ ├── StoreStorageInterface.php │ │ └── StoreTypeListBuilder.php │ ├── templates │ │ └── commerce-store.html.twig │ └── tests │ │ └── src │ │ ├── Functional │ │ ├── StoreDateTimeTest.php │ │ └── StoreTypeTest.php │ │ ├── FunctionalJavascript │ │ └── StoreTest.php │ │ ├── Kernel │ │ └── Entity │ │ │ └── StoreTest.php │ │ └── Unit │ │ └── Resolver │ │ ├── ChainStoreResolverTest.php │ │ └── DefaultStoreResolverTest.php └── tax │ ├── commerce_tax.info.yml │ ├── commerce_tax.install │ ├── commerce_tax.libraries.yml │ ├── commerce_tax.links.action.yml │ ├── commerce_tax.links.menu.yml │ ├── commerce_tax.module │ ├── commerce_tax.permissions.yml │ ├── commerce_tax.plugin_type.yml │ ├── commerce_tax.post_update.php │ ├── commerce_tax.routing.yml │ ├── commerce_tax.services.yml │ ├── config │ ├── install │ │ ├── field.field.profile.customer.tax_number.yml │ │ └── field.storage.profile.tax_number.yml │ └── schema │ │ └── commerce_tax.schema.yml │ ├── css │ └── commerce_tax.tax_number.css │ ├── icons │ ├── 73b355 │ │ └── success.svg │ ├── e29700 │ │ └── unknown.svg │ └── e32700 │ │ └── failure.svg │ ├── src │ ├── Annotation │ │ ├── CommerceTaxNumberType.php │ │ └── CommerceTaxType.php │ ├── Controller │ │ └── TaxNumberController.php │ ├── Entity │ │ ├── TaxType.php │ │ └── TaxTypeInterface.php │ ├── Event │ │ ├── BuildZonesEvent.php │ │ ├── CustomerProfileEvent.php │ │ └── TaxEvents.php │ ├── Form │ │ └── TaxTypeForm.php │ ├── Plugin │ │ ├── Commerce │ │ │ ├── TaxNumberType │ │ │ │ ├── EuropeanUnionVat.php │ │ │ │ ├── Other.php │ │ │ │ ├── SupportsVerificationInterface.php │ │ │ │ ├── TaxNumberTypeBase.php │ │ │ │ ├── TaxNumberTypeInterface.php │ │ │ │ ├── TaxNumberTypeWithVerificationBase.php │ │ │ │ └── VerificationResult.php │ │ │ └── TaxType │ │ │ │ ├── CanadianSalesTax.php │ │ │ │ ├── Custom.php │ │ │ │ ├── EuropeanUnionVat.php │ │ │ │ ├── LocalTaxTypeBase.php │ │ │ │ ├── LocalTaxTypeInterface.php │ │ │ │ ├── NorwegianVat.php │ │ │ │ ├── RemoteTaxTypeBase.php │ │ │ │ ├── RemoteTaxTypeInterface.php │ │ │ │ ├── SwissVat.php │ │ │ │ ├── TaxTypeBase.php │ │ │ │ └── TaxTypeInterface.php │ │ ├── Field │ │ │ ├── FieldFormatter │ │ │ │ └── TaxNumberDefaultFormatter.php │ │ │ ├── FieldType │ │ │ │ ├── TaxNumberItem.php │ │ │ │ └── TaxNumberItemInterface.php │ │ │ └── FieldWidget │ │ │ │ └── TaxNumberDefaultWidget.php │ │ └── Validation │ │ │ └── Constraint │ │ │ ├── TaxNumberConstraint.php │ │ │ └── TaxNumberConstraintValidator.php │ ├── Resolver │ │ ├── ChainTaxRateResolver.php │ │ ├── ChainTaxRateResolverInterface.php │ │ ├── DefaultTaxRateResolver.php │ │ ├── TaxRateResolverInterface.php │ │ ├── TaxTypeAwareInterface.php │ │ └── TaxTypeAwareTrait.php │ ├── StoreTax.php │ ├── StoreTaxInterface.php │ ├── TaxNumberTypeManager.php │ ├── TaxNumberTypeManagerInterface.php │ ├── TaxOrderProcessor.php │ ├── TaxRate.php │ ├── TaxRatePercentage.php │ ├── TaxTypeListBuilder.php │ ├── TaxTypeManager.php │ ├── TaxZone.php │ └── TaxableType.php │ └── tests │ ├── fixtures │ └── checkVatService.wsdl │ ├── modules │ └── commerce_tax_test │ │ ├── commerce_tax_test.info.yml │ │ ├── commerce_tax_test.services.yml │ │ └── src │ │ ├── EventSubscriber │ │ └── BuildZonesEventSubscriber.php │ │ ├── Plugin │ │ └── Commerce │ │ │ └── TaxNumberType │ │ │ └── SerbianVat.php │ │ └── Resolver │ │ └── TaxRateResolver.php │ └── src │ ├── FunctionalJavascript │ ├── CustomTest.php │ └── TaxNumberTest.php │ └── Kernel │ ├── OrderIntegrationTest.php │ ├── Plugin │ └── Commerce │ │ ├── TaxNumberType │ │ └── EuropeanUnionVatTest.php │ │ └── TaxType │ │ ├── CanadianSalesTaxTest.php │ │ ├── CustomTest.php │ │ ├── EuropeanUnionVatTest.php │ │ ├── NorwegianVatTest.php │ │ └── SwissVatTest.php │ ├── StoreTaxTest.php │ ├── TaxNumberItemTest.php │ ├── TaxRatePercentageTest.php │ ├── TaxRateTest.php │ └── TaxZoneTest.php ├── phpcs.xml ├── src ├── AjaxFormTrait.php ├── Annotation │ ├── CommerceCondition.php │ ├── CommerceEntityTrait.php │ └── CommerceInlineForm.php ├── AvailabilityCheckerInterface.php ├── AvailabilityManager.php ├── AvailabilityManagerInterface.php ├── BundleFieldDefinition.php ├── BundlePluginInterface.php ├── Cache │ └── Context │ │ └── CountryCacheContext.php ├── CommerceBundleAccessControlHandler.php ├── CommerceContentEntityStorage.php ├── CommerceEntityViewsData.php ├── CommerceSinglePluginCollection.php ├── ConditionGroup.php ├── ConditionManager.php ├── ConditionManagerInterface.php ├── Config │ ├── ConfigUpdateResult.php │ ├── ConfigUpdater.php │ └── ConfigUpdaterInterface.php ├── ConfigurableFieldManager.php ├── ConfigurableFieldManagerInterface.php ├── Context.php ├── Country.php ├── CredentialsCheckFlood.php ├── CredentialsCheckFloodInterface.php ├── CurrentCountry.php ├── CurrentCountryInterface.php ├── CurrentLocale.php ├── CurrentLocaleInterface.php ├── Element │ ├── CommerceElementTrait.php │ ├── Conditions.php │ ├── EntitySelect.php │ └── PluginConfiguration.php ├── EmbeddedEntityAccessControlHandler.php ├── Entity │ ├── CommerceBundleEntityBase.php │ ├── CommerceBundleEntityInterface.php │ ├── CommerceContentEntityBase.php │ └── CommerceContentEntityInterface.php ├── EntityAccessControlHandler.php ├── EntityHelper.php ├── EntityManagerBridgeTrait.php ├── EntityOwnerTrait.php ├── EntityPermissionProvider.php ├── EntityTraitManager.php ├── EntityTraitManagerInterface.php ├── EntityUuidMapper.php ├── EntityUuidMapperInterface.php ├── Event │ ├── CommerceEvents.php │ ├── FilterConditionsEvent.php │ ├── PostMailSendEvent.php │ └── ReferenceablePluginTypesEvent.php ├── Form │ ├── CommerceBundleEntityDeleteFormBase.php │ ├── CommerceBundleEntityFormBase.php │ └── CommercePluginEntityFormBase.php ├── InlineFormManager.php ├── Interval.php ├── Locale.php ├── MailHandler.php ├── MailHandlerInterface.php ├── Plugin │ ├── Commerce │ │ ├── Condition │ │ │ ├── ConditionBase.php │ │ │ ├── ConditionInterface.php │ │ │ ├── EntityBundleBase.php │ │ │ ├── ParentEntityAwareInterface.php │ │ │ └── ParentEntityAwareTrait.php │ │ ├── EntityTrait │ │ │ ├── EntityTraitBase.php │ │ │ └── EntityTraitInterface.php │ │ └── InlineForm │ │ │ ├── ContentEntity.php │ │ │ ├── EntityInlineFormBase.php │ │ │ ├── EntityInlineFormInterface.php │ │ │ ├── InlineFormBase.php │ │ │ └── InlineFormInterface.php │ ├── Field │ │ ├── FieldFormatter │ │ │ └── PluginItemDefaultFormatter.php │ │ ├── FieldType │ │ │ ├── PluginItem.php │ │ │ ├── PluginItemDeriver.php │ │ │ ├── PluginItemInterface.php │ │ │ ├── RemoteIdFieldItemList.php │ │ │ ├── RemoteIdFieldItemListInterface.php │ │ │ └── RemoteIdItem.php │ │ └── FieldWidget │ │ │ ├── ConditionsWidget.php │ │ │ ├── EndDateWidget.php │ │ │ ├── EntitySelectWidget.php │ │ │ ├── PluginRadiosWidget.php │ │ │ └── PluginSelectWidget.php │ └── views │ │ ├── argument_validator │ │ └── CurrentUser.php │ │ ├── field │ │ └── EntityBundle.php │ │ └── filter │ │ └── EntityBundle.php ├── PurchasableEntityInterface.php ├── PurchasableEntityTypeRepository.php ├── PurchasableEntityTypeRepositoryInterface.php ├── Resolver │ ├── ChainCountryResolver.php │ ├── ChainCountryResolverInterface.php │ ├── ChainLocaleResolver.php │ ├── ChainLocaleResolverInterface.php │ ├── CountryResolverInterface.php │ ├── DefaultCountryResolver.php │ ├── DefaultLocaleResolver.php │ └── LocaleResolverInterface.php ├── Response │ └── NeedsRedirectException.php ├── TwigExtension │ └── CommerceTwigExtension.php └── UrlData.php └── tests ├── modules ├── commerce_test │ ├── commerce_test.info.yml │ ├── commerce_test.module │ ├── commerce_test.routing.yml │ ├── commerce_test.services.yml │ ├── src │ │ ├── EventSubscriber │ │ │ └── ReferenceablePluginTypesSubscriber.php │ │ ├── Form │ │ │ └── RedirectForm.php │ │ └── Plugin │ │ │ ├── Action │ │ │ └── ThrowException.php │ │ │ └── Commerce │ │ │ └── EntityTrait │ │ │ ├── First.php │ │ │ └── Second.php │ └── templates │ │ └── commerce-test-entity-render.html.twig └── commerce_update_test │ ├── commerce_update_test.info.yml │ └── config │ └── install │ └── commerce_store.commerce_store_type.testing.yml ├── src ├── Functional │ ├── CommerceBrowserTestBase.php │ ├── EntitySelectWidgetTest.php │ ├── EntityTraitTest.php │ ├── RedirectTest.php │ └── UninstallTest.php ├── FunctionalJavascript │ ├── CommerceWebDriverTestBase.php │ └── PluginSelectTest.php ├── Kernel │ ├── CommerceKernelTestBase.php │ ├── CommerceTwigExtensionTest.php │ ├── ConfigUpdaterTest.php │ ├── ConfigurableFieldManagerTest.php │ ├── EntityUuidMapperTest.php │ ├── IntervalTest.php │ ├── MailHandlerTest.php │ ├── MailHandlerThemeTest.php │ ├── PluginItemTest.php │ └── RemoteIdItemTest.php ├── Traits │ ├── CommerceBrowserTestTrait.php │ ├── DeprecationSuppressionTrait.php │ └── JavascriptTestTrait.php └── Unit │ ├── AvailabilityManagerTest.php │ ├── ConditionGroupTest.php │ ├── PurchasableEntityTypeRepositoryTest.php │ ├── Resolver │ ├── ChainCountryResolverTest.php │ ├── ChainLocaleResolverTest.php │ ├── DefaultCountryResolverTest.php │ └── DefaultLocaleResolverTest.php │ └── UrlDataTest.php └── themes └── commerce_test_theme ├── commerce_test_theme.info.yml └── templates └── username.html.twig /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | ._* 3 | *~ 4 | *.kpf 5 | -------------------------------------------------------------------------------- /.travis-before-script.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e $DRUPAL_TI_DEBUG 4 | 5 | # Ensure the right Drupal version is installed. 6 | # Note: This function is re-entrant. 7 | drupal_ti_ensure_drupal 8 | 9 | # Turn on chromdriver for functional Javascript tests 10 | chromedriver > /dev/null 2>&1 & 11 | -------------------------------------------------------------------------------- /.travis-simpletest-js.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # @file 3 | # Simple script to run the tests via travis-ci. 4 | 5 | set -e $DRUPAL_TI_DEBUG 6 | 7 | export ARGS=( $DRUPAL_TI_SIMPLETEST_JS_ARGS ) 8 | 9 | if [ -n "$DRUPAL_TI_SIMPLETEST_GROUP" ] 10 | then 11 | ARGS=( "${ARGS[@]}" "$DRUPAL_TI_SIMPLETEST_GROUP" ) 12 | fi 13 | 14 | 15 | cd "$DRUPAL_TI_DRUPAL_DIR" 16 | { php "$DRUPAL_TI_SIMPLETEST_FILE" --php $(which php) "${ARGS[@]}" || echo "1 fails"; } | tee /tmp/simpletest-result.txt 17 | 18 | egrep -i "([1-9]+ fail[s]?)|(Fatal error)|([1-9]+ exception[s]?)" /tmp/simpletest-result.txt && exit 1 19 | exit 0 20 | -------------------------------------------------------------------------------- /commerce.info.yml: -------------------------------------------------------------------------------- 1 | name: Commerce 2 | type: module 3 | description: 'Defines common functionality for all Commerce modules.' 4 | package: Commerce 5 | core_version_requirement: ^8.8 || ^9 6 | configure: commerce.configuration 7 | dependencies: 8 | - address:address 9 | - entity:entity 10 | - inline_entity_form:inline_entity_form 11 | - token:token 12 | - drupal:datetime 13 | - drupal:views 14 | -------------------------------------------------------------------------------- /commerce.install: -------------------------------------------------------------------------------- 1 | t('BC Math'), 17 | 'description' => t('Commerce requires the BC Math PHP extension.'), 18 | 'severity' => REQUIREMENT_ERROR, 19 | ]; 20 | } 21 | } 22 | 23 | return $requirements; 24 | } 25 | 26 | /** 27 | * Install the Token module. 28 | */ 29 | function commerce_update_8201() { 30 | \Drupal::service('module_installer')->install(['token']); 31 | } 32 | -------------------------------------------------------------------------------- /commerce.libraries.yml: -------------------------------------------------------------------------------- 1 | conditions: 2 | version: VERSION 3 | js: 4 | js/conditions.js: {} 5 | 6 | toolbar: 7 | version: VERSION 8 | css: 9 | theme: 10 | css/commerce.icons.css: {} 11 | -------------------------------------------------------------------------------- /commerce.links.menu.yml: -------------------------------------------------------------------------------- 1 | commerce.admin_commerce: 2 | title: 'Commerce' 3 | route_name: 'commerce.admin_commerce' 4 | parent: 'system.admin' 5 | description: 'Administer and configure your Commerce store.' 6 | weight: -9 7 | 8 | commerce.configuration: 9 | title: 'Configuration' 10 | route_name: 'commerce.configuration' 11 | parent: 'commerce.admin_commerce' 12 | description: 'Configure your store settings and structure.' 13 | weight: 10 14 | 15 | commerce.store_configuration: 16 | title: 'Store' 17 | route_name: 'commerce.store_configuration' 18 | parent: 'commerce.configuration' 19 | weight: -20 20 | -------------------------------------------------------------------------------- /commerce.permissions.yml: -------------------------------------------------------------------------------- 1 | 'access commerce administration pages': 2 | title: 'Use the commerce administration pages' 3 | -------------------------------------------------------------------------------- /commerce.plugin_type.yml: -------------------------------------------------------------------------------- 1 | commerce.condition: 2 | label: Commerce condition 3 | provider: commerce 4 | plugin_manager_service_id: plugin.manager.commerce_condition 5 | plugin_definition_decorator_class: Drupal\plugin\PluginDefinition\ArrayPluginDefinitionDecorator 6 | 7 | commerce.entity_trait: 8 | label: Commerce entity trait 9 | provider: commerce 10 | plugin_manager_service_id: plugin.manager.commerce_entity_trait 11 | plugin_definition_decorator_class: Drupal\plugin\PluginDefinition\ArrayPluginDefinitionDecorator 12 | -------------------------------------------------------------------------------- /commerce.routing.yml: -------------------------------------------------------------------------------- 1 | commerce.admin_commerce: 2 | path: '/admin/commerce' 3 | defaults: 4 | _controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage' 5 | _title: 'Commerce' 6 | requirements: 7 | _permission: 'access commerce administration pages' 8 | 9 | commerce.configuration: 10 | path: '/admin/commerce/config' 11 | defaults: 12 | _controller: '\Drupal\system\Controller\SystemController::overview' 13 | link_id: 'commerce.configuration' 14 | _title: 'Configuration' 15 | requirements: 16 | _permission: 'access commerce administration pages' 17 | 18 | commerce.store_configuration: 19 | path: '/admin/commerce/config/store' 20 | defaults: 21 | _controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage' 22 | _title: 'Store' 23 | requirements: 24 | _permission: 'access commerce administration pages' 25 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "drupal/commerce", 3 | "type": "drupal-module", 4 | "description": "Drupal Commerce is a flexible eCommerce solution.", 5 | "homepage": "http://drupal.org/project/commerce", 6 | "license": "GPL-2.0+", 7 | "require": { 8 | "php": ">=7.0.8", 9 | "ext-bcmath": "*", 10 | "drupal/core": "^8.8 || ^9", 11 | "drupal/address": "^1.7", 12 | "drupal/entity": "^1.0-rc2", 13 | "drupal/entity_reference_revisions": "~1.0", 14 | "drupal/inline_entity_form": "^1.0-rc6", 15 | "drupal/profile": "^1.0", 16 | "drupal/state_machine": "^1.0-rc1", 17 | "drupal/token": "^1.0", 18 | "commerceguys/intl": "^1.0.0" 19 | }, 20 | "require-dev": { 21 | "drupal/entity_print": "^2.2", 22 | "drupal/mailsystem": "^4.3" 23 | }, 24 | "minimum-stability": "dev" 25 | } 26 | -------------------------------------------------------------------------------- /css/commerce.icons.css: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * Commerce toolbar icon styling. 4 | */ 5 | 6 | /* Bar styling (first row), currently unused. */ 7 | .toolbar-bar .toolbar-icon-commerce-admin-commerce:before { 8 | background-image: url("../icons/bebebe/drupal-cart.svg"); 9 | } 10 | .toolbar-bar .toolbar-icon-commerce-admin-commerce:active:before { 11 | background-image: url("../icons/ffffff/drupal-cart.svg"); 12 | } 13 | 14 | /* Tray styling (second row) */ 15 | .toolbar-tray .toolbar-icon.toolbar-icon-commerce-admin-commerce:before { 16 | background-image: url("../icons/787878/drupal-cart.svg"); 17 | } 18 | .toolbar-tray .toolbar-icon.toolbar-icon-commerce-admin-commerce:active:before, 19 | .toolbar-tray .toolbar-icon.toolbar-icon-commerce-admin-commerce.is-active:before { 20 | background-image: url("../icons/000000/drupal-cart.svg"); 21 | } 22 | -------------------------------------------------------------------------------- /drupalci.yml: -------------------------------------------------------------------------------- 1 | # https://www.drupal.org/drupalorg/docs/drupal-ci/customizing-drupalci-testing 2 | build: 3 | assessment: 4 | validate_codebase: 5 | phplint: 6 | container_composer: 7 | phpcs: 8 | # phpcs will use core's specified version of Coder. 9 | sniff-all-files: true 10 | halt-on-fail: false 11 | testing: 12 | run_tests.standard: 13 | types: 'PHPUnit-Unit,PHPUnit-Kernel,PHPUnit-Functional' 14 | testgroups: '--all' 15 | suppress-deprecations: false 16 | run_tests.javascript: 17 | concurrency: 15 18 | types: 'PHPUnit-FunctionalJavascript' 19 | testgroups: '--all' 20 | suppress-deprecations: false 21 | halt-on-fail: false 22 | -------------------------------------------------------------------------------- /icons/000000/cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drupalcommerce/commerce/643bb39620c083f6d52acd41c8170d7f34b40e1c/icons/000000/cart.png -------------------------------------------------------------------------------- /icons/000000/cart.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /icons/000000/drupal-cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drupalcommerce/commerce/643bb39620c083f6d52acd41c8170d7f34b40e1c/icons/000000/drupal-cart.png -------------------------------------------------------------------------------- /icons/000000/drupal-cart.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /icons/5181c6/cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drupalcommerce/commerce/643bb39620c083f6d52acd41c8170d7f34b40e1c/icons/5181c6/cart.png -------------------------------------------------------------------------------- /icons/5181c6/cart.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /icons/5181c6/drupal-cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drupalcommerce/commerce/643bb39620c083f6d52acd41c8170d7f34b40e1c/icons/5181c6/drupal-cart.png -------------------------------------------------------------------------------- /icons/5181c6/drupal-cart.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /icons/73b355/cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drupalcommerce/commerce/643bb39620c083f6d52acd41c8170d7f34b40e1c/icons/73b355/cart.png -------------------------------------------------------------------------------- /icons/73b355/cart.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /icons/73b355/drupal-cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drupalcommerce/commerce/643bb39620c083f6d52acd41c8170d7f34b40e1c/icons/73b355/drupal-cart.png -------------------------------------------------------------------------------- /icons/73b355/drupal-cart.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /icons/787878/cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drupalcommerce/commerce/643bb39620c083f6d52acd41c8170d7f34b40e1c/icons/787878/cart.png -------------------------------------------------------------------------------- /icons/787878/cart.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /icons/787878/drupal-cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drupalcommerce/commerce/643bb39620c083f6d52acd41c8170d7f34b40e1c/icons/787878/drupal-cart.png -------------------------------------------------------------------------------- /icons/787878/drupal-cart.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /icons/bebebe/cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drupalcommerce/commerce/643bb39620c083f6d52acd41c8170d7f34b40e1c/icons/bebebe/cart.png -------------------------------------------------------------------------------- /icons/bebebe/cart.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /icons/bebebe/drupal-cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drupalcommerce/commerce/643bb39620c083f6d52acd41c8170d7f34b40e1c/icons/bebebe/drupal-cart.png -------------------------------------------------------------------------------- /icons/bebebe/drupal-cart.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /icons/e29700/cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drupalcommerce/commerce/643bb39620c083f6d52acd41c8170d7f34b40e1c/icons/e29700/cart.png -------------------------------------------------------------------------------- /icons/e29700/cart.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /icons/e29700/drupal-cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drupalcommerce/commerce/643bb39620c083f6d52acd41c8170d7f34b40e1c/icons/e29700/drupal-cart.png -------------------------------------------------------------------------------- /icons/e29700/drupal-cart.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /icons/ea2800/cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drupalcommerce/commerce/643bb39620c083f6d52acd41c8170d7f34b40e1c/icons/ea2800/cart.png -------------------------------------------------------------------------------- /icons/ea2800/cart.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /icons/ea2800/drupal-cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drupalcommerce/commerce/643bb39620c083f6d52acd41c8170d7f34b40e1c/icons/ea2800/drupal-cart.png -------------------------------------------------------------------------------- /icons/ea2800/drupal-cart.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /icons/ffffff/cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drupalcommerce/commerce/643bb39620c083f6d52acd41c8170d7f34b40e1c/icons/ffffff/cart.png -------------------------------------------------------------------------------- /icons/ffffff/cart.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /icons/ffffff/drupal-cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drupalcommerce/commerce/643bb39620c083f6d52acd41c8170d7f34b40e1c/icons/ffffff/drupal-cart.png -------------------------------------------------------------------------------- /icons/ffffff/drupal-cart.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /js/conditions.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * Condition UI behaviors. 4 | */ 5 | 6 | (function ($, window, Drupal) { 7 | 8 | 'use strict'; 9 | 10 | /** 11 | * Provides the summary information for the condition vertical tabs. 12 | * 13 | * @type {Drupal~behavior} 14 | * 15 | * @prop {Drupal~behaviorAttach} attach 16 | * Attaches the behavior for the condition summaries. 17 | */ 18 | Drupal.behaviors.conditionSummary = { 19 | attach: function () { 20 | $('.vertical-tabs__pane').each(function () { 21 | $(this).drupalSetSummary(function (context) { 22 | if ($(context).find('input.enable:checked').length) { 23 | return Drupal.t('Restricted'); 24 | } 25 | else { 26 | return Drupal.t('Not restricted'); 27 | } 28 | }); 29 | }); 30 | } 31 | }; 32 | 33 | })(jQuery, window, Drupal); 34 | -------------------------------------------------------------------------------- /ludwig.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "commerceguys/intl": { 4 | "version": "v1.0.5", 5 | "url": "https://github.com/commerceguys/intl/archive/v1.0.5.zip" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/cart/commerce_cart.info.yml: -------------------------------------------------------------------------------- 1 | name: Commerce Cart 2 | type: module 3 | description: 'Implements the shopping cart system and add to cart features.' 4 | package: Commerce 5 | core_version_requirement: ^8.8 || ^9 6 | dependencies: 7 | - commerce:commerce 8 | - commerce:commerce_order 9 | - commerce:commerce_product 10 | -------------------------------------------------------------------------------- /modules/cart/commerce_cart.libraries.yml: -------------------------------------------------------------------------------- 1 | admin: 2 | version: VERSION 3 | css: 4 | theme: 5 | css/commerce_cart.admin.css: {} 6 | 7 | cart_block: 8 | version: VERSION 9 | css: 10 | layout: 11 | css/commerce_cart.layout.css: {} 12 | theme: 13 | css/commerce_cart.theme.css: {} 14 | js: 15 | js/commerce_cart.js: {} 16 | dependencies: 17 | - core/jquery 18 | - core/jquery.once 19 | - core/drupal 20 | 21 | cart_form: 22 | version: VERSION 23 | js: 24 | js/commerce_cart.form.js: {} 25 | dependencies: 26 | - core/jquery 27 | - core/drupal 28 | -------------------------------------------------------------------------------- /modules/cart/commerce_cart.routing.yml: -------------------------------------------------------------------------------- 1 | commerce_cart.page: 2 | path: '/cart' 3 | defaults: 4 | _controller: '\Drupal\commerce_cart\Controller\CartController::cartPage' 5 | _title: 'Shopping cart' 6 | requirements: 7 | _access: 'TRUE' 8 | -------------------------------------------------------------------------------- /modules/cart/commerce_cart.views_execution.inc: -------------------------------------------------------------------------------- 1 | id() == 'commerce_orders') { 16 | // Filter out carts, they have their own tab. 17 | $query->addWhere(0, 'cart', 1, '<>'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /modules/cart/config/install/core.entity_form_mode.commerce_order_item.add_to_cart.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | module: 5 | - commerce_order 6 | enforced: 7 | module: 8 | - commerce_cart 9 | id: commerce_order_item.add_to_cart 10 | label: 'Add to cart' 11 | targetEntityType: commerce_order_item 12 | cache: true 13 | -------------------------------------------------------------------------------- /modules/cart/config/install/core.entity_view_mode.commerce_product_attribute_value.add_to_cart.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | module: 5 | - commerce_product 6 | id: commerce_product_attribute_value.add_to_cart 7 | label: 'Add to Cart Form' 8 | targetEntityType: commerce_product_attribute_value 9 | cache: true 10 | -------------------------------------------------------------------------------- /modules/cart/css/commerce_cart.admin.css: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * Admin styling. 4 | */ 5 | 6 | .interval .form-type-number, .interval .form-type-select { 7 | display: inline; 8 | } 9 | -------------------------------------------------------------------------------- /modules/cart/css/commerce_cart.layout.css: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * Reusable layout styling for Commerce Cart components 4 | */ 5 | 6 | .cart-block--summary a { 7 | display: block; 8 | } 9 | .cart-block--contents { 10 | display: none; 11 | position: absolute; 12 | overflow: hidden; 13 | z-index: 300; 14 | } 15 | .cart-block--contents__items { 16 | overflow-x: hidden; 17 | overflow-y: scroll; 18 | max-height: 300px; 19 | } 20 | .cart-block--contents.is-outside-horizontal { 21 | right: 0; 22 | } 23 | .cart-block--contents__expanded { 24 | overflow: visible; 25 | } 26 | -------------------------------------------------------------------------------- /modules/cart/css/commerce_cart.theme.css: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * Default theme implementation for Commerce Cart components 4 | * 5 | * Provides some sensible defaults when used with Bartik. 6 | */ 7 | 8 | .cart-block--contents { 9 | width: 225px; 10 | background: white; 11 | color: black; 12 | } 13 | .cart-block--contents__inner { 14 | padding: 10px; 15 | } 16 | .cart--cart-block .cart-block--contents a { 17 | color: inherit; 18 | } 19 | .cart-block--summary, 20 | .cart-block--summary__icon img, 21 | .cart-block--summary__count { 22 | vertical-align: middle; 23 | } 24 | 25 | .cart--cart-block li.cart-block--contents__item { 26 | clear: both; 27 | margin-bottom: 10px; 28 | border-bottom: 1px #eaeaea solid; 29 | } 30 | .cart-block--contents__quantity { 31 | float: left; 32 | } 33 | .cart-block--contents__price { 34 | float: right; 35 | } 36 | -------------------------------------------------------------------------------- /modules/cart/js/commerce_cart.form.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * Defines Javascript behaviors for the cart form. 4 | */ 5 | 6 | (function ($, Drupal, drupalSettings) { 7 | 'use strict'; 8 | 9 | Drupal.behaviors.commerceCartForm = { 10 | attach: function (context) { 11 | // Trigger the "Update" button when Enter is pressed in a quantity field. 12 | $('form .views-field-edit-quantity input.form-number', context) 13 | .once('commerce-cart-edit-quantity') 14 | .keydown(function (event) { 15 | if (event.keyCode === 13) { 16 | // Prevent the browser default ("Remove") from being triggered. 17 | event.preventDefault(); 18 | $(':input#edit-submit', $(this).parents('form')).click(); 19 | } 20 | }); 21 | } 22 | }; 23 | })(jQuery, Drupal, drupalSettings); 24 | -------------------------------------------------------------------------------- /modules/cart/src/CronInterface.php: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | {{ icon }} 5 | {{ count_text }} 6 | 7 |
8 | {% if content %} 9 |
10 |
11 |
12 | {{ content }} 13 |
14 | 17 |
18 |
19 | {% endif %} 20 | 21 | -------------------------------------------------------------------------------- /modules/cart/templates/commerce-cart-empty-page.html.twig: -------------------------------------------------------------------------------- 1 | {# 2 | /** 3 | * @file 4 | * 5 | * Empty cart page template. 6 | * 7 | * @ingroup themeable 8 | */ 9 | #} 10 |
11 | {{ 'Your shopping cart is empty.'|t }} 12 |
13 | -------------------------------------------------------------------------------- /modules/cart/tests/modules/commerce_cart_big_pipe/commerce_cart_big_pipe.info.yml: -------------------------------------------------------------------------------- 1 | name: Commerce Cart Big Pipe 2 | type: module 3 | description: Provides a slow version of AddToCart form for testing Big Pipe streaming 4 | package: Testing 5 | core_version_requirement: ^8.8 || ^9 6 | dependencies: 7 | - commerce:commerce_cart 8 | - commerce:commerce_product 9 | - drupal:big_pipe 10 | - drupal:big_pipe_test 11 | - drupal:dynamic_page_cache 12 | -------------------------------------------------------------------------------- /modules/cart/tests/modules/commerce_cart_big_pipe/commerce_cart_big_pipe.install: -------------------------------------------------------------------------------- 1 | setFormClass('add_to_cart', BigPipeAddToCartForm::class); 15 | } 16 | -------------------------------------------------------------------------------- /modules/cart/tests/modules/commerce_cart_big_pipe/src/Form/BigPipeAddToCartForm.php: -------------------------------------------------------------------------------- 1 | messenger()->addMessage(sprintf('Delayed form build by %s seconds', $load_slowdown)); 20 | sleep($load_slowdown); 21 | return parent::buildForm($form, $form_state); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /modules/cart/tests/modules/commerce_cart_test/commerce_cart_test.info.yml: -------------------------------------------------------------------------------- 1 | name: Commerce Cart Test 2 | type: module 3 | description: Contains various non-specific things needed in tests. 4 | package: Testing 5 | core_version_requirement: ^8.8 || ^9 6 | dependencies: 7 | - commerce:commerce_cart 8 | - commerce:commerce_product 9 | -------------------------------------------------------------------------------- /modules/cart/tests/modules/commerce_cart_test/commerce_cart_test.module: -------------------------------------------------------------------------------- 1 | original being empty). 16 | */ 17 | function commerce_cart_test_commerce_order_update(EntityInterface $entity) { 18 | if (!$entity->isNew() && empty($entity->original)) { 19 | throw new EntityMalformedException('$entity->original not found'); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /modules/cart/tests/modules/commerce_cart_test/config/install/commerce_order.commerce_order_type.cart_test.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | module: 5 | - commerce_cart 6 | third_party_settings: 7 | commerce_cart: 8 | cart_form_view: commerce_cart_form 9 | cart_block_view: commerce_cart_block 10 | label: Cart test 11 | id: cart_test 12 | workflow: order_default 13 | traits: { } 14 | refresh_mode: customer 15 | refresh_frequency: 300 16 | sendReceipt: true 17 | receiptBcc: '' 18 | -------------------------------------------------------------------------------- /modules/cart/tests/modules/extra_order_item_field/config/install/field.field.commerce_order_item.default.field_custom_text.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | config: 5 | - commerce_order.commerce_order_item_type.default 6 | - field.storage.commerce_order_item.field_custom_text 7 | id: commerce_order_item.default.field_custom_text 8 | field_name: field_custom_text 9 | entity_type: commerce_order_item 10 | bundle: default 11 | label: 'Custom text' 12 | description: '' 13 | required: false 14 | translatable: false 15 | default_value: { } 16 | default_value_callback: '' 17 | settings: { } 18 | field_type: string 19 | -------------------------------------------------------------------------------- /modules/cart/tests/modules/extra_order_item_field/config/install/field.storage.commerce_order_item.field_custom_text.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | module: 5 | - commerce_order 6 | id: commerce_order_item.field_custom_text 7 | field_name: field_custom_text 8 | entity_type: commerce_order_item 9 | type: string 10 | settings: 11 | max_length: 255 12 | is_ascii: false 13 | case_sensitive: false 14 | module: core 15 | locked: false 16 | cardinality: 1 17 | translatable: true 18 | indexes: { } 19 | persist_with_no_fields: false 20 | custom_storage: false 21 | -------------------------------------------------------------------------------- /modules/cart/tests/modules/extra_order_item_field/extra_order_item_field.info.yml: -------------------------------------------------------------------------------- 1 | name: Extra order item field 2 | type: module 3 | description: Contains field and field storage config for extra order item field 4 | package: Testing 5 | core_version_requirement: ^8.8 || ^9 6 | dependencies: 7 | - commerce:commerce_order 8 | -------------------------------------------------------------------------------- /modules/checkout/commerce_checkout.info.yml: -------------------------------------------------------------------------------- 1 | name: 'Commerce Checkout' 2 | type: module 3 | description: 'Provides configurable checkout flows.' 4 | package: Commerce 5 | core_version_requirement: ^8.8 || ^9 6 | configure: entity.commerce_checkout_flow.collection 7 | dependencies: 8 | - commerce:commerce 9 | - commerce:commerce_order 10 | - commerce:commerce_cart 11 | -------------------------------------------------------------------------------- /modules/checkout/commerce_checkout.install: -------------------------------------------------------------------------------- 1 | revert([ 15 | 'views.view.commerce_checkout_order_summary', 16 | ], FALSE); 17 | $message = implode('
', $result->getFailed()); 18 | 19 | return $message; 20 | } 21 | -------------------------------------------------------------------------------- /modules/checkout/commerce_checkout.routing.yml: -------------------------------------------------------------------------------- 1 | commerce_checkout.form: 2 | path: '/checkout/{commerce_order}/{step}' 3 | defaults: 4 | _controller: '\Drupal\commerce_checkout\Controller\CheckoutController::formPage' 5 | _title: 'Checkout' 6 | step: null 7 | requirements: 8 | _custom_access: '\Drupal\commerce_checkout\Controller\CheckoutController::checkAccess' 9 | options: 10 | parameters: 11 | commerce_order: 12 | type: entity:commerce_order 13 | -------------------------------------------------------------------------------- /modules/checkout/config/install/core.entity_view_mode.commerce_product_variation.summary.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | enforced: 5 | module: 6 | - commerce_checkout 7 | module: 8 | - commerce_product 9 | id: commerce_product_variation.summary 10 | label: Summary 11 | targetEntityType: commerce_product_variation 12 | cache: true 13 | -------------------------------------------------------------------------------- /modules/checkout/css/commerce_checkout.progress.css: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * Default theme implementation for the checkout progress component. 4 | */ 5 | 6 | body { 7 | counter-reset: checkout-progress; 8 | } 9 | 10 | .checkout-progress--step { 11 | display: inline; 12 | padding-right: 1em; 13 | } 14 | 15 | /** 16 | * display: inline removes the list numbers, so they're added back via CSS3 17 | * counters to avoid using float: left, which gives uneven spacing. 18 | */ 19 | .checkout-progress--step:before { 20 | content: counter(checkout-progress) ". "; 21 | counter-increment: checkout-progress; 22 | } 23 | 24 | .checkout-progress--step__current { 25 | font-weight: bold; 26 | } 27 | -------------------------------------------------------------------------------- /modules/checkout/src/Annotation/CommerceCheckoutFlow.php: -------------------------------------------------------------------------------- 1 | t('Checkout flow'); 18 | return $header + parent::buildHeader(); 19 | } 20 | 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function buildRow(EntityInterface $entity) { 25 | $row['label'] = $entity->label(); 26 | return $row + parent::buildRow($entity); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /modules/checkout/src/Event/CheckoutEvents.php: -------------------------------------------------------------------------------- 1 | 15 | {{- message -}} 16 | 17 | {% if payment_instructions %} 18 |
19 |

{{ 'Payment instructions'|t }}

20 | {{ payment_instructions }} 21 |
22 | {% endif %} 23 | 24 | -------------------------------------------------------------------------------- /modules/checkout/templates/commerce-checkout-completion-register.html.twig: -------------------------------------------------------------------------------- 1 | {# 2 | /** 3 | * @file 4 | * A layout for the checkout registration form 5 | * 6 | * Available variables: 7 | * - form: The form. 8 | * 9 | * @ingroup themeable 10 | */ 11 | #} 12 |
13 |
14 |

{%trans%}Create your account{%endtrans%}

15 |

{%trans%}Set a password to save your details for next time.{%endtrans%}

16 |
17 |
18 | {{ form }} 19 |
20 |
21 | -------------------------------------------------------------------------------- /modules/checkout/templates/commerce-checkout-form--with-sidebar.html.twig: -------------------------------------------------------------------------------- 1 | {# 2 | /** 3 | * @file 4 | * Two column template for the checkout form. 5 | * 6 | * Available variables: 7 | * - form: The form. 8 | * 9 | * @ingroup themeable 10 | */ 11 | #} 12 |
13 |
14 | {{ form|without('sidebar', 'actions') }} 15 |
16 |
17 |

{% trans %} Order Summary {% endtrans %}

18 | {{ form.sidebar }} 19 |
20 | 23 |
24 | -------------------------------------------------------------------------------- /modules/checkout/templates/commerce-checkout-form.html.twig: -------------------------------------------------------------------------------- 1 | {# 2 | /** 3 | * @file 4 | * Two column template for the checkout form. 5 | * 6 | * Available variables: 7 | * - form: The form. 8 | * 9 | * @ingroup themeable 10 | */ 11 | #} 12 |
13 | {{ form }} 14 |
15 | -------------------------------------------------------------------------------- /modules/checkout/templates/commerce-checkout-pane.html.twig: -------------------------------------------------------------------------------- 1 | {# 2 | /** 3 | * @file 4 | * Default theme implementation for checkout panes. 5 | * 6 | * Available variables: 7 | * - elements: The checkout pane's form elements. 8 | * 9 | * @ingroup themeable 10 | */ 11 | #} 12 | {{ elements }} 13 | -------------------------------------------------------------------------------- /modules/checkout/templates/commerce-checkout-progress.html.twig: -------------------------------------------------------------------------------- 1 | {# 2 | /** 3 | * @file 4 | * Default theme implementation for the checkout progress. 5 | * 6 | * Available variables: 7 | * - steps: An array of steps, where each step has the following keys: 8 | * - id: The step ID. 9 | * - label: The step label. 10 | * - position: 'previous', 'current' or 'next'. 11 | * 12 | * @ingroup themeable 13 | */ 14 | #} 15 |
    16 | {% for step in steps %} 17 |
  1. {{ step.label }}
  2. 18 | {% endfor %} 19 |
20 | -------------------------------------------------------------------------------- /modules/checkout/tests/modules/commerce_checkout_test/commerce_checkout_test.info.yml: -------------------------------------------------------------------------------- 1 | name: Commerce Checkout Test 2 | type: module 3 | description: Contains various non-specific things needed in tests. 4 | package: Testing 5 | core_version_requirement: ^8.8 || ^9 6 | dependencies: 7 | - commerce:commerce_checkout 8 | -------------------------------------------------------------------------------- /modules/checkout/tests/modules/commerce_checkout_test/commerce_checkout_test.services.yml: -------------------------------------------------------------------------------- 1 | services: 2 | commerce_checkout_test.checkout_subscriber: 3 | class: Drupal\commerce_checkout_test\EventSubscriber\CheckoutSubscriber 4 | tags: 5 | - { name: event_subscriber } 6 | -------------------------------------------------------------------------------- /modules/log/commerce_log.commerce_log_categories.yml: -------------------------------------------------------------------------------- 1 | commerce_cart: 2 | label: Cart 3 | entity_type: commerce_order 4 | 5 | commerce_order: 6 | label: Order 7 | entity_type: commerce_order 8 | -------------------------------------------------------------------------------- /modules/log/commerce_log.info.yml: -------------------------------------------------------------------------------- 1 | name: Commerce Log 2 | type: module 3 | description: 'Provides activity logs for Commerce entities.' 4 | package: Commerce 5 | core_version_requirement: ^8.8 || ^9 6 | dependencies: 7 | - commerce:commerce 8 | -------------------------------------------------------------------------------- /modules/log/commerce_log.module: -------------------------------------------------------------------------------- 1 | 'view', 16 | '#name' => 'commerce_activity', 17 | '#display_id' => 'default', 18 | '#arguments' => [$order->id(), 'commerce_order'], 19 | '#embed' => TRUE, 20 | '#title' => t('Order activity'), 21 | ]; 22 | } 23 | -------------------------------------------------------------------------------- /modules/log/commerce_log.permissions.yml: -------------------------------------------------------------------------------- 1 | permission_callbacks: 2 | - \Drupal\commerce_log\LogCommentPermissions::buildPermissions 3 | -------------------------------------------------------------------------------- /modules/log/commerce_log.services.yml: -------------------------------------------------------------------------------- 1 | services: 2 | plugin.manager.commerce_log_template: 3 | class: Drupal\commerce_log\LogTemplateManager 4 | arguments: ['@module_handler', '@cache.discovery', '@plugin.manager.commerce_log_category'] 5 | 6 | plugin.manager.commerce_log_category: 7 | class: Drupal\commerce_log\LogCategoryManager 8 | arguments: ['@module_handler', '@cache.discovery'] 9 | -------------------------------------------------------------------------------- /modules/log/commerce_log.views.inc: -------------------------------------------------------------------------------- 1 | t('Admin comment form'), 14 | 'help' => t('Displays a form that allows admins with the proper permission to add a log as comment. Requires an entity ID argument.'), 15 | 'area' => [ 16 | 'id' => 'commerce_log_admin_comment_form', 17 | ], 18 | ]; 19 | return $data; 20 | } 21 | -------------------------------------------------------------------------------- /modules/log/src/LogCategoryManagerInterface.php: -------------------------------------------------------------------------------- 1 | pluginDefinition['id']; 14 | } 15 | 16 | /** 17 | * {@inheritdoc} 18 | */ 19 | public function getLabel() { 20 | return $this->pluginDefinition['label']; 21 | } 22 | 23 | /** 24 | * {@inheritdoc} 25 | */ 26 | public function getEntityTypeId() { 27 | return $this->pluginDefinition['entity_type']; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /modules/log/src/Plugin/LogCategory/LogCategoryInterface.php: -------------------------------------------------------------------------------- 1 | pluginDefinition['id']; 14 | } 15 | 16 | /** 17 | * {@inheritdoc} 18 | */ 19 | public function getLabel() { 20 | return $this->pluginDefinition['label']; 21 | } 22 | 23 | /** 24 | * {@inheritdoc} 25 | */ 26 | public function getCategory() { 27 | return $this->pluginDefinition['category']; 28 | } 29 | 30 | /** 31 | * {@inheritdoc} 32 | */ 33 | public function getTemplate() { 34 | return $this->pluginDefinition['template']; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /modules/log/src/Plugin/LogTemplate/LogTemplateInterface.php: -------------------------------------------------------------------------------- 1 | {{ entity_label }} was created.

' 6 | -------------------------------------------------------------------------------- /modules/log/tests/module/commerce_log_test.info.yml: -------------------------------------------------------------------------------- 1 | name: Commerce Log Test 2 | type: module 3 | description: 'Test module for Commerce Log.' 4 | package: Commerce 5 | core_version_requirement: ^8.8 || ^9 6 | dependencies: 7 | - commerce:commerce_log 8 | - drupal:entity_test 9 | -------------------------------------------------------------------------------- /modules/number_pattern/commerce_number_pattern.info.yml: -------------------------------------------------------------------------------- 1 | name: Commerce Number Pattern 2 | type: module 3 | description: 'Provides configurable patterns for generating sequential numbers.' 4 | package: Commerce 5 | core_version_requirement: ^8.8 || ^9 6 | configure: entity.commerce_number_pattern.collection 7 | dependencies: 8 | - commerce:commerce 9 | - commerce:commerce_store 10 | -------------------------------------------------------------------------------- /modules/number_pattern/commerce_number_pattern.links.action.yml: -------------------------------------------------------------------------------- 1 | entity.commerce_number_pattern.add_form: 2 | route_name: entity.commerce_number_pattern.add_form 3 | title: 'Add number pattern' 4 | appears_on: 5 | - entity.commerce_number_pattern.collection 6 | -------------------------------------------------------------------------------- /modules/number_pattern/commerce_number_pattern.links.menu.yml: -------------------------------------------------------------------------------- 1 | entity.commerce_number_pattern.collection: 2 | title: 'Number patterns' 3 | route_name: 'entity.commerce_number_pattern.collection' 4 | parent: 'commerce.store_configuration' 5 | description: 'Manage number patterns.' 6 | weight: 10 7 | -------------------------------------------------------------------------------- /modules/number_pattern/commerce_number_pattern.permissions.yml: -------------------------------------------------------------------------------- 1 | 'administer commerce_number_pattern': 2 | title: 'Administer number patterns' 3 | 'restrict access': TRUE 4 | -------------------------------------------------------------------------------- /modules/number_pattern/commerce_number_pattern.services.yml: -------------------------------------------------------------------------------- 1 | services: 2 | plugin.manager.commerce_number_pattern: 3 | class: Drupal\commerce_number_pattern\NumberPatternManager 4 | parent: default_plugin_manager 5 | -------------------------------------------------------------------------------- /modules/number_pattern/src/Annotation/CommerceNumberPattern.php: -------------------------------------------------------------------------------- 1 | t('Order total'), 14 | 'help' => t('Displays the order total field, requires an Order ID argument.'), 15 | 'area' => [ 16 | 'id' => 'commerce_order_total', 17 | ], 18 | ]; 19 | return $data; 20 | } 21 | -------------------------------------------------------------------------------- /modules/order/commerce_order.workflow_groups.yml: -------------------------------------------------------------------------------- 1 | commerce_order: 2 | label: Order 3 | entity_type: commerce_order 4 | -------------------------------------------------------------------------------- /modules/order/config/install/commerce_number_pattern.commerce_number_pattern.order_default.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | enforced: 5 | module: 6 | - commerce_order 7 | id: order_default 8 | label: Default 9 | targetEntityType: commerce_order 10 | plugin: infinite 11 | configuration: 12 | pattern: '[pattern:number]' 13 | initial_number: 1 14 | padding: 0 15 | per_store_sequence: true 16 | -------------------------------------------------------------------------------- /modules/order/config/install/commerce_order.commerce_order_type.default.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | label: Default 4 | id: default 5 | workflow: order_default 6 | numberPattern: order_default 7 | refresh_mode: customer 8 | refresh_frequency: 300 9 | sendReceipt: true 10 | receiptBcc: '' 11 | traits: { } 12 | locked: false 13 | -------------------------------------------------------------------------------- /modules/order/config/install/core.entity_form_display.profile.customer.default.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | config: 5 | - field.field.profile.customer.address 6 | - profile.type.customer 7 | enforced: 8 | module: 9 | - commerce_order 10 | module: 11 | - address 12 | id: profile.customer.default 13 | targetEntityType: profile 14 | bundle: customer 15 | mode: default 16 | content: 17 | address: 18 | type: address_default 19 | weight: 0 20 | settings: { } 21 | third_party_settings: { } 22 | region: content 23 | hidden: 24 | is_default: true 25 | -------------------------------------------------------------------------------- /modules/order/config/install/core.entity_form_mode.profile.billing.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | enforced: 5 | module: 6 | - commerce_order 7 | module: 8 | - profile 9 | id: profile.billing 10 | label: Billing 11 | targetEntityType: profile 12 | cache: true 13 | -------------------------------------------------------------------------------- /modules/order/config/install/core.entity_view_display.profile.customer.admin.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | config: 5 | - core.entity_view_mode.profile.admin 6 | - field.field.profile.customer.address 7 | - profile.type.customer 8 | enforced: 9 | module: 10 | - commerce_order 11 | module: 12 | - address 13 | id: profile.customer.admin 14 | targetEntityType: profile 15 | bundle: customer 16 | mode: admin 17 | content: 18 | address: 19 | type: address_default 20 | weight: 0 21 | label: hidden 22 | settings: { } 23 | third_party_settings: { } 24 | region: content 25 | hidden: { } 26 | -------------------------------------------------------------------------------- /modules/order/config/install/core.entity_view_display.profile.customer.default.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | config: 5 | - field.field.profile.customer.address 6 | - profile.type.customer 7 | enforced: 8 | module: 9 | - commerce_order 10 | module: 11 | - address 12 | id: profile.customer.default 13 | targetEntityType: profile 14 | bundle: customer 15 | mode: default 16 | content: 17 | address: 18 | type: address_default 19 | weight: 0 20 | label: hidden 21 | settings: { } 22 | third_party_settings: { } 23 | region: content 24 | hidden: { } 25 | -------------------------------------------------------------------------------- /modules/order/config/install/core.entity_view_mode.commerce_order.user.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | module: 5 | - commerce_order 6 | id: commerce_order.user 7 | label: User 8 | targetEntityType: commerce_order 9 | cache: true 10 | -------------------------------------------------------------------------------- /modules/order/config/install/core.entity_view_mode.profile.admin.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | enforced: 5 | module: 6 | - commerce_order 7 | module: 8 | - profile 9 | id: profile.admin 10 | label: Admin 11 | targetEntityType: profile 12 | cache: true 13 | -------------------------------------------------------------------------------- /modules/order/config/install/field.storage.profile.address.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | enforced: 5 | module: 6 | - commerce_order 7 | module: 8 | - address 9 | - profile 10 | id: profile.address 11 | field_name: address 12 | entity_type: profile 13 | type: address 14 | settings: { } 15 | module: address 16 | locked: false 17 | cardinality: 1 18 | translatable: true 19 | indexes: { } 20 | persist_with_no_fields: false 21 | custom_storage: false 22 | -------------------------------------------------------------------------------- /modules/order/config/install/profile.type.customer.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | enforced: 5 | module: 6 | - commerce_order 7 | id: customer 8 | label: Customer 9 | display_label: 'Customer information' 10 | multiple: true 11 | registration: false 12 | roles: { } 13 | allow_revisions: false 14 | new_revision: false 15 | third_party_settings: 16 | commerce_order: 17 | customer_profile_type: true 18 | -------------------------------------------------------------------------------- /modules/order/config/install/system.action.commerce_order_delete_action.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | enforced: 5 | module: 6 | - commerce_order 7 | module: 8 | - commerce_order 9 | - entity 10 | id: commerce_order_delete_action 11 | label: 'Delete order' 12 | type: commerce_order 13 | plugin: 'entity_delete_action:commerce_order' 14 | configuration: { } 15 | -------------------------------------------------------------------------------- /modules/order/css/commerce_order.address_book.css: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * Default styles for the address book. 4 | */ 5 | 6 | .address-book__add-link { 7 | margin: 0.75em; 8 | display: block; 9 | text-decoration: none; 10 | border: 0; 11 | } 12 | 13 | .address-book__profiles { 14 | display: flex; 15 | flex-flow: row wrap; 16 | justify-content: space-around; 17 | } 18 | 19 | .address-book__profile { 20 | flex: 1; 21 | margin-left: 0.75em; 22 | margin-right: 0.75em; 23 | } 24 | 25 | .address-book__empty-text { 26 | margin: 0.75em; 27 | } 28 | 29 | .address-book__operations { 30 | margin-top: 0.75em; 31 | margin-bottom: 0.75em; 32 | } 33 | 34 | .address-book__operations a { 35 | margin-right: 10px; 36 | border: 0; 37 | } 38 | 39 | .address-book__set-default-link { 40 | display: block; 41 | } 42 | -------------------------------------------------------------------------------- /modules/order/css/commerce_order.total_summary.css: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * Default styles for the order total summary. 4 | */ 5 | 6 | .order-total-line { 7 | padding: 0 10px; 8 | text-align: right; 9 | } 10 | .order-total-line__total { 11 | padding-top: 5px; 12 | font-weight: bold; 13 | } 14 | .order-total-line-label { 15 | display: inline-block; 16 | } 17 | .order-total-line-value { 18 | display: inline-block; 19 | width: 80px; 20 | text-align: right; 21 | } 22 | -------------------------------------------------------------------------------- /modules/order/src/CommerceOrderServiceProvider.php: -------------------------------------------------------------------------------- 1 | addCompilerPass(new PriceCalculatorPass()); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /modules/order/src/Mail/OrderReceiptMailInterface.php: -------------------------------------------------------------------------------- 1 | $entity->getOrderItemTypeId(), 19 | 'title' => $entity->getOrderItemTitle(), 20 | 'purchased_entity' => $entity, 21 | 'unit_price' => $entity->getPrice(), 22 | ]; 23 | return self::create($values); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /modules/order/src/OrderItemTypeListBuilder.php: -------------------------------------------------------------------------------- 1 | t('Order item type'); 18 | $header['id'] = $this->t('Machine name'); 19 | return $header + parent::buildHeader(); 20 | } 21 | 22 | /** 23 | * {@inheritdoc} 24 | */ 25 | public function buildRow(EntityInterface $entity) { 26 | $row['label'] = $entity->label(); 27 | $row['id'] = $entity->id(); 28 | return $row + parent::buildRow($entity); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /modules/order/src/OrderProcessorInterface.php: -------------------------------------------------------------------------------- 1 | t('Order type'); 18 | $header['id'] = $this->t('Machine name'); 19 | return $header + parent::buildHeader(); 20 | } 21 | 22 | /** 23 | * {@inheritdoc} 24 | */ 25 | public function buildRow(EntityInterface $entity) { 26 | $row['label'] = $entity->label(); 27 | $row['id'] = $entity->id(); 28 | return $row + parent::buildRow($entity); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /modules/order/src/Plugin/Commerce/Condition/OrderType.php: -------------------------------------------------------------------------------- 1 | 13 |
14 | {{ form|without('advanced', 'actions') }} 15 |
16 |
17 | {{ form.advanced }} 18 |
19 | 22 | 23 | -------------------------------------------------------------------------------- /modules/order/templates/commerce-order-item.html.twig: -------------------------------------------------------------------------------- 1 | {# 2 | /** 3 | * @file 4 | * 5 | * Default template for commerce order items. 6 | * 7 | * Available variables: 8 | * - attributes: HTML attributes for the wrapper. 9 | * - order_item: The rendered oreder item fields. 10 | * Use 'order_item' to print them all, or print a subset such as 11 | * 'order_item.title'. Use the following code to exclude the 12 | * printing of a given field: 13 | * @code 14 | * {{ order_item|without('title') }} 15 | * @endcode 16 | * - commerce_order_item_entity: The order item entity. 17 | * 18 | * To get some value from product use {{ order_item_entity.getPurchasedEntity.getProduct.something }}. 19 | * 20 | * @ingroup themeable 21 | */ 22 | #} 23 | 24 | {{- order_item -}} 25 | 26 | -------------------------------------------------------------------------------- /modules/order/templates/commerce-order-receipt--entity-print.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'commerce-order-receipt.html.twig' %} 2 | -------------------------------------------------------------------------------- /modules/order/templates/commerce-order.html.twig: -------------------------------------------------------------------------------- 1 | {# 2 | /** 3 | * @file 4 | * Default order template. 5 | * 6 | * Available variables: 7 | * - attributes: HTML attributes for the wrapper. 8 | * - order: The rendered order fields. 9 | * Use 'order' to print them all, or print a subset such as 10 | * 'order.order_number'. Use the following code to exclude the 11 | * printing of a given field: 12 | * @code 13 | * {{ order|without('order_number') }} 14 | * @endcode 15 | * - order_entity: The order entity. 16 | * 17 | * @ingroup themeable 18 | */ 19 | #} 20 | 21 | {{ order }} 22 | 23 | -------------------------------------------------------------------------------- /modules/order/tests/modules/commerce_order_entity_print_test/commerce_order_entity_print_test.info.yml: -------------------------------------------------------------------------------- 1 | name: commerce_order_entity_print_test 2 | type: module 3 | core_version_requirement: ^8.8 || ^9 4 | package: Testing 5 | dependencies: 6 | - commerce:commerce_order 7 | - commerce:commerce_product 8 | - entity_print:entity_print 9 | -------------------------------------------------------------------------------- /modules/order/tests/modules/commerce_order_entity_print_test/commerce_order_entity_print_test.module: -------------------------------------------------------------------------------- 1 | [ 14 | 'base hook' => 'commerce_order_receipt', 15 | ], 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /modules/order/tests/modules/commerce_order_entity_print_test/templates/commerce-order-receipt--entity-print.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'commerce-order-receipt.html.twig' %} 2 | 3 | {% block additional_information %} 4 | {{ 'Thank you for your order! Printed with entity_print!'|t }} 5 | {% endblock %} 6 | -------------------------------------------------------------------------------- /modules/order/tests/modules/commerce_order_test/commerce_order_test.commerce_adjustment_types.yml: -------------------------------------------------------------------------------- 1 | test_adjustment_type: 2 | label: 'Test' 3 | singular_label: 'test' 4 | plural_label: 'tests' 5 | has_ui: false 6 | weight: -1 7 | -------------------------------------------------------------------------------- /modules/order/tests/modules/commerce_order_test/commerce_order_test.info.yml: -------------------------------------------------------------------------------- 1 | name: Commerce Order Test 2 | type: module 3 | description: Contains various non-specific things needed in order tests. 4 | package: Testing 5 | core_version_requirement: ^8.8 || ^9 6 | dependencies: 7 | - commerce:commerce_order 8 | - commerce:commerce_product 9 | -------------------------------------------------------------------------------- /modules/order/tests/modules/commerce_order_test/commerce_order_test.module: -------------------------------------------------------------------------------- 1 | getFormObject()->getEntity(); 18 | // This will error if getAdjustments() returns invalid items. 19 | $order->recalculateTotalPrice(); 20 | \Drupal::state()->set("commerce_order_test_field_widget_form_alter", $order->getAdjustments()); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /modules/order/tests/modules/commerce_order_test/commerce_order_test.routing.yml: -------------------------------------------------------------------------------- 1 | commerce_order_test.customer_profile_test_form: 2 | path: '/commerce_order_test/customer_profile_test_form/{profile}/{admin}' 3 | defaults: 4 | _form: '\Drupal\commerce_order_test\Form\CustomerProfileTestForm' 5 | _title: 'Customer profile test form' 6 | profile: NULL 7 | admin: FALSE 8 | options: 9 | parameters: 10 | profile: 11 | type: 'entity:profile' 12 | requirements: 13 | _access: 'TRUE' 14 | -------------------------------------------------------------------------------- /modules/order/tests/modules/commerce_order_test/commerce_order_test.services.yml: -------------------------------------------------------------------------------- 1 | services: 2 | commerce_order_test.order_paid_subscriber: 3 | class: Drupal\commerce_order_test\EventSubscriber\OrderPaidSubscriber 4 | tags: 5 | - { name: event_subscriber } 6 | 7 | commerce_order_test.test_availability_checker: 8 | class: Drupal\commerce_order_test\TestAvailabilityChecker 9 | tags: 10 | - { name: commerce_order.availability_checker } 11 | 12 | commerce_order_test.test_adjustment_processor: 13 | class: Drupal\commerce_order_test\TestAdjustmentProcessor 14 | tags: 15 | - { name: commerce_order.order_processor, priority: 500, adjustment_type: test_adjustment_type } 16 | -------------------------------------------------------------------------------- /modules/order/tests/modules/commerce_order_test/commerce_order_test.workflows.yml: -------------------------------------------------------------------------------- 1 | test_workflow: 2 | id: test_workflow 3 | group: commerce_order 4 | label: 'Test workflow' 5 | states: 6 | draft: 7 | label: Draft 8 | completed: 9 | label: Completed 10 | canceled: 11 | label: Canceled 12 | transitions: 13 | place: 14 | label: 'Place order' 15 | from: [draft] 16 | to: completed 17 | cancel: 18 | label: 'Cancel order' 19 | from: [draft] 20 | to: canceled 21 | -------------------------------------------------------------------------------- /modules/order/tests/src/Kernel/ChainOrderTypeResolverTest.php: -------------------------------------------------------------------------------- 1 | 'test', 20 | ]); 21 | $order_item->save(); 22 | 23 | $resolver = $this->container->get('commerce_order.chain_order_type_resolver'); 24 | $order_type = $resolver->resolve($order_item); 25 | $this->assertEquals('default', $order_type); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /modules/payment/commerce_payment.info.yml: -------------------------------------------------------------------------------- 1 | name: Commerce Payment 2 | type: module 3 | description: 'Provides payment functionality.' 4 | package: Commerce 5 | core_version_requirement: ^8.8 || ^9 6 | configure: commerce_payment.configuration 7 | dependencies: 8 | - commerce:commerce 9 | - commerce:commerce_order 10 | - entity_reference_revisions:entity_reference_revisions 11 | - drupal:filter 12 | -------------------------------------------------------------------------------- /modules/payment/commerce_payment.libraries.yml: -------------------------------------------------------------------------------- 1 | payment_method_form: 2 | version: VERSION 3 | css: 4 | theme: 5 | css/commerce_payment.payment_method_form.css: {} 6 | 7 | payment_method_icons: 8 | version: VERSION 9 | css: 10 | theme: 11 | css/commerce_payment.payment_method_icons.css: {} 12 | 13 | offsite_redirect: 14 | version: VERSION 15 | js: 16 | js/offsite-redirect.js: {} 17 | dependencies: 18 | - core/jquery 19 | - core/drupal 20 | - core/drupalSettings 21 | -------------------------------------------------------------------------------- /modules/payment/commerce_payment.links.action.yml: -------------------------------------------------------------------------------- 1 | entity.commerce_payment.add_form: 2 | route_name: entity.commerce_payment.add_form 3 | title: 'Add payment' 4 | appears_on: 5 | - entity.commerce_payment.collection 6 | 7 | entity.commerce_payment_gateway.add_form: 8 | route_name: entity.commerce_payment_gateway.add_form 9 | title: 'Add payment gateway' 10 | appears_on: 11 | - entity.commerce_payment_gateway.collection 12 | 13 | entity.commerce_payment_method.add_form: 14 | route_name: entity.commerce_payment_method.add_form 15 | title: 'Add payment method' 16 | appears_on: 17 | - entity.commerce_payment_method.collection 18 | -------------------------------------------------------------------------------- /modules/payment/commerce_payment.links.menu.yml: -------------------------------------------------------------------------------- 1 | commerce_payment.configuration: 2 | title: 'Payment' 3 | route_name: 'commerce_payment.configuration' 4 | parent: 'commerce.configuration' 5 | weight: -10 6 | 7 | entity.commerce_payment_gateway.collection: 8 | title: 'Payment gateways' 9 | route_name: 'entity.commerce_payment_gateway.collection' 10 | parent: 'commerce_payment.configuration' 11 | description: 'Configure the gateways you take payment through.' 12 | -------------------------------------------------------------------------------- /modules/payment/commerce_payment.links.task.yml: -------------------------------------------------------------------------------- 1 | entity.commerce_payment.collection: 2 | route_name: entity.commerce_payment.collection 3 | base_route: entity.commerce_order.canonical 4 | title: Payments 5 | weight: 15 6 | 7 | entity.commerce_payment_method.collection: 8 | route_name: entity.commerce_payment_method.collection 9 | base_route: entity.user.canonical 10 | title: Payment methods 11 | -------------------------------------------------------------------------------- /modules/payment/commerce_payment.permissions.yml: -------------------------------------------------------------------------------- 1 | administer commerce_payment_gateway: 2 | title: 'Administer payment gateways' 3 | 'restrict access': TRUE 4 | 5 | administer commerce_payment: 6 | title: 'Administer payments' 7 | 'restrict access': TRUE 8 | 9 | administer commerce_payment_method: 10 | title: 'Administer payment methods' 11 | 'restrict access': TRUE 12 | 13 | manage own commerce_payment_method: 14 | title: 'Manage own payment methods' 15 | -------------------------------------------------------------------------------- /modules/payment/commerce_payment.plugin_type.yml: -------------------------------------------------------------------------------- 1 | commerce_payment.payment_gateway: 2 | label: Commerce payment gateway 3 | provider: commerce_payment 4 | plugin_manager_service_id: plugin.manager.commerce_payment_gateway 5 | plugin_definition_decorator_class: Drupal\plugin\PluginDefinition\ArrayPluginDefinitionDecorator 6 | 7 | commerce_payment.payment_method_type: 8 | label: Commerce payment method type 9 | provider: commerce_payment 10 | plugin_manager_service_id: plugin.manager.commerce_payment_method_type 11 | plugin_definition_decorator_class: Drupal\plugin\PluginDefinition\ArrayPluginDefinitionDecorator 12 | 13 | commerce_payment.payment_type: 14 | label: Commerce payment type 15 | provider: commerce_payment 16 | plugin_manager_service_id: plugin.manager.commerce_payment_type 17 | plugin_definition_decorator_class: Drupal\plugin\PluginDefinition\ArrayPluginDefinitionDecorator 18 | -------------------------------------------------------------------------------- /modules/payment/commerce_payment.workflow_groups.yml: -------------------------------------------------------------------------------- 1 | commerce_payment: 2 | label: Payment 3 | entity_type: commerce_payment 4 | -------------------------------------------------------------------------------- /modules/payment/config/install/field.field.user.user.commerce_remote_id.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | enforced: 5 | module: 6 | - commerce_payment 7 | config: 8 | - field.storage.user.commerce_remote_id 9 | module: 10 | - commerce 11 | - user 12 | id: user.user.commerce_remote_id 13 | field_name: commerce_remote_id 14 | entity_type: user 15 | bundle: user 16 | label: 'Remote ID' 17 | description: '' 18 | required: false 19 | translatable: false 20 | default_value: { } 21 | default_value_callback: '' 22 | settings: { } 23 | field_type: commerce_remote_id 24 | -------------------------------------------------------------------------------- /modules/payment/config/install/field.storage.user.commerce_remote_id.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | enforced: 5 | module: 6 | - commerce_payment 7 | module: 8 | - commerce 9 | - user 10 | id: user.commerce_remote_id 11 | field_name: commerce_remote_id 12 | entity_type: user 13 | type: commerce_remote_id 14 | settings: { } 15 | module: commerce 16 | locked: true 17 | cardinality: -1 18 | translatable: false 19 | indexes: { } 20 | persist_with_no_fields: false 21 | custom_storage: false 22 | -------------------------------------------------------------------------------- /modules/payment/css/commerce_payment.payment_method_form.css: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * Styles for the payment method form. 4 | */ 5 | 6 | .credit-card-form__expiration { 7 | display: flex; 8 | } 9 | .credit-card-form__expiration .form-item { 10 | display: inline-block; 11 | margin-bottom: 0; 12 | margin-top: 0; 13 | vertical-align: middle; 14 | } 15 | .credit-card-form__divider { 16 | display: inline-block; 17 | margin: 1.6em 0.5em 0 0.5em; 18 | } 19 | -------------------------------------------------------------------------------- /modules/payment/js/offsite-redirect.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * Defines behaviors for the payment redirect form. 4 | */ 5 | (function ($, Drupal, drupalSettings) { 6 | 7 | 'use strict'; 8 | 9 | /** 10 | * Attaches the commercePaymentRedirect behavior. 11 | * 12 | * @type {Drupal~behavior} 13 | * 14 | * @prop {Drupal~behaviorAttach} attach 15 | * Attaches the commercePaymentRedirect behavior. 16 | */ 17 | Drupal.behaviors.commercePaymentRedirect = { 18 | attach: function (context) { 19 | $('.payment-redirect-form', context).submit(); 20 | } 21 | }; 22 | 23 | })(jQuery, Drupal, drupalSettings); 24 | -------------------------------------------------------------------------------- /modules/payment/src/Annotation/CommercePaymentType.php: -------------------------------------------------------------------------------- 1 | pluginDefinition['label']; 17 | } 18 | 19 | /** 20 | * {@inheritdoc} 21 | */ 22 | public function getCreateLabel() { 23 | return $this->pluginDefinition['create_label']; 24 | } 25 | 26 | /** 27 | * {@inheritdoc} 28 | */ 29 | public function buildFieldDefinitions() { 30 | return []; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /modules/payment/src/Plugin/Commerce/PaymentType/PaymentDefault.php: -------------------------------------------------------------------------------- 1 | pluginDefinition['label']; 17 | } 18 | 19 | /** 20 | * {@inheritdoc} 21 | */ 22 | public function getWorkflowId() { 23 | return $this->pluginDefinition['workflow']; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /modules/payment/src/Plugin/Commerce/PaymentType/PaymentTypeInterface.php: -------------------------------------------------------------------------------- 1 | hasDefinition('physical.number_formatter')) { 19 | $container->getDefinition('physical.number_formatter') 20 | ->setClass(PhysicalNumberFormatter::class) 21 | ->setArguments([new Reference('commerce_price.number_format_repository'), new Reference('commerce.current_locale')]); 22 | } 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /modules/price/src/CurrencyListBuilder.php: -------------------------------------------------------------------------------- 1 | $this->t('Name'), 19 | 'currencyCode' => $this->t('Currency code'), 20 | ]; 21 | 22 | return $header + parent::buildHeader(); 23 | } 24 | 25 | /** 26 | * {@inheritdoc} 27 | */ 28 | public function buildRow(EntityInterface $entity) { 29 | $row = [ 30 | 'name' => $entity->label(), 31 | 'currencyCode' => $entity->id(), 32 | ]; 33 | 34 | return $row + parent::buildRow($entity); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /modules/price/src/Event/PriceEvents.php: -------------------------------------------------------------------------------- 1 | [ 14 | 'template' => 'commerce-price-test-price-filter', 15 | 'variables' => [ 16 | 'price' => NULL, 17 | 'options' => [], 18 | ], 19 | ], 20 | ]; 21 | } 22 | -------------------------------------------------------------------------------- /modules/price/tests/modules/commerce_price_test/commerce_price_test.routing.yml: -------------------------------------------------------------------------------- 1 | commerce_price_test.number_test_form: 2 | path: '/commerce_price_test/number_test_form' 3 | defaults: 4 | _form: '\Drupal\commerce_price_test\Form\NumberTestForm' 5 | _title: 'Number test form' 6 | requirements: 7 | _access: 'TRUE' 8 | 9 | commerce_price_test.price_test_form: 10 | path: '/commerce_price_test/price_test_form' 11 | defaults: 12 | _form: '\Drupal\commerce_price_test\Form\PriceTestForm' 13 | _title: 'Price test form' 14 | requirements: 15 | _access: 'TRUE' 16 | 17 | commerce_price_test.ajax_price_test_form: 18 | path: '/commerce_price_test/ajax_price_test_form' 19 | defaults: 20 | _form: '\Drupal\commerce_price_test\Form\AjaxPriceTestForm' 21 | _title: 'AJAX price test form' 22 | requirements: 23 | _access: 'TRUE' 24 | -------------------------------------------------------------------------------- /modules/price/tests/modules/commerce_price_test/commerce_price_test.services.yml: -------------------------------------------------------------------------------- 1 | services: 2 | commerce_test.test_price_resolver: 3 | class: Drupal\commerce_price_test\TestPriceResolver 4 | tags: 5 | - { name: commerce_price.price_resolver, priority: 100 } 6 | commerce_test.price_number_normalizer: 7 | class: Drupal\commerce_price_test\Normalizer\PriceNumberNormalizer 8 | tags: 9 | # The priority must be higher than serialization.normalizer.primitive_data. 10 | - { name: normalizer , priority: 1000 } 11 | -------------------------------------------------------------------------------- /modules/price/tests/modules/commerce_price_test/templates/commerce-price-test-price-filter.html.twig: -------------------------------------------------------------------------------- 1 | {{ price|commerce_price_format(options)|default('N/A') }} 2 | -------------------------------------------------------------------------------- /modules/product/commerce_product.info.yml: -------------------------------------------------------------------------------- 1 | name: Commerce Product 2 | type: module 3 | description: 'Defines the Product entity and associated features.' 4 | package: Commerce 5 | core_version_requirement: ^8.8 || ^9 6 | configure: commerce_product.configuration 7 | dependencies: 8 | - commerce:commerce 9 | - commerce:commerce_price 10 | - commerce:commerce_store 11 | - drupal:path 12 | - drupal:text 13 | -------------------------------------------------------------------------------- /modules/product/commerce_product.libraries.yml: -------------------------------------------------------------------------------- 1 | form: 2 | version: VERSION 3 | css: 4 | theme: 5 | css/product.form.css: {} 6 | 7 | rendered-attributes: 8 | version: VERSION 9 | css: 10 | theme: 11 | css/commerce_product.rendered-attributes.css: {} 12 | -------------------------------------------------------------------------------- /modules/product/commerce_product.links.task.yml: -------------------------------------------------------------------------------- 1 | entity.commerce_product_variation.collection: 2 | route_name: entity.commerce_product_variation.collection 3 | base_route: entity.commerce_product.canonical 4 | title: Variations 5 | weight: 15 6 | -------------------------------------------------------------------------------- /modules/product/commerce_product.permissions.yml: -------------------------------------------------------------------------------- 1 | 'administer commerce_product_type': 2 | title: 'Administer product types' 3 | description: 'Maintain the types of products available and the fields that are associated with those types.' 4 | 'restrict access': TRUE 5 | -------------------------------------------------------------------------------- /modules/product/commerce_product.routing.yml: -------------------------------------------------------------------------------- 1 | commerce_product.configuration: 2 | path: '/admin/commerce/config/products' 3 | defaults: 4 | _controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage' 5 | _title: 'Products' 6 | requirements: 7 | _permission: 'access commerce administration pages' 8 | -------------------------------------------------------------------------------- /modules/product/config/install/commerce_product.commerce_product_type.default.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: { } 4 | id: default 5 | label: Default 6 | description: '' 7 | variationType: default 8 | multipleVariations: true 9 | injectVariationFields: true 10 | traits: { } 11 | locked: false 12 | -------------------------------------------------------------------------------- /modules/product/config/install/commerce_product.commerce_product_variation_type.default.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: { } 4 | id: default 5 | label: Default 6 | orderItemType: default 7 | generateTitle: true 8 | traits: { } 9 | locked: false 10 | -------------------------------------------------------------------------------- /modules/product/config/install/field.field.commerce_product.default.body.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | config: 5 | - commerce_product.commerce_product_type.default 6 | - field.storage.commerce_product.body 7 | module: 8 | - text 9 | id: commerce_product.default.body 10 | field_name: body 11 | entity_type: commerce_product 12 | bundle: default 13 | label: Body 14 | description: '' 15 | required: false 16 | translatable: true 17 | default_value: { } 18 | default_value_callback: '' 19 | settings: 20 | display_summary: false 21 | required_summary: false 22 | field_type: text_with_summary 23 | -------------------------------------------------------------------------------- /modules/product/config/install/field.storage.commerce_product.body.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | module: 5 | - commerce_product 6 | - text 7 | id: commerce_product.body 8 | field_name: body 9 | entity_type: commerce_product 10 | type: text_with_summary 11 | settings: { } 12 | module: text 13 | locked: false 14 | cardinality: 1 15 | translatable: true 16 | indexes: { } 17 | persist_with_no_fields: false 18 | custom_storage: false 19 | -------------------------------------------------------------------------------- /modules/product/config/install/system.action.commerce_product_delete_action.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | enforced: 5 | module: 6 | - commerce_product 7 | module: 8 | - commerce_product 9 | - entity 10 | id: commerce_product_delete_action 11 | label: 'Delete product' 12 | type: commerce_product 13 | plugin: 'entity_delete_action:commerce_product' 14 | configuration: { } 15 | -------------------------------------------------------------------------------- /modules/product/config/install/system.action.commerce_publish_product.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | module: 5 | - commerce_product 6 | id: commerce_publish_product 7 | label: 'Publish product' 8 | type: commerce_product 9 | plugin: commerce_publish_product 10 | configuration: { } 11 | -------------------------------------------------------------------------------- /modules/product/config/install/system.action.commerce_unpublish_product.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | module: 5 | - commerce_product 6 | id: commerce_unpublish_product 7 | label: 'Unpublish product' 8 | type: commerce_product 9 | plugin: commerce_unpublish_product 10 | configuration: { } 11 | -------------------------------------------------------------------------------- /modules/product/config/optional/commerce_order.commerce_order_item_type.default.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | enforced: 5 | module: 6 | - commerce_product 7 | label: 'Default' 8 | id: default 9 | purchasableEntityType: commerce_product_variation 10 | orderType: default 11 | traits: { } 12 | locked: false 13 | -------------------------------------------------------------------------------- /modules/product/config/optional/core.entity_form_display.commerce_order_item.default.add_to_cart.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | config: 5 | - commerce_order.commerce_order_item_type.default 6 | - core.entity_form_mode.commerce_order_item.add_to_cart 7 | enforced: 8 | module: 9 | - commerce_cart 10 | - commerce_product 11 | module: 12 | - commerce_product 13 | id: commerce_order_item.default.add_to_cart 14 | targetEntityType: commerce_order_item 15 | bundle: default 16 | mode: add_to_cart 17 | content: 18 | purchased_entity: 19 | type: commerce_product_variation_attributes 20 | weight: 0 21 | settings: { } 22 | third_party_settings: { } 23 | region: content 24 | hidden: 25 | created: true 26 | quantity: true 27 | status: true 28 | uid: true 29 | unit_price: true 30 | -------------------------------------------------------------------------------- /modules/product/config/optional/core.entity_view_mode.commerce_product_variation.cart.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | enforced: 5 | module: 6 | - commerce_cart 7 | - commerce_product 8 | module: 9 | - commerce_product 10 | id: commerce_product_variation.cart 11 | label: Cart 12 | targetEntityType: commerce_product_variation 13 | cache: true 14 | -------------------------------------------------------------------------------- /modules/product/css/commerce_product.rendered-attributes.css: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * Styles for the rendered product attributes element. 4 | */ 5 | 6 | .product--rendered-attribute .form-item { 7 | display: inline-block; 8 | vertical-align: middle; 9 | margin: 2px; 10 | } 11 | .product--rendered-attribute label.option { 12 | display: inline-block; 13 | } 14 | .product--rendered-attribute .form-radio { 15 | display: none; 16 | } 17 | .product--rendered-attribute__selected ~ label.option { 18 | border: 1px solid; 19 | } 20 | -------------------------------------------------------------------------------- /modules/product/src/ConfigTranslation/ProductAttributeMapper.php: -------------------------------------------------------------------------------- 1 | setDefault('_form', '\Drupal\commerce_product\Form\ProductAttributeTranslationAddForm'); 18 | return $route; 19 | } 20 | 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getEditRoute() { 25 | $route = parent::getEditRoute(); 26 | $route->setDefault('_form', '\Drupal\commerce_product\Form\ProductAttributeTranslationEditForm'); 27 | return $route; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /modules/product/src/Entity/ProductAttributeInterface.php: -------------------------------------------------------------------------------- 1 | t('Deleting a product attribute will delete all of its values. This action cannot be undone.'); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /modules/product/src/Plugin/Validation/Constraint/ProductVariationSkuConstraint.php: -------------------------------------------------------------------------------- 1 | getEntity($row)->toUrl('canonical')->setAbsolute($this->options['absolute']); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /modules/product/src/ProductAttributeListBuilder.php: -------------------------------------------------------------------------------- 1 | t('Attribute name'); 18 | return $header + parent::buildHeader(); 19 | } 20 | 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function buildRow(EntityInterface $entity) { 25 | $row['label'] = $entity->label(); 26 | return $row + parent::buildRow($entity); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /modules/product/src/ProductAttributeValueStorage.php: -------------------------------------------------------------------------------- 1 | getQuery(); 17 | $entity_query->condition('attribute', $attribute_id); 18 | $entity_query->sort('weight'); 19 | $entity_query->sort('name'); 20 | $result = $entity_query->execute(); 21 | return $result ? $this->loadMultiple($result) : []; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /modules/product/src/ProductAttributeValueStorageInterface.php: -------------------------------------------------------------------------------- 1 | t('Product variation type'); 18 | $header['type'] = $this->t('Machine name'); 19 | return $header + parent::buildHeader(); 20 | } 21 | 22 | /** 23 | * {@inheritdoc} 24 | */ 25 | public function buildRow(EntityInterface $entity) { 26 | $row = []; 27 | $row['name'] = $entity->label(); 28 | $row['type'] = $entity->id(); 29 | 30 | return $row + parent::buildRow($entity); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /modules/product/templates/commerce-product-attribute-value.html.twig: -------------------------------------------------------------------------------- 1 | {# 2 | /** 3 | * @file 4 | * 5 | * Default template for product attribute values. 6 | * 7 | * Available variables: 8 | * - attributes: HTML attributes for the wrapper. 9 | * - product_attribute_value: The rendered product attribute value fields. 10 | * Use 'product_attribute_value' to print them all, or print a subset such as 11 | * 'product_attribute_value.name'. Use the following code to exclude the 12 | * printing of a given field: 13 | * @code 14 | * {{ product_attribute_value|without('name') }} 15 | * @endcode 16 | * - product_attribute_value_entity: The product attribute value entity. 17 | * 18 | * @ingroup themeable 19 | */ 20 | #} 21 | 22 | {{- product_attribute_value -}} 23 | 24 | -------------------------------------------------------------------------------- /modules/product/templates/commerce-product-form.html.twig: -------------------------------------------------------------------------------- 1 | {# 2 | /** 3 | * @file 4 | * Two column template for the product add/edit form. 5 | * 6 | * Available variables: 7 | * - form: The form. 8 | * 9 | * @ingroup themeable 10 | */ 11 | #} 12 |
13 |
14 | {{ form|without('advanced', 'footer', 'actions') }} 15 |
16 |
17 | {{ form.advanced }} 18 |
19 | 25 |
26 | -------------------------------------------------------------------------------- /modules/product/templates/commerce-product-variation.html.twig: -------------------------------------------------------------------------------- 1 | {# 2 | /** 3 | * @file 4 | * 5 | * Default template for product variations. 6 | * 7 | * Available variables: 8 | * - attributes: HTML attributes for the wrapper. 9 | * - product_variation: The rendered product variation fields. 10 | * Use 'product_variation' to print them all, or print a subset such as 11 | * 'product_variation.title'. Use the following code to exclude the 12 | * printing of a given field: 13 | * @code 14 | * {{ product_variation|without('title') }} 15 | * @endcode 16 | * - product_variation_entity: The product variation entity. 17 | * - product_url: The product URL. 18 | * 19 | * @ingroup themeable 20 | */ 21 | #} 22 | 23 | {{- product_variation -}} 24 | 25 | -------------------------------------------------------------------------------- /modules/product/templates/commerce-product.html.twig: -------------------------------------------------------------------------------- 1 | {# 2 | /** 3 | * @file 4 | * 5 | * Default product template. 6 | * 7 | * Available variables: 8 | * - attributes: HTML attributes for the wrapper. 9 | * - product: The rendered product fields. 10 | * Use 'product' to print them all, or print a subset such as 11 | * 'product.title'. Use the following code to exclude the 12 | * printing of a given field: 13 | * @code 14 | * {{ product|without('title') }} 15 | * @endcode 16 | * - product_entity: The product entity. 17 | * - product_url: The product URL. 18 | * 19 | * @ingroup themeable 20 | */ 21 | #} 22 | 23 | {{- product|without('variation_attributes') -}} 24 | 25 | -------------------------------------------------------------------------------- /modules/product/tests/modules/commerce_product_test/commerce_product_test.info.yml: -------------------------------------------------------------------------------- 1 | name: Commerce Product Test 2 | type: module 3 | description: 'Test module for Commerce Product.' 4 | package: Testing 5 | core_version_requirement: ^8.8 || ^9 6 | dependencies: 7 | - commerce:commerce_product 8 | -------------------------------------------------------------------------------- /modules/product/tests/modules/commerce_product_test/commerce_product_test.services.yml: -------------------------------------------------------------------------------- 1 | services: 2 | commerce_product_test.default_variation_subscriber: 3 | class: Drupal\commerce_product_test\EventSubscriber\DefaultVariationSubscriber 4 | tags: 5 | - { name: event_subscriber } 6 | -------------------------------------------------------------------------------- /modules/promotion/commerce_promotion.info.yml: -------------------------------------------------------------------------------- 1 | name: Commerce Promotion 2 | type: module 3 | description: 'Provides a UI for managing promotions.' 4 | package: Commerce 5 | core_version_requirement: ^8.8 || ^9 6 | configure: entity.commerce_promotion.collection 7 | dependencies: 8 | - commerce:commerce 9 | - commerce:commerce_order 10 | - drupal:options 11 | -------------------------------------------------------------------------------- /modules/promotion/commerce_promotion.libraries.yml: -------------------------------------------------------------------------------- 1 | form: 2 | version: VERSION 3 | css: 4 | theme: 5 | css/promotion.form.css: {} 6 | 7 | coupon_redemption_form: 8 | version: VERSION 9 | js: 10 | js/commerce_promotion.coupon_redemption_form.js: {} 11 | dependencies: 12 | - core/jquery 13 | - core/drupal 14 | -------------------------------------------------------------------------------- /modules/promotion/commerce_promotion.links.action.yml: -------------------------------------------------------------------------------- 1 | entity.commerce_promotion.add_form: 2 | route_name: entity.commerce_promotion.add_form 3 | title: 'Add promotion' 4 | appears_on: 5 | - entity.commerce_promotion.collection 6 | 7 | entity.commerce_promotion_coupon.add_form: 8 | route_name: entity.commerce_promotion_coupon.add_form 9 | title: 'Add coupon' 10 | appears_on: 11 | - entity.commerce_promotion_coupon.collection 12 | 13 | entity.commerce_promotion_coupon.generate_form: 14 | route_name: entity.commerce_promotion_coupon.generate_form 15 | title: 'Generate coupons' 16 | appears_on: 17 | - entity.commerce_promotion_coupon.collection 18 | -------------------------------------------------------------------------------- /modules/promotion/commerce_promotion.links.menu.yml: -------------------------------------------------------------------------------- 1 | entity.commerce_promotion.collection: 2 | title: 'Promotions' 3 | route_name: 'entity.commerce_promotion.collection' 4 | parent: 'commerce.admin_commerce' 5 | description: 'Manage your promotions.' 6 | -------------------------------------------------------------------------------- /modules/promotion/commerce_promotion.links.task.yml: -------------------------------------------------------------------------------- 1 | entity.commerce_promotion_coupon.collection: 2 | route_name: entity.commerce_promotion_coupon.collection 3 | base_route: entity.commerce_promotion.edit_form 4 | title: Coupons 5 | -------------------------------------------------------------------------------- /modules/promotion/commerce_promotion.permissions.yml: -------------------------------------------------------------------------------- 1 | bulk generate commerce_promotion_coupon: 2 | title: 'Bulk generate coupons' 3 | -------------------------------------------------------------------------------- /modules/promotion/commerce_promotion.plugin_type.yml: -------------------------------------------------------------------------------- 1 | commerce_promotion.promotion_offer: 2 | label: Commerce promotion offer 3 | provider: commerce_promotion 4 | plugin_manager_service_id: plugin.manager.commerce_promotion_offer 5 | plugin_definition_decorator_class: Drupal\plugin\PluginDefinition\ArrayPluginDefinitionDecorator 6 | -------------------------------------------------------------------------------- /modules/promotion/commerce_promotion.routing.yml: -------------------------------------------------------------------------------- 1 | entity.commerce_promotion_coupon.collection: 2 | path: '/promotion/{commerce_promotion}/coupons' 3 | defaults: 4 | _entity_list: 'commerce_promotion_coupon' 5 | _title: 'Coupons' 6 | options: 7 | _admin_route: TRUE 8 | parameters: 9 | commerce_promotion: 10 | type: 'entity:commerce_promotion' 11 | requirements: 12 | _entity_access: 'commerce_promotion.update' 13 | 14 | entity.commerce_promotion_coupon.generate_form: 15 | path: '/promotion/{commerce_promotion}/coupons/generate' 16 | defaults: 17 | _form: '\Drupal\commerce_promotion\Form\CouponGenerateForm' 18 | _title: 'Generate coupons' 19 | options: 20 | _admin_route: TRUE 21 | parameters: 22 | commerce_promotion: 23 | type: 'entity:commerce_promotion' 24 | requirements: 25 | _permission: 'bulk generate commerce_promotion_coupon' 26 | -------------------------------------------------------------------------------- /modules/promotion/commerce_promotion.views.inc: -------------------------------------------------------------------------------- 1 | t('Coupon redemption'), 14 | 'help' => t('Displays a coupon redemption pane, requires an Order ID argument.'), 15 | 'area' => [ 16 | 'id' => 'commerce_coupon_redemption', 17 | ], 18 | ]; 19 | return $data; 20 | } 21 | -------------------------------------------------------------------------------- /modules/promotion/config/schema/commerce_promotion.schema.yml: -------------------------------------------------------------------------------- 1 | commerce_checkout.commerce_checkout_pane.coupon_redemption: 2 | type: commerce_checkout_pane_configuration 3 | mapping: 4 | allow_multiple: 5 | type: boolean 6 | label: 'Allow multiple coupons' 7 | 8 | views.area.commerce_coupon_redemption: 9 | type: views_area 10 | label: 'Coupon redemption' 11 | mapping: 12 | allow_multiple: 13 | type: boolean 14 | label: 'Allow multiple coupons to be redeemed' 15 | -------------------------------------------------------------------------------- /modules/promotion/src/CouponStorage.php: -------------------------------------------------------------------------------- 1 | loadByProperties(['code' => $code, 'status' => TRUE]); 18 | return reset($coupons); 19 | } 20 | 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function loadMultipleByPromotion(PromotionInterface $promotion) { 25 | return $this->loadByProperties(['promotion_id' => $promotion->id()]); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /modules/promotion/src/Form/CouponForm.php: -------------------------------------------------------------------------------- 1 | entity->isNew()) { 15 | $promotion = $this->getRouteMatch()->getParameter('commerce_promotion'); 16 | $this->entity->set('promotion_id', $promotion); 17 | } 18 | } 19 | 20 | /** 21 | * {@inheritdoc} 22 | */ 23 | public function save(array $form, FormStateInterface $form_state) { 24 | $this->entity->save(); 25 | $this->messenger()->addMessage($this->t('Saved the %label coupon.', ['%label' => $this->entity->label()])); 26 | $form_state->setRedirectUrl($this->entity->toUrl('collection')); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /modules/promotion/src/Plugin/Commerce/PromotionOffer/OrderPromotionOfferInterface.php: -------------------------------------------------------------------------------- 1 | 13 |
14 | {{ form|without('advanced', 'actions') }} 15 |
16 |
17 | {{ form.advanced }} 18 |
19 | 22 | 23 | -------------------------------------------------------------------------------- /modules/promotion/templates/commerce-promotion.html.twig: -------------------------------------------------------------------------------- 1 | {# 2 | /** 3 | * @file 4 | * 5 | * Default template for promotions. 6 | * 7 | * Available variables: 8 | * - attributes: HTML attributes for the wrapper. 9 | * - promotion: The rendered promotion fields. 10 | * Use 'promotion' to print them all, or print a subset such as 11 | * 'promotion.name'. Use the following code to exclude the 12 | * printing of a given field: 13 | * @code 14 | * {{ promotion|without('name') }} 15 | * @endcode 16 | * - promotion_entity: The promotion entity. 17 | * - promotion_url: The promotion URL. 18 | * 19 | * @ingroup themeable 20 | */ 21 | #} 22 | 23 | {{ promotion }} 24 | 25 | -------------------------------------------------------------------------------- /modules/promotion/tests/modules/commerce_promotion_test/commerce_promotion_test.info.yml: -------------------------------------------------------------------------------- 1 | name: Commerce Promotion Test 2 | type: module 3 | description: Provides items for testing Commerce Promotion. 4 | package: Testing 5 | core_version_requirement: ^8.8 || ^9 6 | dependencies: 7 | - commerce:commerce_cart 8 | - commerce:commerce_promotion 9 | -------------------------------------------------------------------------------- /modules/store/commerce_store.info.yml: -------------------------------------------------------------------------------- 1 | name: Commerce Store 2 | type: module 3 | description: 'Defines the Store entity and associated features.' 4 | package: Commerce 5 | core_version_requirement: ^8.8 || ^9 6 | configure: entity.commerce_store.collection 7 | dependencies: 8 | - commerce:commerce 9 | - commerce:commerce_price 10 | - drupal:options 11 | - drupal:path 12 | -------------------------------------------------------------------------------- /modules/store/commerce_store.links.action.yml: -------------------------------------------------------------------------------- 1 | entity.commerce_store.add_page: 2 | route_name: entity.commerce_store.add_page 3 | title: 'Add store' 4 | appears_on: 5 | - entity.commerce_store.collection 6 | 7 | entity.commerce_store_type.add_form: 8 | route_name: entity.commerce_store_type.add_form 9 | title: 'Add store type' 10 | appears_on: 11 | - entity.commerce_store_type.collection 12 | -------------------------------------------------------------------------------- /modules/store/commerce_store.links.menu.yml: -------------------------------------------------------------------------------- 1 | entity.commerce_store.collection: 2 | title: 'Stores' 3 | route_name: 'entity.commerce_store.collection' 4 | parent: 'commerce.store_configuration' 5 | description: 'Manage your stores.' 6 | weight: -10 7 | 8 | entity.commerce_store_type.collection: 9 | title: 'Store types' 10 | route_name: 'entity.commerce_store_type.collection' 11 | parent: 'commerce.store_configuration' 12 | description: 'Manage fields, form and display settings for your stores.' 13 | weight: -5 14 | -------------------------------------------------------------------------------- /modules/store/commerce_store.permissions.yml: -------------------------------------------------------------------------------- 1 | 'administer commerce_store_type': 2 | title: 'Administer store types' 3 | description: 'Maintain the types of stores available and the fields that are associated with those types.' 4 | 'restrict access': TRUE 5 | -------------------------------------------------------------------------------- /modules/store/config/install/commerce_store.commerce_store_type.online.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: { } 4 | id: online 5 | label: Online 6 | description: '' 7 | traits: { } 8 | locked: false 9 | -------------------------------------------------------------------------------- /modules/store/config/install/core.entity_view_display.commerce_store.online.default.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | config: 5 | - commerce_store.commerce_store_type.online 6 | module: 7 | - address 8 | id: commerce_store.online.default 9 | targetEntityType: commerce_store 10 | bundle: online 11 | mode: default 12 | content: 13 | address: 14 | type: address_default 15 | weight: 1 16 | label: above 17 | settings: { } 18 | third_party_settings: { } 19 | region: content 20 | hidden: 21 | billing_countries: true 22 | default_currency: true 23 | is_default: true 24 | mail: true 25 | name: true 26 | timezone: true 27 | uid: true 28 | -------------------------------------------------------------------------------- /modules/store/config/install/system.action.commerce_store_delete_action.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | enforced: 5 | module: 6 | - commerce_store 7 | module: 8 | - commerce_store 9 | - entity 10 | id: commerce_store_delete_action 11 | label: 'Delete store' 12 | type: commerce_store 13 | plugin: 'entity_delete_action:commerce_store' 14 | configuration: { } 15 | -------------------------------------------------------------------------------- /modules/store/config/schema/commerce_store.schema.yml: -------------------------------------------------------------------------------- 1 | commerce_store.commerce_store_type.*: 2 | type: commerce_config_entity_bundle 3 | label: 'Store type' 4 | mapping: 5 | description: 6 | type: text 7 | label: 'Description' 8 | 9 | field.formatter.settings.commerce_store_datetime: 10 | type: mapping 11 | label: 'Store date/time formatter settings' 12 | mapping: 13 | date_format: 14 | type: string 15 | label: 'Date format' 16 | 17 | views.field.commerce_store: 18 | type: views.field.field 19 | mapping: 20 | hide_single_store: 21 | type: boolean 22 | label: 'Hide if there''s only one store.' 23 | 24 | views.filter_value.commerce_store_datetime: 25 | type: views.filter_value.date 26 | 27 | views.filter.commerce_store_datetime: 28 | type: views.filter.date 29 | -------------------------------------------------------------------------------- /modules/store/console.services.yml: -------------------------------------------------------------------------------- 1 | services: 2 | commerce_store.commerce_create_store: 3 | class: Drupal\commerce_store\Command\CreateStoreCommand 4 | arguments: ['@commerce_price.currency_importer', '@entity_type.manager', '@address.country_repository', '@url_generator', '@email.validator'] 5 | tags: 6 | - { name: drupal.command } 7 | -------------------------------------------------------------------------------- /modules/store/console/translations/en/commerce.create.store.yml: -------------------------------------------------------------------------------- 1 | description: 'Create a new store.' 2 | options: 3 | name: 'The store name' 4 | mail: 'The store mail' 5 | country: 'The store country' 6 | currency: 'The store currency (optional)' 7 | arguments: {} 8 | messages: 9 | success: 'I am a new generated command.' 10 | -------------------------------------------------------------------------------- /modules/store/src/CurrentStoreInterface.php: -------------------------------------------------------------------------------- 1 | t('Store type'); 18 | $header['id'] = $this->t('Machine name'); 19 | return $header + parent::buildHeader(); 20 | } 21 | 22 | /** 23 | * {@inheritdoc} 24 | */ 25 | public function buildRow(EntityInterface $entity) { 26 | $row['label'] = $entity->label(); 27 | $row['id'] = $entity->id(); 28 | return $row + parent::buildRow($entity); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /modules/store/templates/commerce-store.html.twig: -------------------------------------------------------------------------------- 1 | {# 2 | /** 3 | * @file 4 | * 5 | * Default template for stores. 6 | * 7 | * Available variables: 8 | * - attributes: HTML attributes for the wrapper. 9 | * - store: The rendered store fields. 10 | * Use 'store' to print them all, or print a subset such as 11 | * 'store.name'. Use the following code to exclude the 12 | * printing of a given field: 13 | * @code 14 | * {{ store|without('name') }} 15 | * @endcode 16 | * - store_entity: The store entity. 17 | * - store_url: The store URL. 18 | * 19 | * @ingroup themeable 20 | */ 21 | #} 22 | 23 | {{ store }} 24 | 25 | -------------------------------------------------------------------------------- /modules/tax/commerce_tax.info.yml: -------------------------------------------------------------------------------- 1 | name: Commerce Tax 2 | type: module 3 | description: 'Provides tax functionality.' 4 | package: Commerce 5 | core_version_requirement: ^8.8 || ^9 6 | configure: entity.commerce_tax_type.collection 7 | dependencies: 8 | - commerce:commerce 9 | - commerce:commerce_price 10 | - commerce:commerce_order 11 | -------------------------------------------------------------------------------- /modules/tax/commerce_tax.libraries.yml: -------------------------------------------------------------------------------- 1 | tax_number: 2 | version: VERSION 3 | css: 4 | theme: 5 | css/commerce_tax.tax_number.css: {} 6 | -------------------------------------------------------------------------------- /modules/tax/commerce_tax.links.action.yml: -------------------------------------------------------------------------------- 1 | entity.commerce_tax_type.add_form: 2 | route_name: entity.commerce_tax_type.add_form 3 | title: 'Add tax type' 4 | appears_on: 5 | - entity.commerce_tax_type.collection 6 | -------------------------------------------------------------------------------- /modules/tax/commerce_tax.links.menu.yml: -------------------------------------------------------------------------------- 1 | entity.commerce_tax_type.collection: 2 | title: 'Tax types' 3 | route_name: 'entity.commerce_tax_type.collection' 4 | parent: 'commerce.store_configuration' 5 | description: 'Define the taxes you collect.' 6 | -------------------------------------------------------------------------------- /modules/tax/commerce_tax.permissions.yml: -------------------------------------------------------------------------------- 1 | administer commerce_tax_type: 2 | title: 'Administer tax types' 3 | 'restrict access': TRUE 4 | -------------------------------------------------------------------------------- /modules/tax/commerce_tax.plugin_type.yml: -------------------------------------------------------------------------------- 1 | commerce_tax.tax_number_type: 2 | label: Commerce tax number type 3 | provider: commerce_tax 4 | plugin_manager_service_id: plugin.manager.commerce_tax_number_type 5 | plugin_definition_decorator_class: Drupal\plugin\PluginDefinition\ArrayPluginDefinitionDecorator 6 | 7 | commerce_tax.tax_type: 8 | label: Commerce tax type 9 | provider: commerce_tax 10 | plugin_manager_service_id: plugin.manager.commerce_tax_type 11 | plugin_definition_decorator_class: Drupal\plugin\PluginDefinition\ArrayPluginDefinitionDecorator 12 | -------------------------------------------------------------------------------- /modules/tax/commerce_tax.routing.yml: -------------------------------------------------------------------------------- 1 | commerce_tax.verify: 2 | path: '/commerce_tax/verify/{tax_number}/{context}' 3 | defaults: 4 | _controller: '\Drupal\commerce_tax\Controller\TaxNumberController::verify' 5 | _title: 'Verify tax number' 6 | requirements: 7 | _access: 'TRUE' 8 | options: 9 | _admin_route: TRUE 10 | 11 | commerce_tax.verification_result: 12 | path: '/commerce_tax/verification-result/{tax_number}/{context}' 13 | defaults: 14 | _controller: '\Drupal\commerce_tax\Controller\TaxNumberController::result' 15 | _title: 'Verification result' 16 | requirements: 17 | _access: 'TRUE' 18 | options: 19 | _admin_route: TRUE 20 | -------------------------------------------------------------------------------- /modules/tax/config/install/field.field.profile.customer.tax_number.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | config: 5 | - field.storage.profile.tax_number 6 | - profile.type.customer 7 | enforced: 8 | module: 9 | - commerce_tax 10 | id: profile.customer.tax_number 11 | field_name: tax_number 12 | entity_type: profile 13 | bundle: customer 14 | label: 'Tax number' 15 | description: '' 16 | required: false 17 | translatable: false 18 | default_value: 19 | - { } 20 | default_value_callback: '' 21 | settings: 22 | countries: { } 23 | verify: true 24 | allow_unverified: true 25 | field_type: commerce_tax_number 26 | -------------------------------------------------------------------------------- /modules/tax/config/install/field.storage.profile.tax_number.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: 4 | module: 5 | - profile 6 | enforced: 7 | module: 8 | - commerce_tax 9 | id: profile.tax_number 10 | field_name: tax_number 11 | entity_type: profile 12 | type: commerce_tax_number 13 | settings: { } 14 | module: commerce_tax 15 | locked: false 16 | cardinality: 1 17 | translatable: true 18 | indexes: { } 19 | persist_with_no_fields: false 20 | custom_storage: false 21 | -------------------------------------------------------------------------------- /modules/tax/css/commerce_tax.tax_number.css: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * Styles for the tax number formatter. 4 | */ 5 | 6 | .commerce-tax-number__verification-icon { 7 | display: inline-block; 8 | width: 25px; 9 | height: 25px; 10 | vertical-align: middle; 11 | } 12 | .commerce-tax-number__verification-icon:before { 13 | display: block; 14 | width: 100%; 15 | height: 100%; 16 | content: ""; 17 | background-repeat: no-repeat; 18 | background-position: center 2px; 19 | background-size: 16px; 20 | } 21 | 22 | .commerce-tax-number__verification-icon--unknown:before { 23 | background-image: url(../icons/e29700/unknown.svg); 24 | } 25 | .commerce-tax-number__verification-icon--success:before { 26 | background-image: url(../icons/73b355/success.svg); 27 | } 28 | .commerce-tax-number__verification-icon--failure:before { 29 | background-image: url(../icons/e32700/failure.svg); 30 | } 31 | 32 | -------------------------------------------------------------------------------- /modules/tax/icons/73b355/success.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/tax/icons/e29700/unknown.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/tax/icons/e32700/failure.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /modules/tax/src/Annotation/CommerceTaxType.php: -------------------------------------------------------------------------------- 1 | getDefaultRate(); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /modules/tax/src/Resolver/TaxTypeAwareInterface.php: -------------------------------------------------------------------------------- 1 | taxType = $tax_type; 24 | return $this; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /modules/tax/src/TaxNumberTypeManagerInterface.php: -------------------------------------------------------------------------------- 1 | isLocked()) { 20 | return AccessResult::forbidden()->addCacheableDependency($entity); 21 | } 22 | else { 23 | return parent::checkAccess($entity, $operation, $account); 24 | } 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/CurrentCountryInterface.php: -------------------------------------------------------------------------------- 1 | getEntityType()->getKey('owner'); 20 | $owner = $this->get($key)->entity; 21 | // Handle deleted customers. 22 | if (!$owner) { 23 | $owner = User::getAnonymousUser(); 24 | } 25 | return $owner; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/EntityPermissionProvider.php: -------------------------------------------------------------------------------- 1 | parentEntity = $parent_entity; 24 | return $this; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/Plugin/Commerce/EntityTrait/EntityTraitBase.php: -------------------------------------------------------------------------------- 1 | pluginDefinition['label']; 17 | } 18 | 19 | /** 20 | * {@inheritdoc} 21 | */ 22 | public function getEntityTypeIds() { 23 | return $this->pluginDefinition['entity_types']; 24 | } 25 | 26 | /** 27 | * {@inheritdoc} 28 | */ 29 | public function buildFieldDefinitions() { 30 | // Entity traits are not required to provide fields. 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/Plugin/Commerce/InlineForm/EntityInlineFormInterface.php: -------------------------------------------------------------------------------- 1 | [ 14 | 'template' => 'commerce-test-entity-render', 15 | 'variables' => [ 16 | 'entity' => NULL, 17 | ], 18 | ], 19 | ]; 20 | } 21 | -------------------------------------------------------------------------------- /tests/modules/commerce_test/commerce_test.routing.yml: -------------------------------------------------------------------------------- 1 | commerce_test.redirect_form: 2 | path: '/commerce_test/redirect_form' 3 | defaults: 4 | _form: '\Drupal\commerce_test\Form\RedirectForm' 5 | _title: 'Redirect form.' 6 | requirements: 7 | _access: 'TRUE' 8 | -------------------------------------------------------------------------------- /tests/modules/commerce_test/commerce_test.services.yml: -------------------------------------------------------------------------------- 1 | services: 2 | commerce_test.referenceable_plugin_types_subscriber: 3 | class: \Drupal\commerce_test\EventSubscriber\ReferenceablePluginTypesSubscriber 4 | tags: 5 | - { name: event_subscriber } 6 | -------------------------------------------------------------------------------- /tests/modules/commerce_test/src/Form/RedirectForm.php: -------------------------------------------------------------------------------- 1 | setLabel(t('Phone')) 26 | ->setRequired(TRUE); 27 | 28 | return $fields; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /tests/modules/commerce_test/src/Plugin/Commerce/EntityTrait/Second.php: -------------------------------------------------------------------------------- 1 | setLabel(t('Phone')) 27 | ->setRequired(TRUE); 28 | 29 | return $fields; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /tests/modules/commerce_test/templates/commerce-test-entity-render.html.twig: -------------------------------------------------------------------------------- 1 | {{ entity|commerce_entity_render }} 2 | -------------------------------------------------------------------------------- /tests/modules/commerce_update_test/commerce_update_test.info.yml: -------------------------------------------------------------------------------- 1 | name: 'Commerce update test' 2 | type: module 3 | description: 'Module for testing extension updates to configuration.' 4 | package: Testing 5 | core_version_requirement: ^8.8 || ^9 6 | dependencies: 7 | - commerce:commerce_store 8 | -------------------------------------------------------------------------------- /tests/modules/commerce_update_test/config/install/commerce_store.commerce_store_type.testing.yml: -------------------------------------------------------------------------------- 1 | langcode: en 2 | status: true 3 | dependencies: { } 4 | id: testing 5 | label: Testing 6 | description: '' 7 | traits: { } 8 | locked: false 9 | -------------------------------------------------------------------------------- /tests/src/Functional/RedirectTest.php: -------------------------------------------------------------------------------- 1 | drupalGet('/commerce_test/redirect_form'); 22 | $this->assertSession()->statusCodeEquals(200); 23 | $this->assertEquals('https://www.example.org/', $this->getSession()->getCurrentUrl()); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /tests/src/Unit/UrlDataTest.php: -------------------------------------------------------------------------------- 1 | assertIsString($encoded_data); 22 | 23 | $decoded_data = UrlData::decode($encoded_data); 24 | $this->assertIsArray($decoded_data); 25 | $this->assertSame($data, $decoded_data); 26 | 27 | $invalid_data = UrlData::decode('INVALID'); 28 | $this->assertFalse($invalid_data); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /tests/themes/commerce_test_theme/commerce_test_theme.info.yml: -------------------------------------------------------------------------------- 1 | name: 'Commerce test theme' 2 | type: theme 3 | description: 'Theme for testing commerce email theming' 4 | core_version_requirement: ^8.8 || ^9 5 | base theme: stable 6 | regions: 7 | sidebar_first: 'Left sidebar' 8 | sidebar_second: 'Right sidebar' 9 | content: Content 10 | header: Header 11 | footer: Footer 12 | highlighted: Highlighted 13 | help: Help 14 | regions_hidden: 15 | - sidebar_first 16 | - sidebar_second 17 | --------------------------------------------------------------------------------