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
0
votes
0answers
17 views

I’m trying to create a link to a user user/%user/stores on a commerce marketplace and open social

I’m using commerce marketplace and open social, I need to create a link to the user products and my store. But somehow I’m not able to get it running. I keep getting access denied when using "...
-3
votes
0answers
16 views

Webform form payment

Am working to enable payment after filling up a webform in a Drupal 7 site. Specifically users can fill up a form and before the form is submitted should pay a small fee. Once the transaction is ...
-3
votes
0answers
34 views

Different prices for each country?

I'm working on shop that covers multiple countries and I need a way to have different prices of some products for each different country. I.e. t-shirt in Italy costs 15 €, but in USA it costs $17 and ...
0
votes
1answer
18 views

Get product variation type from item id [closed]

How can I get programmatically the product variation or more specifically the product variation type by the item id from an order? In the view, I manage to do this by relationships order item and ...
0
votes
0answers
20 views

Drupal 8 Commerce : How to do 0$ checkout? [closed]

I am using Drupal 8 commerce. Is there any module for gift card or we need to consider as Product entity. Because Gift Card only contains : Image, Code, Start Date, End Date, Enable/Disable. First ...
0
votes
0answers
13 views

Get the current ProductVariation from the formElement of a custom widget in the “Add to cart” form

I've a custom field in my Order Item, i need the value of a field of my ProductVariation in the widget of my custom field. Let's say that my Variation has a "remote ID" field, when i select ...
-3
votes
0answers
27 views

ERPAL Stripe payments not showing up

I've been given a Drupal 7.x ERPAL (https://www.drupal.org/project/erpal_platform) project to maintain and I'm attempting to add online Stripe payments using Commerce Stripe (); it may also be worth ...
0
votes
1answer
18 views

In the settings for payments, what is the meaning of “Test transactions in a live account”?

What actually happens if I complete a transaction with the payments setting on "Test transactions in a live account"? The only documentation I see is language like "Under Transaction ...
0
votes
0answers
21 views

Alter Address field in order to add a list of cities

I need to alter the address field because I want to transform the locality textfield in a nested select box along with administrative_area value. I've tried to do that with a hook widget_alter, form ...
0
votes
0answers
24 views

Class not found in Drupal\Component\DependencyInjection\Container->createService()

I have a custom module (srs) that has an event subscriber as a service. That event subscriber class uses other custom helper class files after it catches the event. I tried to register the helper ...
0
votes
0answers
9 views

How to access custom customer shipping profile fields during shipping calculation

I'm attempting to create a shipping calculation based on fields I've added to the shipping customer profile however I've been unable to access them through either the rules interface nor by creating a ...
0
votes
1answer
59 views

How to imitate EVA with TWIG?

On my Drupal 8.9 (with Twig Tweak module) home page I integrated a block with the following code : {{ drupal_view('accueil_page_liste_des_taches_boutique', 'block_1') }} This block displays the ...
1
vote
1answer
40 views

What are the effects of the “access commerce administration pages” permission

The SA-CONTRIB-2020-020 security patch was titled "Further restrict anonymous user access to anonymous orders." Unfortunately it seems to have broken some sites I work on. We are now seeing ...
0
votes
0answers
28 views

How do I create a view showing all the commerce store products?

I am using Drupal 8 Commerce v2.19. I am trying to create a view that shows all the store products. I have created the Search API index of the products, indexed the store field as in this screenshot. ...
0
votes
1answer
23 views

How to get user all order_items from different orders by entityQuery

I want to know if the user has purchased the specified product. I know the SQL. But I am learning to use entityQuery. Example: user_id = 1, product_variant_id = 5 SELECT * FROM commerce_order ...
0
votes
2answers
21 views

After selecting “My billing information is the same…” an Edit button is shown

QQ - When registered user goes through their cart to their payment information the "My billing information is the same as my shipping information. - Optional" is shown as default checked. ...
0
votes
1answer
29 views

Ajax callback never called / triggered

I'm working on a payment gateway, so I've created a BasePaymentOffsiteForm form where I'm trying to make an ajax callback, but it is not working. Can you help me to know what is wrong with my code? ...
1
vote
0answers
30 views

