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
0answers
6 views

Unable to Edit Commerce Checkout Flow Settings

When attempting to configure Checkout Flow instances (eg, /admin/commerce/config/checkout-flows/manage/default) clicking on the 'Settings' (cog) icon for any of the panes generates an 'AssertionError' ...
-1
votes
0answers
27 views

“Drupal\migrate\MigrateException: A product variation type could not be determined for the product type: product_display”

I am trying migrate a site. Immediately after I start the upgrade visiting /upgrade, I get this error. The website encountered an unexpected error. Please try again later. In the error log, I get ...
0
votes
1answer
26 views

How do I get product variations in a preprocess function?

I'm trying to do something like this. function clientname_preprocess_commerce_product(&$variables) { $product = $variables['elements']['#commerce_product']; // Get the product variations and ...
-1
votes
0answers
16 views

How do I avoid users can click on the “Add to Cart” button multiple times? [closed]

This issue appears to be specific to recent versions of Google Chrome (both Windows and macOS), Safari on macOS, and Edge on Windows. Firefox doesn't show this issue. Multiple clicks on the Add to ...
0
votes
1answer
21 views

How can I write an if else statement in Twig based on commerce stock quantity?

Building a D8 Commerce site and trying to hide the price if the product is out of stock. I can access the stock value with this: {{ product.variation_field_stock_level.0 }} I've tried this: {% if ...
0
votes
0answers
20 views

Is there a way to allow administrator users to enter a credit card payment?

If we: Go to COMMERCE->ORDERS->CREATE_NEW_ORDER Create a new order by filling in customer and product information Save the order Then go to the PAYMENTS tab and click ADD PAYMENT All we get is ...
1
vote
0answers
46 views

Why doesn't my checkout flow work?

I am working on a site that integrates with our company's ordering and payment system. I have a flow I need to create that, after the customer clicks the checkout button, it takes them to a login/...
0
votes
1answer
28 views

Separate the login page [closed]

We are using Drupal Commerce on Drupal 8 for our webshop. We require users to register to buy stuff. We will have very few returning customers. Is it possible to only show the registration pane and ...
1
vote
1answer
20 views

Condition in variation product template is not triggered correctly (ajax caching ?)

I have a commerce project with a specific product type using an attribute to generate variation. Variation product has two specific fields that I want to hide switch attribute. I implemented ...
0
votes
0answers
17 views

How do I include data from commerce_order entity in the order receipt email (twig)?

