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

Non-admins cannot see commerce entity bundle labels

I've got a drupal commerce site with two types of user roles -- admins and merchants. Merchants the ability to administer products for their stores, and so they have the Access the products overview ...
user avatar
  • 1,761
0 votes
0 answers
10 views

Results from "end date" in date range excluded from Views results [duplicate]

I have a view of Commerce orders, and I need to add an exposed filter to filter the orders by date range. I have added two exposed filters for Order: Placed. One filter is "greater than or equal ...
user avatar
  • 1,236
-4 votes
0 answers
22 views

Use Stripe webhook in retrieve transaction intent [closed]

I want to retrieve transaction intent of stripe using webhook. How can we retrieve transaction intent I want to add order number in the stripe. As per the current commerce_stripe module does does not ...
user avatar
0 votes
1 answer
27 views

How to refresh and reload (with ajax?) order checkout panes and order calculation independent from commerce cart refresh (e.g. billing address change)

I have following problem: During checkout, my customer has to fill in his billing address (at least at the first time) to calculate VAT rate and gross price. Further calculation is done via an order ...
user avatar
  • 129
0 votes
0 answers
28 views

What event is triggered when adding an order line item manually from orders admin page?

I cant seem to find the correct event that is called when an admin manually creates an order item by clicking the 'Add new order item' button at: /admin/commerce/orders/430/edit I believe it should be ...
user avatar
  • 57
-2 votes
0 answers
17 views

How can I add a new tab to the product page?

I am logged-in as administrator user. After I add a product, I am redirected to this page, where I want to add a new tab. How can I achieve this?
user avatar
1 vote
0 answers
43 views

CartEvents::CART_ENTITY_ADD vs OrderEvents::ORDER_ITEM_CREATE

