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
-2
votes
0answers
15 views

Drupal begins, shipping module, different prices for different cities

I hope someone can help me with my problem. I am migrating a woocommerce website to drupal commerce, everything was going well until I had to configure the product shipments. Woocommerce has a ...
0
votes
0answers
14 views

How do create /cart page html twig file in drupal commerce drupal 8

I am using drupal commerce module in drupal8. And I want to create a twig file to change the layout of cart page. Like I want to divide this cart page in 'col-sm-4' in three part. for this I am not ...
1
vote
1answer
23 views

Drupal Commerce and large product inventories

Does anyone have any insight into using Drupal commerce with a large inventory? We are utilising using Drupal 8.1 headless and scoping an eCommerce integration using Drupal Commerce with around 30 ...
0
votes
2answers
34 views

Commerce 1 or Commerce 2?

I am not a developer although I have been using Drupal since it came out 19 years ago. I have an existing D7 Ubercart site that works well, but I want to move to Drupal Commerce. I have installed ...
0
votes
0answers
9 views

Adding a value to shipping cost by product type

Actually i have a drupal 7 with commerce, and only one product type with his shipping cost. I want to had 2 new product types (easy) but i want also to add a special amount when this types are on the ...
0
votes
1answer
17 views

mysqlnd with php7.3 on debian buster

I ma quite new to drupal . I've tried to install commerce 2.x on debian 10. However, php-mysqlnd is only a virtual package referring to php-mysql. there is no real mysqlnd and commerce gets stuck with ...
0
votes
0answers
20 views

How can you calculate shipping costs by weight and city?

I am using commerce in drupal 8. What I need is to add some conditions in shipping cost like the following: if the weight is less or equal to 3kg then: For Athens 5.00€, Outside Athens 6.00€ ...
1
vote
0answers
30 views

Drupal Commerce 2 updating with composer

I am a retired civil servant -- NOT a developer by a long shot -- and while I have used Drupal for about 19 years, I am new to composer and drush and Drupal Commerce 2. I was able to successfully ...
0
votes
1answer
27 views

Composer cannot find drupal/commerce in a specific module

I'm attempting to update the dependencies of a specific module in my site. I've downloaded the module with git and navigated inside. If I run composer validate it says ./composer.json is valid. ...
-2
votes
0answers
19 views

How to set up the test account on the Worldpay module?

There are no instructions for setting up Drupal commerce 2 and the Worldpay module. https://www.drupal.org/project/commerce_worldpay I am trying to quickly set up a test account. The Worldpay ...
0
votes
0answers
9 views

No referenced products available when using other than Add to cart formatter for product reference field

