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
1 answer
67 views

How can I collect shipping information?

I can't figure out how to get the shipping address information to be collected on checkout in Commerce on Drupal 10. My setup Created a Manual payment gateway that collects billing information. ...
Patrick Kenny's user avatar
0 votes
0 answers
41 views

Commerce 2 - switch variation ajax error

I'm building a commerce site, one problem that I have is that the variation switch that works with ajax is having problems on the production server. I have analyzed the network tab of DevTools, the ...
felipep's user avatar
  • 332
0 votes
0 answers
13 views

Commerce and Views - show all products where there are colours available as different clickable links

I am building a commerce site. I'm trying to create a view where all my products will show with image, title and price. I sell t-shirts in say 3 different colours in 3 different sizes. In the overview ...
Peter Mengerink's user avatar
0 votes
0 answers
24 views

Buying an amount of product X must add a product Y

I have a shop where a product (lawn/turf) can only be bought with an additional package (Europalette). When users buy 1-50 items there must be one Europalette packaging automatically added into the ...
Alex Misgin's user avatar
1 vote
0 answers
23 views

Always charge the most expensive flat rate shipping in an order

I have a Drupal Commerce site with two product types. One has free shipping, and the other costs € 3,-. When both products are in the cart, the customer is allowed to choose either of those rates, ...
Pixelstyle's user avatar
0 votes
0 answers
34 views

Auto increment value less than max uid on users table

I'm seeing these errors flooding my log file. They come from commerce order complete pages - and some registration pages too. Drupal\Core\Entity\EntityStorageException: SQLSTATE[23000]: Integrity ...
Wayne Foster's user avatar
0 votes
1 answer
40 views

Export product image with Commerce Cart API module

I'm usng the "Commerce Cart API" module on my website to build a custom cart js layer. The problem i am facing is the purchased entity has a field_image field and I would like get the url of ...
Mariano Banchio's user avatar
0 votes
0 answers
39 views

How do I conditionally restrict an attribute

I'm using Drupal Commerce 8.x-2.x on Drupal 9.5.x. I need to restrict a particular product attribute to certain regions (regions selected via an attribute). My thinking is that the region is selected ...
Glenn's user avatar
  • 21
0 votes
1 answer
14 views

Switching from table to graph give wrong data

I'm using the Drupal Commerce Report module as a base for my stats. I have a table which give me data about my sales per month. I'd like to use graph instead of table, to make it easier to compare. ...
lobafox's user avatar
  • 103
0 votes
0 answers
37 views

How to add variations of a product to the cart if only the first variation have all attr values

Consider a product. For example it has 5 different colors that is 5 product variations. But all other values of the product's attributes (size, weight etc.) are the same for all the variations of the ...
droopal's user avatar
  • 26
0 votes
2 answers
225 views

How do I get the product item author id from the order object?

I have a website, where users can add their products. After a user purchases a product and pays for it, I want to create some custom logic. I need to know the authors of the individual items purchased....
ventura's user avatar
  • 103
0 votes
0 answers
11 views

Why aren't my states showing in the Default field when setting up Order Items Type State Workflow for order fulfillment?

I'm following the instructions to set up Order Fulfillment States as per Working with state fields but when I attempt to add a new State Field the states specified in my module.workflows.yml aren't ...
Don Pickerel's user avatar
-1 votes
1 answer
25 views

Orders view personalization

Apache 2.4.29 + php8.1 + mySQL 5.7.41 Drupal 9.5.3 Commerce 8.x-2.33 Hi all folks ! I'm trying to personalize the orders view with custumer's name, adress, ... To do that i add the "commande"...
Lozi's user avatar
  • 1
0 votes
0 answers
17 views

onNotify called 3 times on error returned

I'm using the OffsetRedirect.php file to handle the return of my bank when the user pay his order. Inside this file, i use the onNotify() method public function onNotify(Request $request) { $...
lobafox's user avatar
  • 103
0 votes
0 answers
14 views

eCommerce Products Permissions per Node

Good day We are building an eCommerce Platform where multiple users can be able to register, login, create, edit and delete their Profiles and Products. The main feature is to have each user to only ...
Thomas Tsita's user avatar
0 votes
0 answers
145 views

Getting "An illegal choice has been detected. Please contact the site administrator." error on checkout page

Drupal version: 9.5.2 On the checkout page when user tries to add new shipping address by selecting "+ Enter a new address" from selectlist, form for new address loads but shows error ...
Ganesh Chaudhari's user avatar
0 votes
0 answers
37 views

