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
91 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
65 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
61 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
41 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
49 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
15 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
26 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
82 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
12 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
30 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
101 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
26 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
52 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
30 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
29 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
53 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
27 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
83 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
248 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
39 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
78 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
vote
0answers
30 views

Help me write a Rule condition and action to remove discount line item and to add payment

I am trying to write a rule for an existing order. Order has a zero total due to (Commerce) discount, e.g.: Widget $3.00 Discount -$3.00 For the condition, I'd like to check if a specific discount is ...
0
votes
0answers
36 views

Manually sort Commerce 2 products within the taxonomy term (category)

I have a view to display my products (categorized by taxonomy term) in the frontend. I have another view admin/commerce/products to add new products in the backend. How do I implement and configure ...
0
votes
0answers
9 views

Strong commerce order line items grouping

I need add to cart some Order Line Items grouped to don't allow the user to remove or change the amount of one of them without changing the other too. I can't do this with a unique Order Line Item ...
0
votes
0answers
17 views

Variation injection into product view

Problem Our requirement is a promotion slider on product canonicals that promotes similar products. We also have the stock module installed, and show a little banner that says "currently out of stock"...
0
votes
0answers
22 views

Access Denied when Sellers add new product

We created a store with Drupal 7 Commerce. Because we wanted to let specific users create new products on our store, a user role Seller was also created with the following permissions: Create, edit, ...
0
votes
0answers
21 views

Add helper text to payment method form

I would like to add helper texts to the different options in the payment methods form, in Drupal Commerce, like this: /Radio button/ Payment method 1 Helper text option 1... /Radio button/ Payment ...
0
votes
0answers
22 views

Order date from order_entity in commerce-order--pdf?

I need an invoice of an order, so I use the print pdf module, but the date is missing. I have tried the following code from commerce-order--admin but it doesnt get any data. <h3 class="entity-...
0
votes
0answers
26 views

Global attribute in Drupal Commerce 2

Got a question. How to create a global attribute in Drupal Commerce 2 that will use the added value to existing variations. Or as an option, the choice in the variation of 2 or more variants of the ...
0
votes
0answers
18 views

How do I implement a booking solution with “blacklist” dates?

I need to create a simple restaurant table booking system in an existing Drupal Commerce solution. I need to be able to book up to 10 seats (just one sitting per day to start with). I have got this ...
0
votes
1answer
21 views

How do I render the page to add products into my custom module?

Here is my code <?php namespace Drupal\mymodule\Controller; use Drupal\Core\Form\FormBase; use Drupal\Core\Controller\ControllerBase; class HelloController extends ControllerBase { public ...
0
votes
0answers
19 views

How to edit the line item manager widget in Drupal Commerce?

On the Commerce Order edit form, we can add a product manually. Using the autocomplete field Product SKU, you may find the exact product you need to add by browsing among SKUs. Unfortunately, I can ...
1
vote
2answers
208 views

Change remove from cart button to an image button

I want to change the remove-button, that removes line items from the cart to an image button representing a trash can like this: The code I am using in a custom module looks like this: <? php ...
0
votes
2answers
24 views

How to change the value of a commerce token?

When an order is submitted on our D7 site an email is sent to us with all the details of the order, including the payment method. I use the token [commerce-order:payment-method] in the commerce email ...
0
votes
1answer
37 views

Change order item title in cart

I would like to update the title of a order item before it's put in the cart to add some extra dynamic info for the user. I tried this but nothing changes. In the onCartEntityAdd function: $item = $...
0
votes
0answers
9 views

New Products using Price Tables unavailable on display pages

Recently one of my sites started displaying odd behavior. One product type uses Commerce Price Tables to offer quantity price breaks. Lately new products of this type have been displaying as ...
0
votes
0answers
18 views

Problems displaying images on the product display

I have the following problem: I have some variations of products with a color field and another field for weight measurements and a field for images (6 images). Each product variation has 1 image at ...
0
votes
0answers
28 views

How do I allow administrator users to make offsite payment for customers?

When I want to create an order and complete payment on behalf of customer as an admin, I have all the flexibility a customer has, except, now I don't have option to any offsite payment gateway. The ...
0
votes
1answer
34 views

Get a calculated price from Product Variation

I created a promotion with offer type - Fixed amount off each matching product and applies to - Specific product. In my custom block I get the product entity and try to get the calculated price via ...
0
votes
0answers
72 views

Drupal Commerce Post Update Error using Drush updb

Just update drupal and am trying to run drush updb but getting commerce post update errors. Module Update ID Type Description commerce_order 10 post-update ...
0
votes
0answers
34 views

Commerce_paypal doctrine/annotations error

My site's core and modules are completely up to date including commerce. I'm trying to install commerce_paypal via composer require drupal/commerce_paypal. I've tried --with-dependencies and also (~)...
0
votes
0answers
10 views

How to show referenced products on the individual page view of a product

I use Page Manager to override the individual product display node. I use a panel to show the product. In each product variation the shop owner can reference multiple products via a custom-created ...
0
votes
1answer
20 views

Show active taxonomy term as title of product category view

Commerce kickstart comes with a view named Collection products that shows: a Collection of products (Product display). In the relationship's tab of this view there are 2 relationships: 1. Product ...
0
votes
0answers
15 views

How to programatically link payment with an order in Drupal commerce?

Version: Drupal Commerce 2.x. I am creating orders programatically by following the instruction from the documentation. I looked for various resources but couldn't find any way to link payment with ...
0
votes
0answers
17 views

Commerce | Can the billing profile be shown on the Order view screen when it has been re-used?

In Commerce 2, the first time a user places an order a billing profile (customer) is created and when their order is accessed or view the billing information is displayed. However, on any subsequent ...

1
2
3 4 5
73