Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [drupal-commerce]

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

0
votes
0answers
13 views

How do I set minimum and/or maximum total price for orders?

I've been looking around unsuccessfully for both a configuration or coding way to implement setting to block the checkout of an order if it doesn't meet minimum and/or maximum total price conditions. ...
0
votes
0answers
18 views

How do I implement a donation functionality?

I'm looking to implement a donation functionality with Drupal 8 Commerce. My question is if there is a solution for Drupal 8 similar to the one Randy Fey described in his tutorial in 2011 for Drupal 7?...
0
votes
0answers
8 views

How to change payment method depending on product field

I´m running a D7 Commerce and I need to activate a payment method for some special products. On the Payment Rule conditions I need to check if the product included in the order has a specific value. ...
0
votes
0answers
11 views

Errors when the product price is not the same as default country

On Drupal commerce 2 (Drupal 8), the default country for the site is Canada. But I have multiple currencies enabled. When the price for a product is entered as US dollars, after completing the payment ...
0
votes
0answers
19 views

Quantity field and Custom text field is not displaying in add to cart form

My aim is to display two fields in Product page (Custom text and Quantity field). I have created a new custom text field. Finally, I have moved these two fields from hidden to visible mode in Add to ...
0
votes
0answers
14 views

why the value of 'total paid' field on a completed order gets doubled?

I am using commerce 2 on Drupal 8. I need to get the value of a customer has paid on a completed order. But strangely the 'total paid' value gets doubled, here is output of dsm($order): [total_price] ...
-2
votes
0answers
18 views

Configure Commerce cart expiration

I need your help to achieve below function. We are using Commerce module in Drupal 8. I am told to configure timeout for the cart. A user's cart will be clear after 60 min of adding the item to the ...
0
votes
1answer
7 views

Drupal Commerce custom pane as payment and shipping address

Currently, Drupal Commerce does not have a solution for "shipping address is the same as payment address" checkbox, which is very unlucky. I was thinking of creating a custom pane with my custom ...
-1
votes
0answers
20 views

Nightwatch or Behat for simple CI

I'm looking to add simple automated testing to a Drupal 8 + Commerce site I develop locally on Lando, and have a staging and production server. The testing I need to do (at least at the get-go) is ...
0
votes
0answers
5 views

Commerce 2: “Manual” payment method still requires user to enter name and address info. How can we remove this requirement?

In Commerce 2 we are using the "Manual" payment method to allow certain users to select this option as a "Bill Me Later" method. However, when this Manual method is selected the user is still required ...
0
votes
0answers
19 views

Custom workflow with commerce 2 [closed]

I need to create a shop with the commerce module to generate memberships. A user must be able to order multiple memberships for different people. I need to know your opinion on how to create these ...
-1
votes
0answers
5 views

Module sitemap not showing in page

i install module site map in my localhost but when i enter to http://mywebsite.com/sitemap.xml i don't see anything but when i click in ctrl+u to see source code i find map xml but i want when i ...
0
votes
0answers
9 views

Price resolver and cookie cache context vs cart order item prices

I have custom Drupal commerce price resolver that changes the base price for a product based on the value of a cookie (or absence of one). The resolver adds appropriate cookie cache context to the ...
0
votes
1answer
13 views

In Commerce 2, how can we allow users with a role to bypass payment during checkout (bill me later)

We have a Commerce 2 site that we need to be able to assign users a role ('Bill Me Later') that will allow the user to select the payment option 'Bill Me Later' during checkout. I have not found a ...
-1
votes
0answers
9 views

Custom field in checkout D8 / Commerce 2 [closed]

The module https://www.drupal.org/project/commerce_fieldgroup_panes is not compatible at this stage. Happy to hear if there is another module compatible with D8 that will work
0
votes
0answers
10 views

get all order promotions