Commerce Square Connect Order Processing

I'm working on a patch for the Commerce Square Connect contrib module as described here: https://www.drupal.org/project/commerce_square/issues/3228232 The patch I've developed provides basic ...
Scott Hollenbeck's user avatar
0 votes
0 answers
21 views

how to create commerce product attributes which gets it's values from a view

I want to fill the product attributes select list with data like: location1 location2 location3 These locations are general and gathered using a custom module. In views I can create a list with these ...
user14409370's user avatar
0 votes
0 answers
28 views

Shipping configuration for x items or more

Using Drupal9 and Commerce2 I'm trying to configure shipping for a specific variation type : tires. If you order one or 2 tires, you must pick them up on site. if you order 4 or more, they can be ...
Alexdezark's user avatar
1 vote
1 answer
181 views

Can I use Price Resolvers for dynamic product pricing?

All cart items are adding programmatically. I am trying to set a product cost based on various factors that change for each instance of an item added to the cart. I discovered Price Resolvers and it ...
liquidcms's user avatar
  • 1,224
0 votes
0 answers
23 views

Exposed Filters Manipulation and product attributes

I am using Better exposed filters in my view and the filtering criteria are Product Attributes of the Product Variations i have setup. It is working but the attributes are showing as Titles and i ...
Rayan Frem's user avatar
0 votes
0 answers
23 views

Commerce Event Subcriber

I have created a custom event subscriber for Commerce, but when the event is triggered, somehow the Order number is increased by +1 and I get suddenly confirmation emails for 2 orders. I'm not doing ...
cateye's user avatar
  • 733
0 votes
0 answers
102 views

How to display a shipment method as an order item row in csv or table view

I am creating a csv order view with a relationship to pull in referenced order items, and it gives a row for each order item as expected : Order 1, item 1 title, item price, Order 1, item 2 title, ...
tonytheferg's user avatar
0 votes
0 answers
35 views

Commerce migrate and upgrade

I'm going through the process of migrating from commerce 1 -> 2 and everything works from the product / order /payment perspective but I can't figure out how to re-map other content types that ...
Daniel Harper's user avatar
2 votes
0 answers
215 views

How do I cancel an order?

I am looking for a way to change the status of some orders. I need to be able to cancel orders even if the payment has been validated. In fact, I'm currently using the Commerce Payplug module which ...
Alexdezark's user avatar
0 votes
2 answers
239 views

How to programmatically capture a payment?

Payment is in Authorized state. How do I programmatically capture it? I am using Authorize.net payment gateway.
liquidcms's user avatar
  • 1,224
0 votes
2 answers
92 views

How to distinguish between order.paid event when authorization/capture and just capture?