Trying to add a shipping calculation rule using “Order Address component comparison” condition

I'm attempting to create a basic "Shipping rate by country" Calculation rule in Drupal Commerce using the Flat Rate shipping module. I've followed the official tutorial for this exact thing (...
0
votes
2answers
22 views

Create an order as administrator user and let users continue with the checkout

I am using Drupal 7 and the Drupal Commerce module. I need the ability to create an order as administrator user and let users continue with the checkout. What I have tried: Get the order ID and send ...
0
votes
0answers
27 views

Cart block doesn't show any content

After installing, the cart block view doesn't show any content, even when I had put something in the cart. I found How to hide an empty shopping cart with drupal commerce, which says the correct ...
0
votes
1answer
81 views

How do I install without having these errors? [closed]

So far, Drupal Commerce is the best module for e-commerce on Drupal. But now Drupal 9.0.0 was released, and when I want to install Drupal Commerce on Drupal 9, both way is out of luck. Both way I ...
0
votes
1answer
26 views

Show the cart icon only if it exists and it isn't empty

I'm looking for an easy way to show on my template a cart icon only if the cart has 1 or more elements (Drupal 8, commerce 2.x); I've tried with a view, but I had problems to identify the cart ...
1
vote
1answer
17 views

Select order type and store with hook_form_alter()

In drupal commerce, I have 3 stores and 3 orders type When placing a manual order, i am first asked to choose the store and the order type ( which are entities), with radio buttons. With a select ...
-1
votes
1answer
36 views

How to alter the POS order item table header and columns

Using Drupal 8/Commerce 2 and the Commerce Point of Sale (POS) module, the autocomplete form to search and add a product to an order shows this table header. As indicated by @JayPan below, here ...
0
votes
1answer
30 views

How to check if custom variation field is null in twig?

I would like to know how to check if a custom variation field has content in a twig template (commerce-product.html.twig with variations injected). I have tried with some filters and conditions but ...
0
votes
2answers
27 views

How can I accurately determine when a customer is on the “Review” step in Commerce?

I've created a custom checkout pane by extending Drupal\commerce_checkout\Plugin\Commerce\CheckoutPane\CheckoutPaneBase and added it to the "Order information" step in a checkout flow. This accepts ...
0
votes
0answers
23 views

How to add some buttons to add to cart form

I would like to add some buttons to my add to cart form to alter the quantity input. I want two buttons for +1 and -1, and two other buttons for +12 and -12. This is the code I use in my .module to ...
0
votes
1answer
45 views

Commerce hook attributes refresh alter

Commerce 1.x (D7) has a hook _commerce_cart_attributes_refresh_alter(&$commands, $form, $form_state) that allows modules to add arbitrary AJAX commands to the array returned from the Add to Cart ...
0
votes
0answers
16 views

Multiple Custom Line Items with single add to cart button

I am working on a system that pulls in available dates and booking references from a third party API - we then need to add these pieces of extra information to a line_item that is added to cart. I ...
0
votes
0answers
8 views

View 'checkout order summary' not shown in order information page [closed]

Something different is shown in the order summery block (on the order_information page) than in the view 'checkout order summary' that I had slightly modified. In the view itself the preview works ...
0
votes
2answers
39 views

Product structure

While building a demo webshop for wine, I am not sure about how the product structure should be. So, I have to map the next structure and I am not sure what is the right approach. For example, we ...
0
votes
0answers
25 views

What are the necessary fields to provide in a CSV so that the orders are created properly?

In the context of Drupal 8 and Commerce 2, I need to create about 1000 orders on behalf of my users. What are the necessary fields to provide in a CSV so that the orders are created properly? The ...
0
votes
0answers
50 views

How to add variable to customize mail which is send after completed order?

I have created a custom field "field_jour" (type = selection list) in Commerce Order Type, for Checkout process. I would like to customize Mail which is send when order is completed (file = modules/...
0
votes
0answers
26 views

Error message “This value should not be null” with required field

When field is not required, it is ok. But when field is required, I have error message "This value should not be null". CONFIGURATION : This field was created in COMMERCE / ORDER TYPE : Entity ...
0
votes
0answers
13 views

How do I ajax-ify the empty cart button?

I placed the Commerce Cart block in the side bar and I added the Empty Cart Button in the View footer of this block. It works as is. I wanted to make this "empty cart button" use Ajax instead of ...
0
votes
2answers
37 views

The item of an unregistered user's cart is shown a different unregistered user

Using Drupal Commerce 2 in Drupal 8.8, if an unregistered user puts something in the cart (and doesn't check it out) another unregistered user sees these items in Cart block (provided by view (order))....
0
votes
2answers
26 views

How do I recalculate the price based on a given address?

I have a basic commerce shop setup and I need to recalculate the price based on the delivery region within the country. The first approach I tried was to add a list field for the customer profile ...
0
votes
0answers
58 views

How to render in commerce-product.html.twig calculated price?

I can render calculated price via {{ product.variation_price }} Is it any chance to this price from product_entity variable in twig? I have used custom resolver class to update price. updated at 16/06/...
0
votes
1answer
52 views

Commerce Fee not being added to order total sent to payment processor

I have followed the Commerce Fees module's instructions found at https://www.drupal.org/project/commerce_fees: DOCUMENTATION Go to admin/commerce/config/fees and add a new fee type Add a ...
0
votes
2answers
23 views

How do I fetch the user ID from the shipping profile?

I'm trying to get the User ID from Shipping Profile in Drupal Commerce using the following code, but eventually, $entity->getOwnerId() is returning me NULL in any case, if it's an authenticated user ...
1
vote
1answer
38 views

Constraint doesn't attach from BundleFieldDefinition, but does from entity_bundle_field_info_alter()

I'm adding a trait to Commerce Product Variations, which applies the following public function buildFieldDefinitions() { // Builds the field definitions. $fields = []; $fields['...
0
votes
0answers
15 views

Adjusting the shipping price for a product after the order was placed

I'm using Drupal 7 Commerce module and I need to be able to edit the shipping price of an order after the has been placed. This is a B2B site, so the prices are displayed without VAT. I'm using the ...
0
votes
0answers
28 views

How to configure SQL plugin in a View Filter Plugin

I'm trying to write a plugin to get Commerce Stock Level field working with views, so I can get it to work correctly with Entity Browser(the operator runs on the last transaction instead of the ...
0
votes
0answers
15 views

Single commerce 2 products access control

As this documentation indicates, I can control the access to products by role, but what about single products?. I would like to hide some products from the views based on some conditions but not all ...
0
votes
0answers
26 views

Shipping not working with payment gateways

I cannot make the module shipping work with conditions based on payment gateways: My Configuration: drupal 8.8.5 + module commerce 8.x-2.17 + module commerce_shipping 8.x-2.0-rc1 I added a ...
0
votes
1answer
25 views

Why is library not being attached to my email twig template?

I am overriding the commerce-order-receipt.html.twig by adding that file to mytheme/templates/commerce. I then add these lines to mytheme.libraries.yml email: css: base: assets/css/email....
0
votes
0answers
14 views

Multiple regions, same subscriptions: Should I use product variants or duplicate the products for each region?

We have a subscription-based app. Users signup via our website, a Drupal 8 site using the Drupal Commerce module. We have customers all over the world; we need different taxation for at least three ...
0
votes
0answers
19 views

Retrieve shipping address fields

I am trying to retrieve the shipping address from the Shipping module in a view, and I could get it, but I want to export the address to a CSV file and I need the address as name, address line 1, ...
0
votes
2answers
56 views

Customize Order Items table on admin order screen

On the order edit admin screen at /admin/commerce/orders/270/edit, how do you customize the Order Items table? I've been looking all day and can't figure it out. There's a view that controls this same ...
0
votes
0answers
18 views

How do I alter the Order Information form?

Due to a bug in Commerce where I am unable to have admin make payments with a method which is not accessible to the order's user (https://www.drupal.org/project/commerce/issues/2912996); I thought it ...

1
2 3 4 5
74