Questions tagged [commerce]

One of the modules that implements an eCommerce framework and ecosystem is the Drupal Commerce module.

Filter by
Sorted by
Tagged with
-4
votes
0answers
21 views

How to get the general conditions of sale accepted in the purchase tunnel?

How to get the general conditions of sale accepted in the purchase tunnel? The only solution I have found is to use this module, which has not been recently updated, and is incompatible with Drupal 9. ...
0
votes
1answer
16 views

Access a user entity reference in a commerce-product template file

I have a field_intervenantfield which contains a user entity reference. In the commerce-product template file, I want to access the description field of each intervenant. How can I achieve it? I tried ...
0
votes
0answers
13 views

How to get a product variant field (not attribute) value?

I have created a product variant with 1 attribute (say "Subscription Plan" or attribute_sub_plan) and 1 field (say "Number of Issues" or field_num_issues). The attribute was for ...
1
vote
1answer
28 views

How do I organize the display of product variation fields?

I have a new site with Drupal 9 and Commerce 2. I am trying to display my products with: Title Photo Price Delay Options Add to cart button Description I tested all the possible settings in manage ...
1
vote
1answer
41 views

Options for storing API keys in config files?

I'm working on a project that's using Drupal Commerce and wondering about the possible options to secure the API keys exported as configuration YAML files. We have the config directory outside of the ...
1
vote
0answers
14 views

How to delete a product type that no longer has a product variation type

I deleted "product variation type" before "product type" and now unable to delete the product type. I run into the follow error in dlog Drupal\Core\Entity\EntityStorageException: ...
1
vote
1answer
38 views

How many product types do I need?

I am in the process of creating an e-commerce site with drupal commerce 2. This site is dedicated to selling clothes for men, women and children. I created a type of clothing product I called Clothes. ...
0
votes
1answer
11 views

How to configure shipping rates based on product attributes

I am implementing Drupal Commerce 2 My use case Product such as an album release is offered as a product in different format such as LP, 7inch, CD. Each format has a different shipping cost. In other ...
0
votes
1answer
19 views

The view doesn't display products

I've edited the default product type and added a taxonomy term reference field and added some products that reference my product categories. The default taxonomy view isn't display my products, I ...
1
vote
1answer
36 views

How do I enable product revisions?

I am using Drupal commerce 2 with Drupal 9. I added few products and I need to access their revisions, but there is no revision option for products in Drupal commerce. How can I enable revisions for a ...
0
votes
0answers
14 views

Problem with a taxonomy view with Drupal Commerce products with multiple categories

Under Drupal, 9 I've set a Drupal Commerce site where the products can have different categories. For example, having a vocabulary like this: Category A Subcategory A1 Subcategory A2 Category B ...
1
vote
0answers
23 views

Display products related to a content type through a vocabulary

I have different product variations with a vocabulary (Artist) which is also used for the Artist content type. How can I use a view to show the related products which use a specific value from that ...
-4
votes
2answers
19 views

Get all orders count of a specific user programmatically

I want to get count of all the order placed by an user programmatically in Drupal 8.
0
votes
0answers
11 views

Shipping profile address type select to radios

I am trying to alter the shipping information pane. It uses a select list for the profile address I want to make it a radios type instead and when I use the form_alter to hook into the checkout pane, ...
-1
votes
1answer
22 views

Get total of all orders cost of a specific user programmatically

I want to get total cost of all the order placed by an user programmatically in Drupal 8. I used below code to get total orders count, same way need to get total cost. $query = \Drupal::...
0
votes
1answer
32 views

Display a picture from an article related to a product

This is the scenario: There are multiple products (paintings). Each one of these paintings has one author, which is defined with a content type. There is a reference field form the product to its ...
0
votes
0answers
8 views

Adding constraint to existing drupal commerce order item type field

I want to add a constraint to an already existing order item type field but the field settings say "There is data for this field in the database. The field settings can no longer be changed."...
1
vote
1answer
24 views

