Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [drupal-commerce]

One of the modules that implements an eCommerce framework and ecosystem is the Drupal Commerce module.

0
votes
1answer
7 views

How to change the 'Quantity' label in commerce-order-item-add-to-cart-form

I'm trying to modify my 'Add to cart' form, changing the 'Add to cart' button text and the 'Quantity' label: if(strpos($form_id, 'commerce_order_item_add_to_cart_form_commerce') !== false) { $...
-2
votes
2answers
16 views

Adding extra buying option to product

I need to add extra buying option with some price in Create Product (Add a product). If a user checks on extra buying option then they need to add the price and that price will be again added to ...
0
votes
0answers
8 views

Commerce Recurring Order Item Types not showing in product variation dropdown?

I have installed the commerce 2 recurring module and following the documentation I should be able to select the Order Item Type when creating a new product variation. However the dropdown list only ...
0
votes
0answers
6 views

Edit Shipping Address on existing order

Is there any way to edit the shipping address on an existing order? I only see the billing address in the edit screen.
0
votes
0answers
24 views

This import is empty and if applied would delete all of your configurations

Customer bought a theme that has Commerce plugin installed with sample data. Anxious to get running and try out the new configuration system, I did what I do prior to Drupal 8.6. Commit everything but ...
0
votes
0answers
47 views
+50

Print commerce pricing attributes to email receipt

Users cannot see what size or color shirt they purchased in the email receipt because tokens won't print the attribute fields provided by Commerce Product Attributes / Commerce Pricing Attributes / ...
0
votes
1answer
15 views

Create a X discount for every Nth product from the same category

I know this is pretty complex task, I don't expect a solution, but a guide on where to start. (Drupal 7 is in question) I need to apply X% discount for every Nth products that are in the same ...
0
votes
1answer
26 views

How to automatically post a message with the discount on the site?

I have a store with Commerce 2 and Drupal 8. In my store I created a reminder of 20% on the whole site. I want a message to be posted on my site with the conditions, the percentage, the end date and ...
0
votes
1answer
13 views

How to create a theme function for overriding Address Field theming?

How do you create a theme function for overriding the formatting of an Address Field in Drupal 7? I didn't want to create a CTools plugin or work with render arrays.
0
votes
0answers
15 views

How to delete all items from a cart using Commerce Cart API [on hold]

Using Commerce Cart API I am able to delete single order items via DELETE /cart/{order}/items/{item}. But I am getting a 405 Method Not allowed error when trying to remove or clear all order items ...
0
votes
0answers
10 views

How to edit an order to add the shipping line item to prevent AJAX error [duplicate]

Using Drupal 7.61 and Drupal Commerce 7.x-1.14 (+ Commerce Shipping 7.x-2.3 and Flat Rate 7.x-1.0-beta2) My client has (probably) deleted the shipping line item for an order and he has tried to edit ...
0
votes
1answer
14 views

Display any discounts only at cart / checkout stage

I am selling furniture, I also sell furniture accessories. Both of these have their own Product Types. I use 'Commerce Discount', 'Commerce Discount Extra' and a 'Workflow Rule' to offer a 20% ...
0
votes
1answer
16 views

Send mail to product owner with Rules only when e-mailadress is available

As a follow up to previous questions asked by me: Send mail to product owner with Rules and Fetch Customer Profile from Line Items. I have the following question. I created a rule to send an e-mail ...
1
vote
0answers
27 views

Adding Price Attributes

I am searching how to add price values to existing product attributes in Drupal Commerce 2.X For Example: T-shirt price = $10.00 A product variation/color = Red = +$2.00 A product variation/size = ...
-1
votes
0answers
19 views

exposed filter expanding the drop down when we move to next page using pagination

I have an exposed filter which has some values and I am autosubmiting it on change. If I am choosing any value from the exposed filter and click on next pagination button, it goes to the next page but ...
-2
votes
1answer
32 views

Is there an option to cancel an order? [on hold]