What is the actual difference between these two events? Is it simply that OrderEvents::ORDER_ITEM_CREATE is triggered for order items added in any way (like both from front end cart and from back end ...
user avatar
  • 57
0 votes
1 answer
25 views

How do I create sell product samples on the fly?

Our site sells fabric by the roll, not by the yard. Each roll is a unique one-off. Due to inconsistencies with color, we offer samples. It's unfeasible create sample Products for each roll Product we ...
user avatar
  • 11
0 votes
0 answers
16 views

How do I selective limit Product Attribute values when using them as an Exposed Filter in a Product list View?

I'm using the Commerce module 2.x. What I have: Product Category taxonomy List of product categories Product Color product attribute List of product colors It has a Product Category entity reference ...
user avatar
  • 11
0 votes
1 answer
22 views

How can I alter an order item field depending on inline entity form (IEF) validation?

I extended my order item type with an additional boolean field. Before the order item gets submitted via "order edit form" (/admin/commerce/orders/{order_id}/edit), it should be validated ...
user avatar
  • 129
1 vote
0 answers
17 views

How can we hide shipping information section if a user selects pickup shipping method?

Using Commerce 2, we have created a flat rate shipping method for Local Pickups. Since the order is not shipped for local pickups, we would like to avoid users have to enter their shipping ...
user avatar
0 votes
2 answers
32 views

Checkout Flow Submit Pane Form Checkbox to Boolean Field

I create a Checkbox in the Checkout Flow, CheckoutPane. How i can send the Value of the Checkbox to a Entity in the User-Profile or the Order. Description: I need a Checkbox in the CheckoutPane, when ...
user avatar
0 votes
1 answer
35 views

Best way to handle products with hundreds of different properties

I've started building a large Drupal Commerce shop for my customer. The customer has about 30000 products: clothes, electronics, decor, candies, etc. That means that in the shop there might be ...
user avatar
0 votes
1 answer
46 views

I can't see custom action

I am trying to create a custom action for bulk operations on commerce orders. I am using the following code. mymodule/src/Plugin/Action/DeleteOrderAndApps.php namespace Drupal\mymodule\Plugin\Action; ...
user avatar
  • 888
0 votes
1 answer
22 views

How do I print a view field content from Order field in the order receipt email?

I have a view field on the Order type that displays content from a webform submission that is associated with the order via the Commerce Webform Order module. This view field successfully displays ...
user avatar
  • 1,236
0 votes
1 answer
15 views

Modify cart view to allow direct quantity updates

In want to modify the cart view so that when costumer change quantity of item in cart, it will update cart and total price automatically and immediately through AJAX (instead of when pressing button ...
user avatar
0 votes
1 answer
14 views

If content not published, hide also for admin

I have a entity browser which list my produts. The products are shown only if they are published. But for some reason, if the product was added before the filtered "publish" was set, the ...
user avatar
  • 25
1 vote
0 answers
47 views

Reload commerce_cart_form view

I'm coupling Drupal commerce, DC add to cart ajax and commerce flyout modules. This is my view configuration : On my /cart page, I have the initial form (the view) to change the quantities, delete ...
user avatar
  • 25
-3 votes
1 answer
37 views

How do I add an exposed form to search products?

I installed the Search API module and followed the documentation to set up an index and a search box using views and facets. It doesn't show an exposed form to search, even though there is a view and ...
user avatar
0 votes
0 answers
22 views

Looping through media item field in commerce product template

I am currently building a commerce shop. Usually, I use embed, entity browser and dropzone js, to make a product images collection available to shop administrators. This time, I used a Drupal media ...
user avatar
0 votes
0 answers
36 views

Off-site payment gateway success/failure return is caught by a differnt custom module

I have created an offsite (redirect form) payment gateway Drupal 8 module for Opayo.co.uk. following drupal commerce documentation. Issue: My custom off-site payment gateway module based on form ...
user avatar
1 vote
0 answers
14 views

Commerce - empty cart of EXISTING items when adding new item of specific order item type

When an item of a specific order item type is added to the cart, I want to remove any existing items from the cart, but keep the item that has just been added. I presume CartEvents::CART_ENTITY_ADD is ...
user avatar
  • 57
-2 votes
1 answer
22 views

How do I capture bank account name, number, branch code, etc. in checkout for offline processing?

The Commerce Bank Transfer module claims this is part of Commerce 2.x, but I am not sure how to accomplish it. Any suggestions would be appreciated.
user avatar
  • 2,476
0 votes
1 answer
17 views

Default product URL for a pager

Does anyone know how to get around the view error about the default product that doesn't have a URL? The Commerce module has a default product and the view pager works without a More link, but it ...
user avatar
1 vote
0 answers
14 views

How do I decide where to put these fields in a Commerce License architecture?

I'm creating a License Type using Commerce License. It will allow a user that owns a group to purchase seats on that group for other users. Therefore, at purchase time, I need to associate a group ...
user avatar
  • 111
1 vote
1 answer
63 views

Drupal Commerce Product Variation SQL Injection Vulnerability

A PCI scan on my site is saying that there is a SQL Injection vulnerability. But where it seems to be indicating it is on pretty basic Commerce functionality. When visiting a product variation page ...
user avatar
0 votes
1 answer
41 views

Change product price title in form

How can I access the label of the product price field to change it for example to "amount" instead of "price"? The html for the field is: <div class="js-form-item form-item ...
user avatar
  • 733
0 votes
0 answers
34 views

Set minimum commerce product price

I want to set a minimum price that can be entered in the product add/edit form of Commerce. If users enter a lower price, an error should be displayed, when they click on the save button. I am using ...
user avatar
  • 733
1 vote
1 answer
58 views

Commerce order delete and order item delete events

Quick question I hope someone can easily answer. There are two order events for order delete listed here: https://github.com/drupalcommerce/commerce/blob/8.x-2.x/modules/order/src/Event/OrderEvents....
user avatar
  • 57
0 votes
0 answers
11 views

How to add multiple items to the cart in one go - whilst including "order item type" with extra fields - Drupal9

I had this working using multiple AJAX cart submissions in D7 - using AJAX_Cart and https://www.drupal.org/project/commerce_add_to_cart_extras I'm now trying to find an elegant way to achieve the ...
user avatar
0 votes
1 answer
21 views

Event called when an order line is removed

In Drupal Commerce what event do i need to subscribe to when an order line is removed? This questions talks about an order being removed/deleted: Which events are invoked when an order is removed or ...
user avatar
  • 57
2 votes
0 answers
19 views

Error while trying to create a local task for user order history

I am attempting to add a local task here (/admin/commerce/orders/{order#}). This local task should contain a view that takes the userid from the current order and displays that users order history. I ...
user avatar
0 votes
0 answers
24 views

How do I save a specific "state" of the product in the order item?

I'd be necessary for my site to save "a specific state" of the product(s) and relative variation(s) purchased in the order. I mean, with the "standard" Commerce configuration, in ...
user avatar
  • 470
0 votes
1 answer
18 views

How can I access or expose the Commerce data in $order->data[] to the Rules module?

Following this old checkout_pane_example.module tutorial, I created a custom Drupal 7 Commerce checkout pane. It's simply a text field to collect special order instructions from the customer. ...
user avatar
  • 3,774
0 votes
1 answer
17 views

Where did my commerce token go after an update to 7.87

My Drupal 7 commerce setup sends out a couple of emails after an order is placed. It uses this token: [commerce-order:commerce-customer-shipping:commerce_customer_address] After updating to Drupal 7....
user avatar
0 votes
1 answer
40 views

Setting $order_item->setUnitPrice($price, TRUE);) stops cart items being merged, how to prevent this?

Drupal Commerce 2, with Drupal 9. In the CART_ENTITY_ADD event, if i set $order_item->setUnitPrice($price, TRUE); identical items added to the cart get added as new order items, but I want them to ...
user avatar
  • 57
0 votes
1 answer
43 views

How to get Commerce price without any adjustments

I'm trying to show "Buy for XX USD more and get free shipping", I know how to get $cart->get('total_price')->getValue()[0]['number'] but it is including any adjustments including ...
user avatar
1 vote
0 answers
13 views

Is there a way to stop Commerce from hiding the customer address info when adding a user?

We are using Phone 7.x-1.0-beta1 only because it is required to perform API calls to our ERP. After upgrading to Commerce 7.x-1.16 the address info under add user is collapsed by default. Since the ...
user avatar
  • 11
0 votes
0 answers
12 views

Commerce2 product add to cart button with price D9

I'd like to alter submit button in add to cart form to show "Buy for 9.90 USD" I made function MYTHEME_form_alter(&$form, $form_state, $form_id) and I'm able to change submit button text ...
user avatar
0 votes
1 answer
15 views

Product parameters on add to cart form which not changing product variation

I have a phisycal product with many many combinations. E.g.: a mug which is available in 20 different colors and with 30 different prints. This means 600 combinations. We don't have stock. We don't ...
user avatar
  • 1
0 votes
0 answers
12 views

Render a commerce checkout pane programmaticaly

I need to render the order review pane in a (ajax) controller. What would be the simplest way to programmatically get the order review pane markup ?
user avatar
  • 325
0 votes
1 answer
46 views

Customer profiles cannot hold more than 1 values, even when allowing multiple profiles per user

I have custom API that creates new Customer profiles with different addresses / emails: $profileStorage->create([ 'type' => 'customer', 'uid' => $this->currentUser->id(),...
user avatar
  • 374
2 votes
1 answer
70 views

Safely save data to the order in onNotify()

I'm new to Drupal and have to make an off-site payment gateway (with Drupal Commerce 2). It all works, but sometimes it doesn't. The remote payment provider's server sends notification requests to the ...
user avatar
0 votes
0 answers
33 views

How can I set the purchased entity for an order item?

We have migrated products and orders from a Drupal 6 site to Drupal 9 site. We had a product type dues for which we already had products in the existing Drupal 9 system. So we skipped the migration of ...
user avatar
0 votes
1 answer
53 views

Get the value of Entity reference revisions field in order email twig file

I want to get the entity reference field value in order email. Name of the entity reference is field_price_value and called paragraph field is field_price now I want to get the field price value I ...
user avatar
0 votes
0 answers
19 views

Commerce: Required product SKU is missing

I searched a lot, but did not find a solution, import preview works fine (attached picture), SKU is mapped, but actual import does not import anything, ends with "Required product SKU is missing.&...
user avatar
-1 votes
1 answer
30 views

Set the quantity per product equal to value in input

I'm using the Commerce Ajax Add to Cart module to add a product to my cart using AJAX. I guess I'll have to do that by creating a patch. It's working fine, but I'd like to change how a product is ...
user avatar
  • 43
1 vote
1 answer
74 views

How to exclude taxes from total prices but still show the tax during checkout

So I create a tax type Custom and set the rate 18%. The checkbox Display taxes of this type inclusive in product prices. comes in checked by default. If I leave it like that, cart shows product price ...
user avatar
  • 537
0 votes
1 answer
21 views

Which attributes are used for product variations on the PDP (product display page)?

Let's assume we have one product with 2 product variations. Both the variations have 10 product attributes each; they are all filled with their option values, for example color = Blue, size = 10L, or ...
user avatar
0 votes
0 answers
18 views

How do I add a product variance title to the order information page?

I am looking to have the Product Title appear in the Order Information page. However, the data is pulling the price versus the product title. I attempted to change the views. No luck. I am not a ...
user avatar
  • 1

1
2 3 4 5
77