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
1
vote
1answer
15 views

Why recurring order becomes completed immediatelly after payment (no fulfillment status)?

I'm using Commerce datatrans module which originally supports only offsite payments. However I added extra functionality for recurring payment and it works well. Only issue I have is that when method ...
0
votes
0answers
40 views

How to display the rendered entity of a store in a code?

I created a custom module for Drupal 8 and Drupal Commerce. It is used to display a link "Accept the conditions of sale" in the purchase funnel during an order. This link displays a modal ...
0
votes
1answer
18 views

Override of commerce-order-receipt.html.twig template not working?

My theme is using Bootstrap barrio theme (bootstrap_barrio) as a base theme. I'm trying to override Drupal commerce template modules/contrib/commerce/modules/order/templates/commerce-order-receipt....
-1
votes
0answers
19 views

Limit permissions to user [closed]

User A can add a product one time; user B can add a product 10 times; user C can add a product unlimited times. Limit access by user permission on Drupal 8. How can I solve it?
-2
votes
0answers
19 views

How do I programatically change a field widget in a form display?

I have an entity reference field. I want that field to use the simple inline entity form widget in some cases, and entity select widget in another case. Could you please help on how to do that?
1
vote
0answers
22 views

How do I write a behat test to go to user/UID/somewhere when I only know the username?

I'm trying to write Behat tests to verify my Drupal Commerce store. My test creates some users, so I know the usernames but not the UIDs (the UIDs are assigned by Drupal in the test, so they will be ...
0
votes
0answers
25 views

how easy it is to get the date when the order is completed?