I have created a custom field "field_jour_de_retrait" in commerce_order entity. I would like to print value field in the commerce-order-receipt.html.twig? I tried to add {{ commerce_order....
0
votes
0answers
26 views

How to redirect customers to my payment gateway's authentication page on an onsite payment gateway [closed]

This is on Drupal 8 using Drupal Commerce 2 I'm implementing an onsite payment gateway that can support 3ds authentication to credit cards from MasterCard/Visa. How can I redirect customers to the ...
0
votes
1answer
25 views

Sales Tax Exemption for an Authorized User?

I have my Drupal Commerce store set up to apply my state sales tax on appropriate purchases. I also have an authorized user who has a state-approved sales tax exemption. I'm trying to configure my tax ...
0
votes
0answers
29 views

Commerce Number Pattern

My system environment: OS - Windows 10 64-bit Local Server Stack - WampServer Drupal 8.9.8 Theme Droopler Module Commerce - installed using Composer and enabled by Drush The Status Report (screen ...
1
vote
2answers
51 views

LogicException: The database connection is not serializable - when I try to open any “gear” on checkout flow page?

So I'm on Commerce -> Configuration -> Orders -> Checkout flows. I'm editing a flow (it's the same with any of them), so i.e. I'm at page: /admin/commerce/config/checkout-flows/manage/...
0
votes
0answers
25 views

Problem with CCAvenue Module - Order not generated after successful transaction

I am using Drupal 8 module of CCAvenue. For some reason I am not able to get it work, I have used both the modes - Test and Live. Actually the issue is when I place an order and click on checkout page ...
-1
votes
0answers
27 views

How to display the rendered entity of a display mode in a modal?

My site is built with Drupal 8.9.8 and Drupal Commerce 2.21 I created a module for my marketplace (several stores and owners). It displays a required checkbox, in the purchase funnel. With a link to ...
1
vote
1answer
25 views

How do I change the original language of a product type?

On a multilingual site with commerce project I've created a product type while having one language selected as default but now I want to switch it to a different one. On /admin/commerce/config/product-...
0
votes
1answer
27 views

Is checking the value of $order->status sufficient to understand when an order has been completed?

If I want to use this hook in order to execute a code when the order is complete. function hook_commerce_order_update($order) { if ($order->status == 'completed') { // ... } } Is this ...
0
votes
1answer
29 views

Access orders with own products

In my store, i am allowing customers to create products like Courses using Drupal 7 Commerce module, Is there a way using views or whatever method to enable the sellers on my site to see orders placed ...
0
votes
1answer
32 views

What is the difference between the “complete” and “ checkout complete” order statuses?

I am using the Drupal 7 Commerce module. I would like to execute a special code when the payment of the order is completed. What is the difference between checkout complete and complete? I googled and ...
1
vote
1answer
19 views

With Commerce Product taxonomy term view, is there a way to have page title set to the translated term title?

The only way to have the taxonomy term name in the title of a taxonomy term Commerce Products view page I've found so far is the example view in the estore theme (I still don't get how tid which ...
1
vote
0answers
45 views

How to display the rendered entity of a store in the purchase funnel?

I created a link that displays the "Terms and Conditions" of the store to which the shopping cart relates in a modal window. This link a page in a modal window. I want to replace the page ...
0
votes
0answers
17 views

How to display discount for each product in checkout page?

I am trying to display in checkout table the initial price, the discount and the final price of each product. I followed this and this but with no result because I cannot find the fields mentioned in ...
0
votes
1answer
27 views

Billing address missing for recurring orders

I'm using Datatrans module as payment gateway. Module does not fully support recurring payment, so I had to add some missing functionality. I added method createPayment: public function ...
0
votes
1answer
18 views

Custom ordering flow

I was wondering if it's possible to replace the default commerce flow with my own custom flow. As far as I know the default flow is following: Add individual products to cart on Product's detail page ...
-2
votes
1answer
23 views

How do I add/remove a user role based on subscription?

I have a product "Membership" that is set up as a subscription. When a user purchases this "Membership" I would like to assign them a "Member" role. How do I do this? I ...
0
votes
0answers
70 views

“Customer information #number” option appeared for sellecting shipping address?

After implementing ShippingOrderProcessor: https://gist.github.com/jsacksick/fde031197df92236ef5a916775e17a2e which I needed to show shipping costs on cart and order overview page (order summary block)...
0
votes
1answer
21 views

Expiration date on product variation

How can I set an expiration date on a product variation? I am building a webshop and my goal is to have an expiration date on a product variation, meaning the after a scheduled date, the product would ...
0
votes
0answers
20 views

Getting intermittent AJAX.js error on a Commerce site when changing product variation dropdown menu [duplicate]

We've been trying to troubleshoot this issue for weeks now without luck and am really hoping someone here can help point us in the right direction. We have a D8/Commerce 2 site with a **very ...
1
vote
1answer
45 views

ShippingOrderProcessor not registered well?

I'm trying to implement @jsacksick solution which should force displaying shipping costs on cart page (normally it doesn't exist at that step yet). I created a new module for this and it's structure ...
0
votes
1answer
10 views

How to detect order type (recurring or not) in order confirmation and shipping confirmation email templates?

When order is placed an emails is sent to the user generated with template commerce-order-receipt--default.html.twig When order is shipped another email is sent to the user, now generated with ...
0
votes
0answers
18 views

How can I make variations selectable in the cart?

Is it possible to have variations selectable in cart in D8 Commerce 2? For example I would like to change the color of a T-shirt from blue to green in the cart? Right now I only seem to be able to ...
0
votes
0answers
15 views

Custom JSON api normalizer is not initiated

I am trying to figure out how to make a custom normalizer for an entity work. I've added the normalizer to my services.yml with the required tag and arguments and run into no errors. But when ...
0
votes
1answer
37 views

How can I make a view block of related products?

I have read through the issue queue and read all kinds of documentation and made all kinds of settings in Views Contextual Filter and no luck at all. What can be the definitive way to make a Views ...
0
votes
0answers
19 views

Modify entity field from preprocess hook

I can't get how to modify an entity twig variable from a preprocess hook. It is easy enough to add variables to your twig templates but I don't get how can modify an entity predefined variable. In my ...
1
vote
0answers
28 views

Search API custom query processor [closed]

I would like to create a custom query processor to filter Commerce products, based on a user field and a product field. Users have a boolean field "hide special products", and products have ...
1
vote
1answer
40 views

Price resolver save custom field

I would like to update a custom field, added to my order items, in the price resolver process. The price resolver process do some sort of queries to select the right price and this selection has a key ...
0
votes
1answer
20 views

How To Set Order State Completed after Notification?

I am Writing a Payment Gateway(Onsite) Plugin For Commerce 2, I am Stuck with Checkout Flow Step Transitions. Let Me Explain: I am extending the OnsitePaymentGatewayBase and in the createPayment() ...
1
vote
1answer
20 views

How to patch a file that is not in a module's git repo?

I want to patch CheckoutCartEventSubscriber.php, which can be found in /web/modules/contrib/commerce/modules/checkout/src/EventSubscriber when installed via composer. So I cloned Commerce from the ...
0
votes
0answers
22 views

Cart form view - relation to product variation doubles number of rows?

I'm editing standard "Cart form" Drupal commerce view. I need to get some field from product variation, but by default setup it's not available. So I added relationship product variation and ...
1
vote
1answer
51 views

“You are not authorized to access this page.” in Chrome after returning from offsite payment

After concluding checkout flow on site I'm redirected to offsite payment service (Datatrans). There if I finish payment and I get redirected back to: /checkout/order_number/payment/return or I cancel ...
-3
votes
1answer
31 views

Can Onsite PaymentGateway Support Notification

I have seen many implementations of notification in OffsitePaymentGatewayBase Like WorldPay, QuickPay Can I Extend the OnsitePaymentGatewayBase class and use onNotify() Method for receiving Payment ...
0
votes
2answers
29 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
13 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
52 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
22 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
26 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
45 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
32 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('...

1
2 3 4 5
75