I am using drupal commerce 2 for my site. I am unable to find the option for the admin to cancel the order. Is there any option for this?
-1
votes
0answers
27 views

How to get an existing field programmatically

I'm using Drupal Commerce for a website and a big part of the payment tunnel is handmade, all the forms, submit. I need to add a new part with the customer profile form to get the customer billing ...
-1
votes
0answers
18 views

Show the list of products with the Dawn theme view

I’m very new to Drupal. I’m working with Drupal 8, Commerce 2 module, and the Dawn theme. Dawn comes with a view (named “portfolio”) that displays a series of content types. I’m trying to get this ...
-1
votes
0answers
14 views

Reusing logged in user fields in customer profile?

Is it possible to reuse registered users details in the Customer Profile? e.g. [current-user:display-name] in the default value. I tried this but can't get it to show in the commerce checkout - uses ...
0
votes
0answers
14 views

How to bulk update (delete) Product Variations

I want to bulk select product variations for deletion, just like we can do with content and products in admin. I tried to duplicate the products admin view, and also creating my own, both throw ...
0
votes
1answer
24 views

How to manage catalog display of images for Commerce 2 product variation

I have created a custom product type and its variations are created with attribute 'Size'. If I create a new product with its multiple images, then the catalog view shows these multiple images instead ...
-1
votes
0answers
13 views

How do I use the wallet balance with some other payment method?

I have used the Wallet module and I customized it a bit. When users order something, the wallet is available as payment method on checkout. If the wallet balance is lower than the order total, the ...
0
votes
0answers
18 views

How to create a chart based on role count?

I need to create a pie chart on commerce orders according to user roles (for example, how many orders for people with a specific role). I have tried with Views and Charts but the aggregation on user:...
0
votes
1answer
23 views

Drupal commerce (Coupon & Discounts) - Alter rule condition

I have a drupal commerce website on which I have add the discout module to make discounts and coupons. I have in my backoffice a list of all the orders and I can modify them if I want. The problem is ...
0
votes
1answer
29 views

How do I remove product duplicates in a view?

In my view I have duplicate entities for my product list, this is different from Drupal 7 as you could use the distinct module. How can I remove the duplicates from my commerce product views in ...
1
vote
1answer
25 views

Sometimes the v=<version number> parameter is added to the product URL

I have a new Drupal 8 site running commerce. When I view a product, most of the time the clean URL is perfect. Other times, it has a version parameter attached to it. I can access the page and no ...
0
votes
0answers
15 views

How to load output an existing Commerce Line Item Type field in a custom form?

I need to output an existing Commerce Line Item Type field in a custom form and I can do this with a field from a standard Node but can't get it to work with Commerce Line Item types. The code ...
-1
votes
0answers
16 views

How do I add stock per location?

I have problems finding a way to add stock for a site with two stores, two stock locations and same SKU per product. field_available_stock_locations and field_stock_allocation_location are added to ...
0
votes
0answers
25 views

How to know the type of store?