I need to get the due date (payment) of the last order, but I got some kind of crooked code. I receive all user orders by request. $allOrders = \Drupal::entityTypeManager()->getStorage('...
2
votes
1answer
28 views

“Order items” view displaying removed items (variations)?

I'm dynamically removing items from cart with this function: static function _remove_product_variation_from_cart($variationId) { $orders = \Drupal::service('commerce_cart.cart_provider')->...
0
votes
1answer
60 views

How do I flag the update store automatically?

I created a flag to flag the stores. I want when a user updates a store, the store is automatically flagged. The code below does not work and there is no error message. I don't want to use the Rules ...
0
votes
0answers
6 views

Adding fixed price to Cash on Delivery payment method

How do I add fixed price with cash on delivery? I managed to add COD as payment method, but i cant ADD a fixed price. for example: i want, when the customer choose the COD payment method, to charged ...
0
votes
0answers
6 views

Changing the billing address on order informations page only closes payment information box?

On order information page during checkout process in “Payment information” block I see checkbox “My billing information is the same as my shipping information.” and it’s checked when page is opened ...
0
votes
1answer
105 views
+300

Allow shipping that is calculated using a base rate plus a rate per item?

I figured this would be built in, but it seems it is not. See here: I have two options: Flat rate: I can make it 9.99 USD, but then if it's 100 items, it's still 9.99 USD. I can make it 1 USD per ...
0
votes
2answers
35 views

Best way to set up attributes/variations

This is probably an embarrassingly basic question, but I haven't been able to find a definitive answer after a fair bit of searching. If you're setting up a store with Drupal Commerce (2.x, in Drupal ...
0
votes
1answer
21 views

How to round the total price, display without decimal? [closed]

I need to count on decimal places (tax, promotion, fee ...), but the total price must be mathematically rounded without decimals. Example: 2 x product1 CZK 424.00 1 x Product2 CZK 408.00 Subtotal CZK ...
0
votes
1answer
44 views

Save customer information at checkout

My customers are required to provide an address at checkout (Shipping information pane). They can also create an account after checkout is complete (Guest registration after checkout pane). But the ...
0
votes
1answer
19 views

JS scripts not loading on certain pages

When logged in as a user (not admin), some JS scripts do not load on certain pages. I found out about this issue because I am using the module EU Cookie Compliance and the scripts it uses (...
0
votes
0answers
14 views

Commerce 2 no available payment method [duplicate]

Using Drupal Core 8.9.3 and Commerce 8.x-2.20. I have a PayPal payment gateway (sandbox) setup and enabled. I have no idea why but it worked for some days and suddenly isn't available anymore. That is,...
0
votes
0answers
12 views

Commerce / State Machine: Custom workflow orders stay as carts forever

I'm trying to set up a custom workflow in Commerce. When I check out, the order is marked as "paid", but it remains a cart (it's shown under "Carts" not "Orders") even ...
0
votes
1answer
20 views

Send email to Commerce customer after order status is changed to Completed

I am attempting to develop a module that will send an email to a customer in my Commerce 2 store when that customer's order's status is updated to "Completed". I am basing my module off of ...
0
votes
1answer
26 views

Recurring Framework crashes with Datarans

I'm using Commerce Recurring Framework latest version (8.x-1.0-beta5) with Commerce Datatrans (also latest version, 8.x-1.0-beta1). When first payment happens (customer gets redirected to Datatrans, ...
0
votes
0answers
26 views

Wrong concept while 'creating a multi-vendor marketplace'

I am trying to create a multi-vendor marketplace with commerce and Drupal 8. What I mean by multi-vendor marketplace is that every user can: Create a new account with "Store Owner" Role. (...
0
votes
0answers
10 views

One Shipping method plugin or multiple Condition plugins?

What would be the best way to implement a shipping method that changes the rate amount depending on conditions that are not built in? For example, when I have an order that has specific quantity of ...
-1
votes
0answers
65 views

No charts (or graphics of any kind) on Commerce reports dashboard page? [closed]

I'm currently on Drupal 8.9.1 and using Drupal commerce 8.x-2.20 I've installed Commerce reports module latest version 8.x-1.0-beta1: https://www.drupal.org/project/commerce_reports and with it Charts ...
0
votes
1answer
17 views

Displaying products per store in a marketplace

Don't know if I am skipping an obvious available feature but I am not seeing it. I am building a marketplace, I have been struggling to display products of particular stores, visiting stores doesn't ...
0
votes
1answer
16 views

How to bring the REMOTE ID of a commerce payment into the checkout completion page?

We're running on Drupal 7.72 and using Commerce and Commerce Webform to take payments on the website. We would like to display the REMOTE ID (seen below) on the checkout completion page. We are not ...
0
votes
1answer
30 views

Order quantity increment condition for payment method

I need to set order increment quantities in my Commerce 2 website. The website has two stores: retail and wholesale. Customers who are shopping in my "retail consumers" store must have ...
0
votes
0answers
16 views

Ordered Item getting removed & total is incorrect when using \Drupal\commerce_order\OrderRefreshInterface::refresh

As an alternate solution to this issue https://www.drupal.org/project/commerce/issues/3019615, I tried the following EventSubscriber. <?php namespace Drupal\my_module\EventSubscriber; use Drupal\...
3
votes
2answers
95 views

How can I transition an order from fulfillment to completed?

I'm running Commerce Marketplace and provide store owners a back-end portal for managing their store. In their portal, they can view orders sitting in the "fulfillment" state with the ...
0
votes
0answers
18 views

Drupal Commerce 1: Not getting shipping methods returned

I have to rewrite our company's ecommerce modules to work with our new service, converting it from XML to REST. I have a function that implements hook_commerce_shipping_service_info() /** * ...
3
votes
1answer
604 views

During checkout, why is the customer skipping the payment step?

I have a situation during the checkout process where the customer is skipping the payment and moved directly to the fulfillment state. I'm using the Commerce PayPal module. Here's my checkout flow: /...
0
votes
1answer
36 views

The commerce_product.field_produit_labels field needs to be updated

almost every time I delete a field in my product types I get this message popping up in my dashboard : ENTITY/FIELD DEFINITIONS Mismatched entity and/or field definitions The following changes were ...
0
votes
1answer
16 views

Need to limit Commerce Shipping Condition to only fire if there are no items that do not match

We need the condition to trigger only if the cart items match the categories listed and there are no products that do not match. Is there a way to limit Commerce Shipping Method Conditions (Product-&...
1
vote
1answer
17 views

Content type 'Product Display' not available when creating new View

I am working through the "Advanced Product Display Listing using Views" guide here. When creating the new View, I do not have the option to select 'Product Display' as a content type. Is ...
0
votes
0answers
23 views

Commerce Cart is empty after adding an item to it until the cart page is reloaded

We have a strange issue where when an item is added to the Commerce Cart the cart is empty and the cart page says that the 'cart is empty'. However, simply reloading the cart page then show the item(s)...
0
votes
0answers
35 views

How do I completely uninstall version 2.19 of the module?

I'm supporting a Drupal installation (8.9.0) with commerce 2.19 installed. The customer wants commerce to become uninstalled. I've managed to get rid of the majority of commerce configuration. What ...
1
vote
1answer
17 views

Creating a grid of referenced Commerce products

I'm using Drupal 7 along with Commerce 1.x and I have created a content type that has reference field for Commerce Product entities. And now I would like to render a grid of referenced products i.e. ...
2
votes
1answer
79 views

How can I programatically add a shipping method to a store?

I am using Commerce with Marketplace, and am using the Shipping module. In my commerce marketplace, users become sellers via a custom form, where I create the store entity on submit. Currently, to ...
1
vote
1answer
21 views

How can I load the #totals property for the receipt theme in a custom module?

I am trying to manually output the customer's receipt on the checkout complete screen in a custom module. I have the receipt printing nicely except for the "totals" variable. My current ...
0
votes
1answer
48 views

Failing to uninstall a module because “The website encountered an unexpected error. Please try again later.”

It is something wrong with the Profile module I'm using together with the Commerce module and multilanguge module. I would like to uninstall all three modules and try to install them again, but it ...
0
votes
0answers
12 views

Update View When Filtering By Facet

We are using Commerce 7 to sell mattresses that may or may not have size variants like Single, Double, Queen, King. We have a facet filter on size that allows us to filter mattresses that are say ...
0
votes
0answers
17 views

Trying to manually print Commerce receipt in custom module but stuck on printing total/adjustments

I have a custom module that displays the Commerce receipt at the checkout complete screen. I have it all working except for the adjustments (tax, shipping, discounts) section. In my custom module I ...
1
vote
0answers
79 views

Access Denied upon order completion

in drupal commerce every time logged in as a authenticated user and can get all the way through checkout until I am redirected back to the site. redirected to this page: /checkout/15/payment/return/...
1
vote
0answers
24 views

Use Order Number in Receipt

I want to use the Order number rather than the order id. I'm using Commerce POS and it uses $commerce_order->id()to generate the id used in the receipt generated and receipt email sent. But in ...
0
votes
0answers
13 views

How to add another form mode(commerce_order_item) in add to cart formatter?

I need to configure multiple form mode(commerce_order_item) for add to cart formatter. By default add to cart points to add to cart form mode. I have created couple of form modes like quick add to ...
0
votes
0answers
19 views

When I buy a product and continue as guest, I get a random email. How can I remove it and keep it empty?

When I buy a product and continue as guest, I get a random email. I suspected it is coming from the anonymous user email (which might have been added), but when I checked the database, the anonymous ...
-1
votes
1answer
51 views

How can I collect a shipping address on the checkout flow?

I am using the Commerce PayPal module. PayPal is collecting the billing address, but I need to collect the shipping address on checkout. How can I collect the address? Do I add an address field to ...
1
vote
0answers
37 views

Order minimum quantities

I need to set order minimum quantities in my Commerce 2 website. The website has two stores: retail and wholesale. Customers who are shopping in my "retail consumers" store must have at ...
0
votes
1answer
63 views

What payment gateway should be used for invoice payment?

My Drupal commerce site supports multiple payment gateways. One of the payment types should be paying by invoice. That means if you select invoice payment type during checkout process you don't have ...
0
votes
1answer
15 views

Add to cart button not displaying inside custom text in drupal 8 views

I created a product display view in drupal8 to display the product. For this, I added some fields like product price, title, and " add to cart" form. When I call all the fields inside ...
0
votes
1answer
17 views

How to access backbone model from custom javascript outside of view

I was wondering if there is a way to access backbone model variable outside the scope of the backbone model/view.This is the backbone model: function (Backbone, Drupal) { Drupal.addToCart....

1
2 3 4 5
75