How do I show a product attribute in a cart?

I don't know why the item name shows "price" in the shopping cart. My product variation type have 2 fields: Certificate choice (attribute) and Course period. How can I customize my ...
1
vote
1answer
33 views

Commerce Invoice Entity Print Styling

I am using Commerce Invoice and Entity Print to generate .pdf-files of invoices. In Entity Print settings, I set the paper size to A4 and selected TCPDF as printing engine. Then, I customized commerce-...
0
votes
0answers
21 views

Exclude specific weekdays from date field

I am using a date field in the Commerce Order to pick up the product (Collection Date) Currently, there is a restriction to select dates in the past. Is there an option on the date field, somehow to ...
0
votes
1answer
22 views

Commerce custom taxtype wrong calculation

I want to add spanish recharge tax to drupal commerce. It is calculated like VAT but only for some customer in a B2B bussines, and It is a second tax, that is, you have to calculate VAT and "...
0
votes
1answer
7 views

Get all available promotions for specific commerce product

How to get all available promotions, which apply to specific product?
0
votes
0answers
32 views

How to use one of the 2 context filters in a view (with an OR)? [duplicate]

I have a view with 2 relations with the store for 2 different entities. I want to filter the view with the store id for the 2 relationships. I created 2 context filters in the views. You must use the ...
0
votes
1answer
26 views

How do I get the order_id and order_number on the checkout completed page?

I'm trying to get the order information inside the mymodule_preprocess_page hook. On the normal page I can get it via the $cart. But the $cart is not available on the checkout page anymore. How do I ...
1
vote
0answers
38 views

How to render a view in an ajax callback

I am trying to develop a custom module to ajaxify the commerce form block. I tried using dc_ajax_add_cart and ajax_add_to_cart but they were not addapted to my project. I have the following callback ...
1
vote
1answer
71 views

Trait 'Drupal\entity\Form\EntityDuplicateFormTrait' not found, while setting up existing site

I'm in the process of attempting to setup a development environment for a Drupal site that's been provided by a vendor. From what I've been told, the sites been setup and running on our UAT (Ubuntu) ...
0
votes
0answers
17 views

Using rules to Flag a Product Display Node on Checkout

