Questions tagged [drupal-commerce]

Drupal Commerce is an e-commerce framework built on Drupal.

Drupal Commerce is an e-commerce framework built on Drupal. The project started with Drupal 7, and it encompasses a strict set of core modules and works with essential contributed modules (Views, Rules, Tokens, etc). There are also a number of Drupal Distributions that combine contributed modules to satisfy particular e-commerce needs (shipping products, selling digital downloads, selling digital access, donations, etc).

The project's website contains information on the project's goals and architecture and is the primary repository for developer and administrator documentation. However, downloads and issue tracking are still handled on drupal.org through the Drupal Commerce project page.

208 questions
1
vote
1 answer

Drupal commerce - Calculate tax on custom line-item

I need to add an extra fee to the shipping price for delivery on holidays and sat/sunday So i created a custom commerce-line-item which would be added to the order on those days. But it won't calculate tax for that extra fee-item. Here is an example…
0
votes
2 answers

Drupal Commerce Ajax cart with added fields

Sorry for the really bad title but wasn't sure how to describe my problem in 10 words. I have drupal commerce and have made a view that displays the cart contents on top of the checkout page. Quantity is a text field so it is editable and I have an…
masimplo
  • 3,674
  • 2
  • 30
  • 47
0
votes
2 answers

What if administrator changes price of a product while someone is about to buy the product

I am using drupal commerce. I am facing a problem of price shown to buyer is different than the price what he finally pays. Suppose we have a product p1 with price x. If a buyer add p1 to his shopping cart and checkout. On review page just before…
user1122495
  • 23
  • 1
  • 3
0
votes
0 answers

Drupal 9 - Commerce 2 - variation switch results in ajax error

I'm building a drupal 9 commerce 2 site, one problem that I have is that the variation switch that works with ajax is having problems on the production server. I have analyzed the network tab of DevTools, the situation is the following: I go to a…
felipep
  • 2,442
  • 1
  • 28
  • 35
0
votes
1 answer

Using the Drupal commerce module for super simple single page checkout for one item

There are a mass of options when it comes to customizing the Drupal commerce module. What modules do I need to enable for a super simple checkout that looks like this (all on the same page): Single Item, with a few variations which modify the price…
stopshinal
  • 1,891
  • 4
  • 16
  • 24
0
votes
0 answers

Pre-built Drupal twig component - how to attain

I'm a Marketing/Web Designer working in the Drupal 9 CMS. I have experience with HTML/CSS/JavaScript, but we have limited developer support. Whats the quickest way to attain prebuilt twig components that we can add/incorporate into our CMS?…
Just_some_Noob
  • 139
  • 1
  • 1
  • 12
0
votes
1 answer

Can't install drupal commerce with composer error

can't install commerce by use composer, I tried both command : composer require drupal/commerce composer require 'drupal/inline_entity_form:^1.0@RC when I used "composer require drupal/commerce" I got error : "Your requirements could not be…
lee
  • 1
0
votes
0 answers

Getting access denied message on order review page for guest user in Drupal 9

I am using Drupal version 9.3.14 with Drupal commerce implemented in it. I want to enable the functionality for user to create order without login. I.e. user should be able to create order or buy product from the site as a guest user. Right now new…
0
votes
1 answer

Drupal Commerce API installation failed - TypeError: strpos() expects parameter 1 to be string

I have installed Drupal commerce on Druapl 8 site. I need to expose commerce features via an API. when I try to enable Commerce API module I am getting following error. TypeError: strpos() expects parameter 1 to be string, int given in strpos()…
MavenSanK
  • 1
  • 1
0
votes
1 answer

How to check the machine name of the product type?

I have the TWIG code below that works. It checks that "Produit" is in the name of the product type. My problem : I want it to check the machine name of the product type (not the title of the machine name), in my case product How do you do that ? …
frankky
  • 1
  • 2
0
votes
0 answers

How can I add Commerce Wishlist share mail template variables from form?

I am trying to add 2 additional form fields to the Wishlist Share form where the user input will be rendered in the email. I have been able to add the fields to the form, but I am not sure how to add the user's input in the email twig template. Here…
L. Rohr
  • 11
  • 3
0
votes
1 answer

How to limit access to a store page to the store owner?

I created a custom module to create a /store/ID/tasks page https://www.drupal.org/project/commerce How to limit access to this page to the store owner ? If the current user is owner of store ID 76, he can access this page : /store/76/tasks But if…
user13995839
0
votes
2 answers

drupal 8 commerce 2 - How to unpublish all published products and their products variations programmatically

I need to unpublish all "active" (published status == TRUE) products and products variations before every import of actual assortment on my site. How to do it programmatically? I see 2 ways to do this: via a direct query to the database. via…
Savage
  • 11
  • 1
0
votes
2 answers

How to make the address code on one line with TWIG?

I have a TWIG code to display the address of a store. Currently the address is rendered on 3 lines. How to make the address code on one line ? {{ store.address|render|trim|replace({'
': ' - '})|striptags|raw }}
user12030855
0
votes
2 answers

How to upgrade a module already distributed with Drupal Commerce?

Drupal Commerce 1 has included Crumbs 1.10. I need to upgrade Crumbs to 2.7, and this version isn't included with Drupal Commerce. How can I upgrade it without breaking Drupal Commerce distribution (and update) ? Thanks.
Maxime
  • 1
  • 2