I asked this question back in 2020: How do I programmatically "place" an order? and provided my own answer there: Provide an event subscriber: public static function getSubscribedEvents() {...
liquidcms's user avatar
  • 1,224
1 vote
1 answer
40 views

Commerce Migrate module not listed in migrations

I installed the Commerce Migrate module, and its submodules, commerce_migrate_commerce and csv_example. When I run drush migrate:status, I see the migrations for the csv_example listed but none of the ...
user1015214's user avatar
  • 1,801
1 vote
1 answer
169 views

How to obtain a node id and product type from the product variation id?

I have a view in Drupal that has a field called Index product variation search: Item ID. Its description is "the item's internal (search API specific) ID". Here is an example of what this ...
Diamoniner12345's user avatar
1 vote
0 answers
29 views

Canadian Tax Free

I am trying to add Gift Cards to a Canadian site, and those cards are to be the only tax free item on the site - We're online so the customer could be in any province. No matter what I try, I cannot ...
Deej's user avatar
  • 41
0 votes
1 answer
64 views

Why can’t I install the module after uploading it?

I uploaded the Commerce Core module (8.x-2.32) from the /admin/modules/install tab. After uploading it, the modules list shows the module as disabled. I cannot select the checkbox shown for this ...
0 votes
1 answer
213 views

How to get fields of a product type using a database dynamic query

So I currently have multiple different product types that have varying fields. I was able to fetch all products using EntityTypeManager the following way: $productStorage = \Drupal::entityTypeManager()...
levente.nas's user avatar
0 votes
0 answers
118 views

Order receipt mail -> shipping_information variable

How can I output the individual information of the variable shipping_information in a template file? For the billing_information variable, I followed How can I get the customer name in an order ...
Maik's user avatar
  • 11
1 vote
1 answer
107 views

How to render the correct variation price in catalogs?

I have a product catalog built using search api, facets, and views like this: https://docs.drupalcommerce.org/commerce2/developer-guide/products/marketing-products/product-catalog-facets. My add to ...
Kristoffer Rom's user avatar
0 votes
1 answer
103 views

Unable to enter credit card payment information

I just noticed that I'm unable to enter credit card payment information (card number, expiration date, CVV) when going through the Drupal Commerce checkout processing using the Square Connect payment ...
Scott Hollenbeck's user avatar
0 votes
1 answer
90 views

Theming User Address Book Page

We are using drupal commerce2 on drupal 9, and I am trying to theming the address book tab (add some classes to layout and fields), /user/*/address-book. Unfortunately there isn't any twig template in ...
Samuran Wong's user avatar
1 vote
1 answer
120 views

Programmatically update products

I am building a site with Drupal 9 and Drupal Commerce 2 (Drupal Commerce Kickstart). The site is complete and I have already entered all the products via Feed (there are over a million). Now I'm ...
FraMan's user avatar
  • 11
0 votes
1 answer
59 views

How To Resolve Commerce Button Returning Error?

I'm using the latest stable version of Drupal Commerce (on Drupal 9), with every module up to date Problem: When the add to cart button is clicked the site returns message "The website ...
zack cv's user avatar
1 vote
1 answer
299 views

Cookie authentication when reguistering users through REST API

I am running Drupal 9 commerce 2.0 as headless CMS, and I am trying to integrate the user registration/user login part of my frontend application. I was able to use the user/register REST API to ...
levente.nas's user avatar
0 votes
1 answer
37 views

I can't get rid of duplicates in products view

I tried everything. I reduced the number of fields. I set the Query settings to distinct. Product: Variations (variations:delta) is also set to 0. When I search by SKU I get duplicates. SKU Search is ...
thaidrupaler's user avatar
0 votes
0 answers
52 views

Order item entity/field definitions

On my Status Report (Drupal 9.4.8), I see the following error. Mismatched entity and/or field definitions The following changes were detected in the entity type and field definitions. Order item The ...
Delford Chaffin's user avatar
-3 votes
1 answer
51 views

What is the template code for order date and telephone number [closed]

In our invoice that is printed, the date of the order and the telephone of the customer is missing. How can I print those into the template?
thaidrupaler's user avatar
0 votes
1 answer
80 views

How can I have my own custom invoice number pattern?

Hi Im trying to make different pattern for the invoice in Drupal 9. I have products with two kind of price one is for particular and the other one is for profesional. i would like to have two pattern ...
Nelkan's user avatar
  • 1
1 vote
1 answer
93 views

show "My billing information is the same as my shipping information." option when creating order from admin

I am using Drupal version 9.3.14. Option "My billing information is the same as my shipping information." gets available on checkout page automatically. But when creating order from Admin ...
Ganesh Chaudhari's user avatar
1 vote
2 answers
60 views

How to automate the creation of product types?

I'm using Drupal 9 with Commerce 2. I have a large number of product types that need to be created. I have for each product type which fields need to be added. Let's say this information is stored in ...
levente.nas's user avatar
0 votes
0 answers
101 views

Bulk update product variations weight

I've created a module for a custom VBO action. The action can be selected in the view, and the function is executed, but $request is empty and the selected product variation IDs are not available. ...
user3086053's user avatar
0 votes
1 answer
129 views

Combining line items in cart

I am trying to "hide" individual line item values on my shopping cart. Is there a way to combine line items (possibly based on a term applied to each) such that they show as 1 item with the ...
liquidcms's user avatar
  • 1,224
0 votes
0 answers
485 views

How to use striptags twig function in a commerce product template?

For a client I need a wysiwyg field on my nodes and commerce products so they can add <em> and <span>&nbsp;</span> tags in their titles. I display this title_nbsp field value in ...
MacSim's user avatar
  • 752
1 vote
1 answer
71 views

How do I recreate Ubercart's product attributes?

While rebuilding an old D7 site with Ubercart into a new D9/Commerce installation, among other problems, I stumbled upon this one. In Ubercart I can add as many product attributes as I want and make ...
ytsejam's user avatar
  • 11
-1 votes
2 answers
183 views

Creating a category page when using the Search API module

I’m trying to build a Drupal Commerce store which is going to be my first timer with Drupal 8+. However, the approach described in the Drupal Commerce documentation regarding the creation of a ...
crzpiot's user avatar
  • 434

1
2
3 4 5
79