Every user is supposed to purchase Particular product only once. So i have a view to list the Product Display which by using FLAG module i can list only Unflagged Product Display nodes (Products ...
0
votes
0answers
14 views

How to calculate two taxes for the same product?

Spanish taxes depends on the product but also on the customer. A product could have one of this taxes: normal (21%), reduced (10%) and super-reduced (4%). This is managed by a field on the variation ...
0
votes
0answers
19 views

Order confirmation email with custom order fields

I have added some fields to the order type and they are completed on checkout flow. I would like to include those fields in the confirmation email but I haven't found a way to get it on the twig ...
0
votes
0answers
19 views

Cart order total summary vat calculation issue

When you have items in your cart and the shipping price is available, there is an issue with the order total summary: Subtotal: 62,00 € Shipping: 15,00 € VAT: 10,76 € Total: 77,00 € The VAT is ...
0
votes
0answers
44 views

Resolving: Fatal error: Class 'CommerceGuys\Addressing\AddressFormat\AddressFormatRepository'

The Address module was installed using the Ludwig module. I tried to update the module, but I cannot, as the site gives me this error and the site install has not been done via Composer. Everything ...
0
votes
0answers
17 views

Commerce Gateway Capture Payment Only

I'm trying to write a custom payment gateway to work with a vendor's payment processor. They have only provided me with an endpoint to capture the payment whereas Drupal Commerce 2 works in two steps -...
0
votes
1answer
20 views

How can I limit the maximum weight of an order?

Is there a way in drupal commerce 2 to prevent adding a product to the cart, if the order weight exceeds a certain amount, let's say 40kg? We are also using the commerce_cart_api plugin, in case this ...
0
votes
0answers
15 views

extend result json of commerce_cart_api /cart

We are using the Drupal Commerce 2 on Drupal 8 together with the commerce_cart_flyout module, which in turn depends on the commerce_cart_api module. We would like to put product thumbnails to the cart ...
0
votes
1answer
21 views

Shipping weight not calculated?

we are currently trying to get our drupal commerce 2 attaching a certain shipping method based on the weight of the order. It is pretty simple (at least I thought so): if the order is below 20kg, it ...
0
votes
1answer
43 views

Is 'order completed' a safe way to assume that order is paid in full?

I am working on a client's site. I have a requirement that when a user buys a product, a specific role should be assigned to the user. For this, I have used 'business rules' module. Business Rules ...
0
votes
1answer
9 views

How do I disable the “Continue to payment” button before the shipping method is selected?

How do I disable the Continue to payment button before the shipping method is selected? I use #states to disable the button, but it doesn't seem to work.
0
votes
1answer
25 views

Address book not visible to registered users

We are using drupal commece 2 on drupal 8 and I noticed, that /user/xx/address-book/ only works for the admin user, not for normal registered ones. It appears to be a permission issue, but under /...
0
votes
0answers
18 views

How do I update a cart item?

I have a subscription product which will offer 1month , 1 year , 3 years packages. So i created all the product variations needed and i build a custom block to select all these packages. When a user ...
0
votes
1answer
15 views

Store custom checkout pane data to order

I've created a custom checkout pane according to documentation. When I submit my Order and go to admin page, where all my orders are listed, I can't see this custom pane field there. I've already ...
0
votes
0answers
19 views

Sell products in pairs ( only 2, 4, 6 pieces so on)

We need to sell certain SKUs in pairs, not sure how to approach it in Commerce 2. So that shall be per SKU setting. There is say https://www.drupal.org/project/commerce_product_limits but it only sets ...
0
votes
1answer
25 views

default email for guest checkout

I am using the Commerce Kickstart 2.x demo. When the guest checkout option is selected, the default guest email demo+1614916499@commercekickstart.com. Is there a way to change what's displayed as ...
0
votes
0answers
3 views

How to add a field to an order that only the administrator can view/edit in the orders admin?

I am looking for help in reference to commerce 2, not commerce 1. The requirement is to add a field (select list) to the order admin area, not the customer order form. The administrator should be ...
0
votes
0answers
12 views

Rule selector broken

Is there any reason why the Commerce rule selector is broken? I tried clearing the cache, but that didn't work. This causes fatal errors on some pages. On the log, I get errors like the following one. ...
1
vote
0answers
18 views

systemAdminMenuBlockPage callback not respecting menu link permissions

I added a custom permission on "admin/commerce/config" to disable access for certain user roles. class RouteSubscriber extends RouteSubscriberBase { /** * {@inheritdoc} */ public ...
0
votes
1answer
14 views

Discount issue?

I am working on a big Drupal 7 commerce site and I have some issues with the commerce discount module on order discount. Both Drupal 7, commerce, commerce discount and rules is on newest stable ...
0
votes
1answer
57 views

Add drop down selection to shipping method

I need to add an additional drop down field when a particular shipping method is selected, on the order information page during checkout. I only found how to add additional plugin option when adding a ...
0
votes
0answers
24 views

Combine two Media fields in Product types and Product variation types

i'm drupal beginner, i install drupal 8 commerce 2, i create a media field in Product types and create another media field Product variation types also. when i create new product, i want to give user ...
0
votes
0answers
5 views

Adding Order Items to a Complete order and process the payment for newly added Items

I want to add more items to a order that is complete using the default workflow. Is it possible to change the state of the order again to draft and accept payment for the newly added items in drupal 8 ...
0
votes
2answers
67 views

How do I override an entity view controller?

I am trying to override the entity view controller for a commerce product view, so that I can redirect the user based on certain conditions. I am trying to do this through the RouteSubscriber::...

1
2 3 4 5
76