How do I get all discounts on an order? Is it possible to get all promotions applied on an order: $order_id = \Drupal::routeMatch()->getParameter('commerce_order')->id(); $order = Order::load($...
0
votes
1answer
10 views

Drupal 8 : Add Product SKU as search filter for Orders view of the Commerce module

I like to achieve below solution using Drupal configuration instead of code. The commerce module has been installed for one of our Drupal CMS site. In the admin interface there is an Orders view for ...
0
votes
0answers
8 views

How to remove payment gateway for users with a specific role?

We have a Drupal 8 Commerce 2 site that needs to dynamically remove the payment gateway for users with a specific role that will be 'billed later'. The conditions for the payment gateways all showing ...
0
votes
0answers
12 views

From within a price resolver, how to get to the selected attributes of the current product?

I am writing a price resolver for drupal commerce 2 (on drupal 8). To get the price i want, i will need to fetch some information from a field that has been placed on the attribute(s) that have been ...
-1
votes
1answer
16 views

Product / subscription / membership for places on a physical veg box scheme?

My client can provide max 30 veg boxes at any one time, delivered physically. A purchase buys a weekly delivery for 6 weeks (ie 6 veg boxes). When the 6 week period is over, deliveries stop. So there ...
0
votes
0answers
12 views

Add a custom condition in payment gateway configuration

In drupal commerce, while adding a new payment gateway [ Home >> Administration >> Commerce >> Configuration ], there's a section called Conditions where you can specify a certain ...
0
votes
1answer
17 views

Commerce Product with diffrent prices for different shops

Working with Drupal 7 on a comparison site where a product is sold at different price rates at different physical shops. Now there about 300 of these shops. Going by Commerce default setup, I would ...
0
votes
1answer
15 views

How to include multiple taxes to a product's price?

I am using Drupal commerce and have multiple taxes and tax types. The product price in my site includes 2 types of taxes already added to them (inclusive of both the 2 taxes). In the product edit ...
1
vote
0answers
18 views

Drupal Commerce 2 add to cart form in Search API view

I would like to add an add to cart form over my thumbnails in a search api view. So far I have managed to use a twig template for a view mode of my product in the Search API view. What code do i need ...
0
votes
1answer
32 views

Add class to checkout button on cart page

I'm trying to add classes to the Checkout button by HOOK_form_FORM_ID_alter, but the checkout button is not there. $form['actions']['checkout']['#attributes']['class'][] = 'pull-right'; If this is ...
0
votes
1answer
27 views

How to print Blocks in commerce-product.html.twig

I am looking at building a Drupal 8 Commerce 2 product display through twig but I am having issues with how to print custom blocks in this template file. (And also testing these in normal page.html....
0
votes
0answers
11 views

For Commerce, which UI display builders are supported?

I am trying to manage the display of products with Display Suite but have come across the issue of the display of variations and their prices. There was the suggestion in this issue but it is not a ...
0
votes
0answers
20 views

Creating custom payment module

I'm using Barion payment gateway, and they don't have module for Drupal 8, do I decided to make my own. I was able to redirect users offsite so they could make payment, and the payment is visible, but ...
0
votes
1answer
14 views

Give permission to non-admin user to view and edit list of orders

I am trying to create a role and assign it to a user who can view the admin orders list page and also edit the orders. After adding all the permissions under the order sections in the permissions ...
0
votes
0answers
32 views

Upselling products after purchase

I would like to provide some up-selling products that a customer can purchase after his first purchase. The customer should not need to register. I would like to reuse his previously used payment and ...
1
vote
3answers
39 views

Redirect after purchasing

How can I perform a redirect after purchasing a product? I tried to create a custom checkout pane for this purpose, but it doesn't work as the form is not submited: public function buildPaneForm(...
0
votes
2answers
21 views

Commerce discount rule

Have this scenario, a user must get 10% discount on only these products (product 1 & 2 is defined in rules), if at least 5 items of each is in cart. Cart: 5 pcs product 1 500 5 pcs ...
0
votes
1answer
42 views

Disable registration on commerce checkout

According to https://docs.drupalcommerce.org/commerce2/user-guide/checkout/allow-register-at-checkout the 'Login or continue as guest' checkout pane should have an option 'Allow registration'. In my ...
1
vote
1answer
26 views

SKU already in use

I just installed commerce on Drupal 8. I created a Store, Product Type, and a few products. When I was creating the products I was often getting an error message that the sku was already in use. If I ...
0
votes
0answers
22 views

How do I stop duplicate pending orders from being created

Using drupal 7.63, drupal commerce 1.14 For an unknown reason groups of empty orders are being created with a status of Pending. Each group belongs to the same user. Seems to happen randomly. Is ...
0
votes
0answers
27 views

Programmatically Alter Billing/Shipping Address form

I am using Drupal Commerce 2.11 and Drupal 8.6.9. I need to make a simple edit to the address forms in the checkout - changing the #empty_option of the "locality" select boxes. However, this is ...
0
votes
0answers
30 views

Extricate commerceguys/profile getType() on null

Customer bought a D8 theme with Drupal Commerce installed with it. Every time I start out to build a custom module, at some point the site goes down with what I suspect is due to a misconfiguration ...
0
votes
0answers
19 views

How is the display of the individual customer order shown?

How is the display of the individual customer order shown? This is the display shown when going to the Orders tab in the customer profile. I have the Entity print module installed, and I would like ...
0
votes
0answers
33 views

Distance-based shipping/delivery calculation

I'm setting up a site for an equipment hire business where they want the customer to have the option of delivery at a flat rate within the city they're in and a single cost per extra mile outside. I'...
0
votes
3answers
40 views

How can you remove another modules events?

So, I have an event subscriber for Drupal commerce that listens for "commerce_order.place.post_transition" and will send a bespoke order email (due to not being able to change some of the things like ...
1
vote
1answer
23 views

Product category pages

I've had experience creating product catalogues in Drupal 7, but this is my first time using Drupal 8. I have some categories defined as a taxonomy, and I simply want to create category pages that ...
1
vote
1answer
35 views

Alter add to cart message

How to alter the message shown - "xyz" added to your cart, when we add an item to cart in Drupal 8 Commerce 2x. I saw Drupal\commerce_cart\EventSubscriber where the function displayAddToCartMessage(...
0
votes
1answer
24 views

How can I redirect users to the order information after adding product

This is the goal: Once user click on a link, product needs to be added to the basket, and order information page needs to appear, so user can fill it. I've created a controller, and everything works, ...
1
vote
1answer
13 views

Allow customers to add arbitrary data to products when adding to cart

I've got a product type called workshop and I want customers to be able to specify the names of their kids when they add a workshop to the cart. If I could figure out how to add any arbitrary data at ...
0
votes
0answers
7 views

Using Commerce Product Option module and now cart total not calculating properly

I've installed the 'Commerce Product Option' module and set up an option set with 6 select boxes. These select boxes successfully appear on the product display page, and the user can select 6 options ...
0
votes
1answer
24 views

Commerce order mail is empty for anonymous users

In the function below, there is the problem of sending email to anonymous users, the email sending only for users logged and to complete checkout and payment. I get the following error message: ...
0
votes
0answers
37 views

Return last 4 digits of credit card from orders

Client is requesting the ability to see some card details when order payments fail (last 4, expiration date, etc.). We are running https://www.drupal.org/project/commerce_cardonfile which exposes ...
0
votes
1answer
38 views

I have 2 commerce feeds imports, one must run before the other

I have a drupal 7 commerce site, each day our client uploads a .csv with updates to approx. 4000 products, including published status. 2 imports have been configured, 1 to update the product ...
0
votes
1answer
44 views

Order receipt email content

I have a Drupal 8.6.7 site with Commerce 8.x-2.11 installed. I would like to include slightly more information in the emails sent out when customers complete the checkout process. I would like to ...
0
votes
1answer
17 views

admin/commerce/orders/{orderId}/payments/add “You are not authorized to access this page.”

When I try to add a new payment to an order (either created by a customer or via the backend) I always encounter the "You are not authorized to access this page." error. My user has the ...