Drupal 8 and Drupal Commerce 2.10 I have several types of store on my site and I want to modify the button Add to cart of all the products associated with the store type online (online is the machine ...
0
votes
0answers
11 views

How can I changed the commerce tax display label?

Is there any way or method to change the displayed label for Tax in the cart in Drupal 8 Commerce 2? The carts ends up looking like this because I have city, county, and state sales tax. But I need ...
0
votes
0answers
24 views

How to specify a condition if the store is not store_pro?

I created a custom module. If the owner of the current store does not have the marchand_premium role, the add to cart button is overwritten. I want to add another condition : If the store is not ...
-1
votes
0answers
19 views

Cant add to cart cant set store

I am trying to allow users to add the product to the cart using drupal commerce. I have a template file page__product.html.twig I wanted to pragmatically add the cart button. $order_item_storage = \...
0
votes
0answers
13 views

Want to display newly added field collection item on top

I have a field collection item named 'fields_projects' I have a view which display all the resumes in the database Now, when you click on edit link it takes you to the edit resume page. There is a ...
0
votes
1answer
22 views

Change Product type's referenced Variation type

Once a Product type is created, I cannot change Variation type in Product type. Is this a feature, or is there a way to change it? Is it safe if I change it in the database? This is useful because I ...
0
votes
1answer
15 views

Different attribute selection widget in a view

I have a product display that lists multiple products with various pack sizes. I added a taxonomy field to a Product for the attribute e.g. T shirt 1 pack T shirt 3 pack I have set the product ...
0
votes
0answers
11 views

Swap out Product_type images with Product_variation images

I want to be able to add images to both the Product type display node, and the individual variations. If there are no variations images, then show the product_type images, else show the ...
0
votes
1answer
25 views

How to cancel an order transition if failure is detected in Commerce 2 / State Machine

I'm trying to plug into order transitions in order to send my order to a custom fulfillment system. I have a transition called "send_to_fulfillment", and order states "reviewing" and "...
0
votes
0answers
22 views

Should a subscription entity be created when a user purchases a license?

I am using Drupal 8, Commerce, Commerce License, and Commerce Recurring in an attempt to create a recurring paid membership for a yearly subscription. I have installed the required patch and I have ...
0
votes
1answer
12 views

Add property to ProductVariationType via hook_entity_type_build()

Hy guys, I'm trying to implement a simple stock management in my e-commerce. The ProductVariation will have a stock_quantity field used to track product availability. I would like that ...
1
vote
1answer
66 views

How to customize the subject of a Commerce order confirmation e-mail?

Here you can learn how to customize the content of the order confirmation mail, but what about customize the subject of the mail?
-1
votes
1answer
19 views

Can I connect via REST services with a mobile app I will develop?

I'm thinking of developing an e-commerce with Drupal 8 and Drupal Commerce, but I need to know if I can connect via REST services with a mobile app that I would develop too. The app would need to be ...
1
vote
0answers
19 views

How can I display the subtotal in cart page without tax?

In my current cart page subtotal display including tax, I want to show the subtotal without tax. How do I apply the tax on shipping rate?
0
votes
0answers
30 views

Commerce ajax add to cart doesn't fire facebook pixel AddToCart event

I am trying to add facebook pixel AddToCart event when clicking "add to cart" button on my drupal 7 commerce site. The first problem i see is that the button is not a button element but an input ...
-1
votes
0answers
15 views

How can I add delivery charges to the line item?

I want to add delivery charges to the line item coming from variations field if users select for delivery to add into line item and the order total so that charges can be collected from the user ...
0
votes
1answer
26 views

How do I add a color hex code field to a product attribute using drupal commerce 2?

How to add a color hex code field to a product attribute using drupal commerce 2 I can add the form field but do not know how to create the field type: color or the corresponding hex code. Thanks
0
votes
0answers
16 views

no data is stored in cache_form table (Ajax 200 error)

I am using Drupal 7.59 and Drupal Commerce 7.x-1.14. After we updated our PHP version from 5 to 7 and migrated our database to AWS RDS. We started getting a lot of Ajax 200 error(Invalid form POST ...
0
votes
1answer
9 views

Drush hangs out on dl commerce_kickstart

in recent days new version of Commerce Kickstart 2 was introduced (v2.55). I tried upgrading my current installation (v2.54) using drush: drush --debug dl commerce_kickstart unfortunately after this ...
0
votes
1answer
36 views

How to create a teaser of a product

I want to create a product catalog in drupal 8 commerce 2. I have some products created, I also created a database index and in the view (Home>Administration>Structure>Views) I want to show 'rendered ...
0
votes
0answers
6 views

Can not “add to cart” from front page

I am using Drupal Commerce for Drupal 7, when I try to add the product into a cart from front page it sometimes works and sometimes it just redirects to /node? (nothing after ?). Views and website ...
1
vote
1answer
46 views

How to display the path without alias?

With Drupal 8 and Commerce 2.10 I created a php code to display the link of my store. When I go to the link, it displays: https://www.domaine.com/shop/name I want to display without alias: https:/...