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
2answers
36 views

How to remove a role after a user adds a payment method in Commerce?

I am trying to set up a subscription-based site in Drupal 8/Commerce 2. I'm using Commerce Stripe to process payments. I want to remove a role from a user ("needs to add new card" role) ...
0
votes
0answers
17 views

Integrating with Async Payment Gateway

Hey, I am new to Drupal and Commerce, I have to develop a Commerce Payment Gateway Plugin for a store in Drupal commerce 2.0, We have two options either an On-site Payment or Offsite payment gateway, ...
2
votes
1answer
65 views

Order item with persistent custom field value

Goal With Drupal Commerce, my goal is to have a customizable product with persistent user entered text. I have added a text field to the order item type and I can see the custom field in the "add ...
1
vote
1answer
25 views

Configuration - > Zones admin page missing?

I've installed Drupal Commerce 2 and as explained here: https://drupal-commerce.readthedocs.io/en/latest/v2/building-blocks/address/zones.html there should be a "Zones" admin page at ...
1
vote
1answer
31 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
1answer
185 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
vote
1answer
51 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
27 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
31 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
62 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
8 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 ...
-1
votes
1answer
45 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 ...
1
vote
1answer
170 views

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
54 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
31 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
63 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
64 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
15 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
183 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
40 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
13 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 ...
0
votes
1answer
20 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
66 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
38 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
121 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
22 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
634 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
88 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
21 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
20 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
29 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
64 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
100 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
27 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
117 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
20 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
89 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
31 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
16 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
56 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
90 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
159 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
37 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
46 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....
0
votes
0answers
20 views

Default value for Commerce email

For some reason i don't need customer email, but commerce (Commerce 2 on Drupal 8) can't send email (order receipt) only to admin...you need the customer email as well. I'm trying to set default email ...
0
votes
1answer
49 views

How can I reset render cache on an entity for current user in hook_entity_view_alter()?

I have Commerce products for which I'm showing or hiding the add-to-cart link, if that product is or isn't in the current cart. In my code: function mymodule_commerce_product_view_alter(array &$...

1 2
3
4 5
76