I trying to render all referenced product entities in a grid format (using view mode full for products) but all of the referenced products are missing from variables/node (field_referenced_products['...
0
votes
1answer
98 views

Creating commerce users programmatically

I need to import customer data from CSV files with billing and shipping data using Drupal 8.8 and Commerce 2. I want to create the customer with its address data programmatically, but i do not know ...
0
votes
1answer
30 views

How do I configure the recurring node checkout payment?

In the past years, I use commerce node checkout to published a node when the user checkout completed. Now I want to automatically, charge user when their node published expired. How can I link the ...
1
vote
0answers
15 views

Customizing the checkout form

I need to fill Billing Info form with data that the user has filled in another page of my commerce site. I've made a hook_form_alter with the following weird code (with the help of kint): function ...
0
votes
0answers
14 views

Theme suggestion for file link in on commerce product page

I'm listing some files for download on a commerce product page and I want to customize the output. I'm trying to get a theme suggestion for file-link.html.twig but I'm failing to get them to work. I'...
0
votes
0answers
10 views

social_auth_decoupled with oauth2token

I am using social_auth_decoupled to log in via social networks (google and facebook). The platform uses simple_auth, but social_auth_decoupled doesn't give me access_token and refresh_token, is there ...
0
votes
2answers
48 views

Is there a Grouped Product listing type in Drupal Commerce

I have a Magento site I would really like to migrate to Drupal Commerce. The one must-have feature is Grouped Product. A grouped product will have a base product from which the product listing will ...
0
votes
1answer
11 views

How to add as exposed filter a product attribute in Commerce's orders view?

I have a drupal 8 commerce website. The Orders page is a view that comes with commerce where all the orders are listed. Is it possible to add/create ( on the website or programatically ) an exposed ...
1
vote
2answers
44 views

How do I update customers cart prices and add discount and then let them checkout?

I'm using Drupal 7 Commerce and Commerce discount, amongst many others. So the use case is this. We often get enquiries for bulk orders containing many products. We want our customer to go to the ...
0
votes
0answers
11 views

Commerce product with multiple sub-attributes

I have a commerce product type called events that will be used to make reservations. For each event (let's say Congress xyz) I need to associate multiple items (let's say Session n) with a date and ...
0
votes
1answer
44 views

Commerce 2 Twig and Retail Price

I have a use case that I need to add the retail price on a receipt twig next to the discounted unit price. Ive tried every possible field syntax I could think to try, looked everywhere and stumped... ...
0
votes
1answer
20 views

How can we define twig template based on checkout flow in Commerce 2.x?

I am using Drupal Commerce 2.x. I try to build different twig templates based on the checkout flow. So, I use hook_theme_suggestions_HOOK_alter to register other theme suggestions. However, I can't ...
1
vote
1answer
32 views

Modify the store for hundreds of products [closed]

I have a drupal 8 commerce website with 2 stores (store1 and store2). Most of the products belong to both stores but there are a few that only belong to either one. Now, I need all the products (...
0
votes
1answer
43 views

Shipping method and shipping service from a placed order

Im trying to get the shipping method and the shipping service values after i place an order on a Drupal 8 commerce website so i can use it inside an email im sending the website's owner (not the ...
0
votes
0answers
55 views

Sometimes an item is not added to the cart, despite message “xxx was successfully added to the cart”

I have built a custom module for my D7 site that shows a dialogue when the user opens the cart. In the dialogue a few more items are suggested to the user. If the user chooses to tick the box in front ...
0
votes
0answers
23 views

How to know if a field_config_instance is safe to delete

What I did, and my findings: I installed commerce_product_bundles module for D7, and found that it leaves 5 orphaned field_config_instances in the database after uninstalling: commerce_unit_price, ...
0
votes
1answer
63 views

Automatically generate product variations

I'm creating a webshop with Drupal Commerce. I have a product variation called T-shirt. It has three product attributes, color, size and print. My problem Let's say I need a T-shirt with 5 ...
-1
votes
1answer
58 views

How to display the store url in a TWIG Message?

I have a Drupal 8 site with the Commerce and Message modules. In my TWIG Message I can display the title of the parent store of the product, but I cannot display the url of the parent store. How to ...
0
votes
0answers
11 views

Adding CSS in both custom theme and admin theme

How to modify some css to a tapir_table display being used in both places: in my custom theme and administration theme Specifically, i would like to make the qty and sku columns displayed on both ...
0
votes
0answers
28 views

How do you programmatically get the shipping information from a placed order?

So far I have a working piece of code that sends me an email ($to variable) when a new order has been placed on my drupal 8 commerce. This is not the email the person that places the order gets. As ...
2
votes
1answer
36 views

How do I programmatically empty a cart?

I want to empty the cart before a product in the code. I tried $this->cartProvider->emptyCart($cart); But this did not work and gave an error. I am doing this in Drupal 8. I am adding products ...
0
votes
0answers
36 views

how to check if content type is

I ve got 2 type of commerce product.1 is the product the other is another type of product commerce. I want to check if the product type is then you can do something if not do another thing. Notes: ...
0
votes
0answers
11 views

MY_MODULE_entity_bundle_field_info_alter not firing in multistep commerce checkout page

I am trying to add a custom validation constraint $fields['field_phone_number']->addConstraint('CommercePhoneNumber'); via MY_MODULE_entity_bundle_field_info_alter but am having trouble getting the ...
0
votes
0answers
24 views

Field is required, but server side validation is not catching it

I have a multistep checkout form in my commerce module. Inside Order Types i have added a field called Phone Number and set it to required. And then I have a custom module which has a ...
0
votes
1answer
11 views

Add payment to a commerce order using Rules

I am trying to create a component that can add payments to an existing order.(the payment is received offline). However, when I try to add an amount I receive the alert that the field is not writable (...
1
vote
1answer
78 views

It is correct to change unit_price of commerce_order_item programmatically under several conditions?

I am developing a module that allows you to select additional options for a product that is not a product or a purchase entity. It's like commerce_option but for D8. My inspirations come from Product ...
0
votes
0answers
11 views

Add property labels from address field properties in the view display

I use address field module and added this field to my customer profile (for Drupal Commerce integration). In the form you see decently the labels above the input fields (frontend). After filling in ...
0
votes
1answer
28 views

Latest update to 8.7 with Commerce caused Edit buttons to appear in place of shipping/billing information

After updating core to 8.7, the input fields for shipping and billing information are now hidden and Edit buttons are in their place. This has allowed users to checkout without entering shipping and ...
0
votes
0answers
21 views

Can't remove product attribute field from product

I've created first product type which allows products to have multiple variations. It has product variation and product attribute "flavor" and it works well. Then I've created second product by ...
0
votes
1answer
71 views

Could not find package with stability dev in a version installable using your PHP version

When I want to install Drupal Commerce using Composer via Git Bash terminal and using the following command: $ composer create-project drupalcommerce/project-base mystore --stability dev I get the ...
0
votes
1answer
24 views

Programmatically create new Schedule Updates Entity Reference on Node

I’m attempting to populate an entity referenced field created by the Scheduled Updates module within a content type, Event. Within Event I have two Scheduled Updates fields to check and uncheck the ...
0
votes
1answer
40 views

Double values (products) in Commerce cart form

I use Drupal Commerce version 8.x-2.15. I have a multilingual Drupal site with multiple languages based on domain. mystic.com -> EN language mystic.eu -> NL language etc I added relationships: (...
0
votes
1answer
29 views

Print title in commerce-product.html.twig

I try to create a custom product template commerce-product.html.twig. The changes work well except except the title. https://docs.drupalcommerce.org/commerce2/developer-guide/products/displaying-...
0
votes
1answer
28 views

How to update cart after deleting line items?

I have an Application (app) node that when it gets created (hook_node_insert) I add line items (based on info in the app) to my cart. This works great. Step 2 now is that when I add a new app, I ...
-1
votes
1answer
43 views

Multi-Vendor Marketplace functionality is not completed in Drupal 8 commerce

I was at the edge of launching a Multi-Vendor Marketplace with Opencart which is quiet as easy as installing an extension and I am ready to go ! However, I am better in Drupal Development and I like ...
2
votes
0answers
26 views

How to display billing information associated with with stored Auth.net payment information?

I am newish to Drupal and have been trying to print out the billing address data from the saved payment method information labels in drupal commerce checkout. The payment processor is Auth.net, using ...
0
votes
2answers
61 views

How do I per-variation add to cart button with no selection?

I have a table that displays rows of products with there attributes, the last item on each row has the variation add to cart form. The view's self sorts on the product id to display all the ...
1
vote
2answers
236 views

How can I make the coupon code field in commerce mandatory?

Using D7 commerce coupon/discount modules. I need to make the coupon field mandatory. Every order needs a coupon code entered. There is no standard "required" checkbox on the field and I tried using ...
1
vote
1answer
28 views

How to use % arguments in Easy Breadcrumbs “Paths to replace with custom breadcrumbs”

I am trying to give a more logical breadcrumb flow to the Drupal Commerce 2 checkout path, as Commerce doesn't support breadcrumbs in the checkout process. When not displaying the current page in ...
1
vote
0answers
63 views

Inline entity form field alter

I am using Drupal Commerce. For the Variations, I am using multiple add /remove via AJAX. I need to make field readonly. 0 -> <input type="number" name="variations[form][inline_entity_form][...

1 2 3 4 5 73