Questions tagged [commerce]
One of the modules that implements an eCommerce framework and ecosystem is the Drupal Commerce module.
3,906
questions
-2
votes
0
answers
7
views
Is there's a way to redirect the user to the external link to complete the 3DS
we are doing an on-site payment gateway integration as part of createpaymentmethod we are creating a token and saving to the drupal's database now as part of creating a payment after review, if the ...
0
votes
0
answers
19
views
Random order IDs
Is it possible in Drupal Commerce to give random order IDs to orders?
Similar to the "Advanced Ordernumbers for VirtueMart" plugin (https://open-tools.net/documentation/ordernumber-plugin-...
-3
votes
1
answer
52
views
Is it possible to create an ecommerce website using the core alone?
I consider to create an ecommerce website using the core alone.
Products will be categorized firstly by content types and any such content type could include fields such as:
Price
Material
...
1
vote
0
answers
44
views
Minimum order amount
How to limit the possibility of completing an order less or more than the specified amount in Commerce 2?
For 7 there was a module: https://www.drupal.org/project/commerce_moa but not for 8+...
0
votes
1
answer
89
views
Do content types play any role for ecommerce product webpages?
Content types (Node types) have always been a great way to organize Drupal content, especially when combining blocks in nodes of certain content types and/or certain node IDs or preventing them from ...
1
vote
0
answers
36
views
How can I create a custom "Add to cart" form?
I'm developing a basic Commerce shop with Drupal 10.
The product type is clothing, which has a single product variation (product_size) and three different product attributes for that variation.
The ...
0
votes
1
answer
27
views
How can I restrict users to only see products of a certain store?
I am using Drupal 10 with Commerce 2. I would like to add a user, where the user can only see the products of a single store. For example, let's say there is Store A and Store B. I'd like to be able ...
-2
votes
1
answer
52
views
Commerce module can't be enabled [closed]
I have installed the Commerce module but when I want to enable it, it does not give me the opportunity to check the checkbox, do you know how I can solve it?
0
votes
0
answers
25
views
Shipping cost is not up-to-date on the order_information page. Checkout page displays shipping properly
It's a Drupal 8 Commerce site, and we just changed the shipping rate from 2,90 to 3,5€
Although the shipping rate appears just fine on the checkout/####/review page, On the checkout/####/...
0
votes
1
answer
46
views
User error: "funding_source" is an invalid render array key
This seems to be related to Commerce orders and the Symfony Mailer module. I intermittently see this error when a user attempts to complete the checkout process using Commerce PayPal:
Blockquote
User ...
1
vote
0
answers
42
views
Alter the address fields of the address module like adding a placeholder
I made a form with the FormAPI to update the address fields of the address module (with Drupal commerce) and it works well. But I saw a topic where you could generate the form with an address type ...
0
votes
0
answers
72
views
How to create an entity with a referenced entity [duplicate]
I work with Drupal Commerce but my question is more related to a custom entity which refers to a custom entity.
Concretely, users have a profile. This profile contains fields including a field which ...
1
vote
1
answer
32
views
How to add extra validate hook to the order information form?
I am trying to collect additional information on checkout to add to the order. I have added new fields to the order entity and then used hook_form_commerce_checkout_flow_multistep_default_alter to add ...
0
votes
1
answer
34
views
Order is not geting created, but transition is happening in cart
I am doing an Offsite redirection payment with Drupal Commerce.
I have a custom payment workflow defined in my_module.workflow.yml as follows:
order_linktypeplus_validation:
id: ...
0
votes
1
answer
26
views
How can I print a custom commerce_invoice field or custom commerce order field in the invoice pdf?
In In Drupal 9 commerce_invoice I created a custom field for an invoice number with machine name 'field_numero_de_factura' and every time I generate a new invoice, I can manually enter the invoice ...
0
votes
1
answer
52
views
How can I handle race conditions in a headless setup?
I am currently trying to build an eCommerce site. The functionalities are quite basic; there are products with limited quantities and customers can purchase those products. I've decided to use Drupal ...
0
votes
1
answer
102
views
Show message after redirection
This will be mostly a Drupal question rather may not have any relation to Drupal commerce checkout.
I have an Offsite Checkout redirect payment method in which I have a buildRedirectFrom as stated in ...
2
votes
1
answer
44
views
Discount for emails with specific domain
I am trying to apply a discount automatically for customers who sign up using emails from partner companies.
I tried using the conditions section with * or % as a wildcard, but that did not work
Any ...
0
votes
1
answer
50
views
Why is the Charts module not working for anonymous visitors?
I'm using the Charts module in my project. I've configured Google Chart in my custom view which needs to be shown to anonymous users. The view is shown, but the chart is not rendered for anonymous ...
0
votes
0
answers
49
views
Blind SQL Injection vulnerability?
What is the purpose of this unique ID appended to this class in Drupal 9 HTML?
js-view-dom-id-7881eb5bafcd4178e6af77ed45179be612e74557a6807989024fac282b24f164
I'm getting what I believe are false ...
2
votes
1
answer
29
views
How can I email admin when stock is 0?
I'd like to email the admin when the stock is 0.
In one option, I've tried to set a condition in rules based on the stock field, but I can't get the field to display in Entity has Bundle.
Are there ...
-1
votes
1
answer
31
views
Expand {product.variations}
In the product detail page I would like to display the price at the BOTTOM of the {product.variations}
Where can we alter the {product.variations} ?
0
votes
1
answer
60
views
How do you programmatically get custom content field data from commerce product?
Background: I'm creating a rule that runs after an order is submitted that checks all the line items for any backorder and emails the customer. In the PHP function I've been able to use ...
1
vote
0
answers
39
views
"Command theme:uninstall was not found. Pass --root or a @siteAlias in order to run Drupal-specific commands."
When I try to install or uninstall the theme via command, I am presented with the following error message.
Command theme:uninstall was not found. Please provide the --root or a @siteAlias to execute ...
0
votes
1
answer
34
views
How can I work with Twig when using the Display Suite module?
I am working with Commerce 2 and Display suite, i want to add a field to the presentation that when a product has a boolean field valued to true, do not display a field and display other with twig.
...
0
votes
0
answers
38
views
How can show a message for products that are not in stock?
I am implementing custom stock management in Commerce.
I followed the following steps.
I have added a stock integer field in product variant.
I have written a event subscriber which reduce this ...
0
votes
0
answers
16
views
Go back button in review step gets misplaced by PayPal smart payment buttons
I'm using Drupal 10.1 with Commerce 2.36 and a custom checkout flow with the multistep checkout flow plugin. I added Paypal checkout later. On the order information step the "Continue to review&...
0
votes
0
answers
9
views
Mixed Taxable line item don't work
I have a cart with
1 x Food (non taxable)
1 x Electronic (taxable)
Currently both items are being taxed.
I need the GST and QST to only tax the taxable items.
What is the proper setup?
0
votes
0
answers
14
views
What is the order item view path?
I need to allow admins to print off individual order items (line items) that relate to a specific product, and allow them to print off the order item using Entity Print. the order item has customised ...
1
vote
1
answer
43
views
Show the Quantity field on the product page but hide it on the catalog page
I created an "ABC Book" product, whose URL is https://example.com/product/1. I added the Quantity field from Administration > Commerce > Configuration > Order item types > ...
1
vote
0
answers
17
views
Show all attributes
I need All my attributes to display on the page.
Like this: https://www.lowa.ca/fr/produit/renegade-gtx-mid/
So if you select a color, you still see all sizes. With their availability
Also if you ...
0
votes
1
answer
18
views
How can I choose an attribute?
A product has Size and Pickup Location as attributes; Size can be S, M, L, and XL, while Pickup Location gives 10 choices.
The Pickup Location value does not affect the product price; that is only ...
0
votes
1
answer
61
views
Create custom field for shipping method
I'm trying to add a new field called Opening Hours for commerce_shipping_method bundle. I'm having hard time finding examples how to do this and those I tried didn't really work for me. In fact, not ...
1
vote
2
answers
140
views
Is Drupal Commerce compatible with Drupal 10?
Don't see this answered anywhere.
I have Drupal 10 installed, as a dev site cohabiting with a live Drupal 7 on the same server. I don't use composer for the D7 install, but can't get it to work on ...
0
votes
1
answer
56
views
Solr autocomplete does not work for Product Variations
I am trying to create a sitewide search using Solr. For this, I indexed Product Variations and Content entities as Rendered HTML Output. When I try to search for a content entity, the autocomplete ...
0
votes
1
answer
69
views
Are extra fields added with hook_entity_extra_field_info(). not available on product variation pages?
Is it generally impossible to render an extra field on product variation pages, because of how the variant fields are injected into product pages?
I added an extra field to the product variations with ...
-1
votes
1
answer
50
views
How do I install commerceguys/addressing and commerceguys/int
I am trying to install drupal commerce i have put the files in their proper place (folders etc) but its like i didn tdo anything because it is not working for me. What should i do
2
votes
1
answer
66
views
How to translate the administrative area in an address field?
I am currently trying to change the confirmation email sent to purchasers after checkout to Japanese, but I am stuck because I don't know how to change only the arrowed part of the image, which shows ...
0
votes
0
answers
40
views
How to use Commerce Product Options in Rules?
This questions is about Commerce Product Options version 7.x-1.0 and not 7.x-2.0, the 2.0 version does not have this problem.
The reason we're using 7.x-1.0 is because other module Commerce Pricing ...
0
votes
1
answer
49
views
Attach JavaScript to page with Commerce Events
I'm using hook_page_attachments_alter in Drupal 9 to add some JavaScript dataLayer calls to certain routes, but I also need to add some to certain cart events (i.e. add item to cart).
I've written a ...
0
votes
0
answers
10
views
How do I get the total amount when creating a payment method at checkout(Gateway Plugin)?
This is for a gateway plugin that I am developing. This is when the user is checking out and entering payment information, etc.
My Process
When the paymentMethodAddForm is submitted I create a ...
0
votes
1
answer
32
views
File Field client side validation not working
I am on Drupal 9.3.x
I just discovered that File Field in node entity form which is marked as required, not showing client side validation fail message. Rather it submitting the form and then showing ...
0
votes
0
answers
20
views
Example payment always sets the order to "Checkout: payment"
I'm using the Example Payment module to test payments for free stuff in Drupal 7 Commerce. It works, but after the last step in the checkout process, the order status is always set to Checkout: ...
0
votes
0
answers
18
views
How to write a custom action in Views VBO to print a batch of selected invoices
I need a custom action in Views VBO with Drupal Commerce to print a selected group of invoices to a browser print dialog. I have configured this as a src plugin and a custom twig template. Here is an ...
0
votes
1
answer
49
views
The Quantity field increments in decimals instead of whole numbers
Default installation of Commerce 2.x. The qty field for a product, when you click the up arrow to increase the quantity it goes from 1 to 1.01. I want it to go from 1 to 2 to 3, etc.
0
votes
1
answer
63
views
How to save a customer profile to address book in Drupal Commerce using JSON:API
In the commerce order checkout page, if you use "Save to my address book" checkbox in the billing address section, the address is getting saved to the user's address book. But if I am doing ...
-4
votes
1
answer
36
views
Can I use the Devel Generate module? [closed]
I have content type with the Product ID, Name, Image, Description, Category, and Price fields.
Will the Devel Generate module create sample products?
I have tried using it, but it generates some data ...
0
votes
0
answers
22
views
My product variation is not shown on the entity form
I have many products coming from a migration. This is working for most of the products, but for some of them, the /commerce/modules/product/src/Plugin/Field/FieldWidget/SingleVariationWidget.php ...
0
votes
0
answers
31
views
How can I list ordered items in the custom-made confirmation letter?
I use a simple custom module to send confirmation emails in Drupal 9 Commerce 2 for a custom order states.
I am basing my module off of the example shown in the handbook. The main module script ...
0
votes
1
answer
68
views
Single product with multiple variation types: set-up for a product (book) that's available as hardcopy and as downloadable file
I'm searching for an approach for selling printed books as well as e-books in different file formats with Drupal Commerce:
Hardcopy (variation type 1)
PDF file (variation type 2)
ePUB file (variation ...