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
-4
votes
1answer
19 views

How to build drupal 8 eCommerce site [on hold]

I would like to build my first eCommerce site which will sell products from different categories. Site also going to have affiliate links. I have searched online and see many useful information but I ...
1
vote
1answer
26 views
+100

Custom Commerce Payment Gateway - Order Information Form

I have followed the documentation at https://docs.drupalcommerce.org/commerce2/developer-guide/payments/create-payment-gateway/getting-started#step-3-create-a-payment-gateway-plugin My ...
-1
votes
0answers
12 views

Theme suggestion for commerce-cart-form input--submit buttons [duplicate]

I have a Drupal Commerce cart view (overview of the cart). In the form 3 buttons are rendered. delete-order-item button update list button checkout button I want to create 3 specific theme ...
-2
votes
0answers
21 views

The Commerce Node Checkout module isn't ported to Drupal 8. Has anyone found another solution? [on hold]

I basically need the functionality of Commerce Node Checkout https://www.drupal.org/project/commerce_node_checkout in Drupal 8. Has anyone been successful selling "Nodes" with the commerce module ...
0
votes
1answer
13 views

How can I make entityQuery('commerce_order') return completed orders?

Under Drupal Commerce 8.x-2.13 I find that the query Drupal::entityQuery('commerce_order') with no conditions attached returns ONLY incomplete orders (when called in the context of an API endpoint)...
0
votes
0answers
15 views

Change the order of line items on checkout

How can I change the order of the line items on the checkout? What I have now is Subtotal (excl. VAT) VAT Shipping cost (excl. VAT) Order total (Incl. VAT) Though the calculation is correct, this is ...
1
vote
1answer
38 views

How to make Shipping services available in Rules tokens (data selectors)? [closed]

I am using D7 and Drupal commerce, with a flat rate shipping service. In my country the VAT for both products and shipping costs must be included in the total VAT amount. But the only line items ...
0
votes
0answers
9 views

How to debug callback function in hook_menu()

I am building a small payment method for Drupal Commerce. When calling the external payment service (Swish) I get a http response saying that the request was successful. After this request and ...
-3
votes
0answers
23 views

Return to the product page

Is there a way when a customer purchased a product but want to return the product to edit that in the excisting order? There is not a functional RMA module for Commerce2 so far.
0
votes
1answer
14 views

How to print name of Payment Method in Commerce 2 order receipt email?

The commerce-order-receipt.html.twig contains a variable called {{ payment_method }}, which returns no data. Likewise, when I add Payment Method field to my orders table view, it shows no data. ...
0
votes
1answer
21 views

How can I create a product with a single variation for a store?

I am having trouble with creating products for a commerce project with multiple sellers (each with their own store). The products these sellers are selling is a baseball card. When a user adds a new ...
0
votes
2answers
27 views

How to do automatic card authorization during checkout process?

I have a website that uses Drupal Commerce, we use Authorize.net for authorization and use AcceptJS as a plugin. When you put in the credit card information, it checks with Auth to make sure that you'...
-1
votes
0answers
6 views

Ajax reverts changes made with hook_form_alter on commerce billing and shipping field

I applied the solution from this issue to my module: https://www.drupal.org/project/commerce/issues/1451132 But when I click on the "Edit" address field during checkout and billing information edit ...
0
votes
0answers
11 views

Commerce 2 checkout login pane conflict with registration form

I just encountered strange problem. I am using drupal 8 commerce 2 default "login or guest or register pane" When i try to login with existing user it validate registration required field. Please ...
0
votes
0answers
7 views

Configure Order Total Summery Format

I'm trying to configure the "Order Total Summery" format. My store has the following configuration: - Taxes are included in price: FALSE - Display taxes of this type inclusive in product prices: ...
0
votes
0answers
11 views

How do I include shipping cost in VAT calculation with Rules?

I have altered the order of the summary items in the summary cart, so that the shipping service is showing before the VAT line. Total amount excl. VAT and shipping 13 735 Shipping cost 160 ...
0
votes
0answers
16 views

How to show shipping service before VAT in summary?

Normally in carts the total amount incl VAT is the last line and VAT is the second last line. Or anyhow that is how I want my cart to look. But when I add a shipping service it appears after the VAT, ...
0
votes
1answer
25 views

Only allow 1 discount using commerce_discount

I am having trouble finding out how to only allow 1 discount per order. eg. a specific user role allows 15% discount on their order. We also have another discount set up that applies a further 15% on ...
0
votes
0answers
18 views

How can I get the address components from Commerce store entity?

I have an address field in a form I'm building with the Form API. I need to pull the address components from the Store's instance so I can set them in my form. I can pull other fields from from the ...
0
votes
0answers
17 views

Allow Order Item Type field to display on some products, but hidden on others?

I have two types of products on my website: Shippable Products and Non-Shippable Products. I have several Shipping Products set up. One of those Shippable Products needs a custom field to collect a ...
0
votes
0answers
62 views

Webform as checkout pane

We want to put a webform in a Commerce checkout pane. Webform allows to return a render array, as described in How to embed a Webform? $output['your_form_id'] = [ '#type' => 'webform', '#...
1
vote
1answer
75 views

How can I load a Store by user ID?

I am building a multi-seller commerce site, where a user can register and sell their product. I need to display a menu link if the user is anonymous to "become a seller", where they are directed to ...
0
votes
1answer
28 views

How do I include data from the order item type fields in the order receipt email?

I have created an "Event Registration" product type and order item type. In the order item type, I added fields for the registrant's name and job title. How can I print the submitted values for those ...
0
votes
1answer
31 views

Unable to add Quantity in Stock in Drupal Commerce 8 using Commerce Stock Module

I have enabled Commerce Stock Modules and its submodules 1. Commerce Stock API 2. Commerce Stock Field 3. Commerce Stock Local Storage 4. Commerce Stock UI Created a Product Type ABC and added a ...
0
votes
1answer
12 views

Views Add Link to product field missing

I have a search results View which list the (Commerce) products. I show the title and the image fields. I those fields to wrap in a custom <a> link tag. When I am adding fields, I miss the 'Link ...
2
votes
2answers
97 views

Allow some products to be sold only in bundles (groups) with some other products [closed]

I'm making a commerce site with Drupal 8 and Drupal commerce and I have a not so common request. Some of the products should be available to buy only in groups (bundles) with some other products. E.g. ...
0
votes
0answers
11 views

How do I retrieve tagged nodes as well as untagged?

I have a View, "Product Reviews", that retrieves all Product Review nodes (custom content type) that are tagged to the Product you're currently viewing. So, if you're on the page for Product XYZ, this ...
0
votes
1answer
24 views

Following Drupal 8 Commerce custom offer tutorial, but getting “name already in use” error

I am following the tutorial for creating a custom offer at the official Drupal 8 Commerce documentation. But I'm getting an error that I pasted below when I click on any of the conditions, and none ...
0
votes
0answers
21 views

Creating block of category 'commerce' to show shopping cart contents

I am new to drupal, and am trying to create a commerce page. I have created a basic page, and I am now trying to add a block which lists the products in the shopping cart. I am using an existing ...
0
votes
0answers
22 views

PHP Incomplete class Object Error on creating a custom Checkout flow Plugin in Drupal 8

I have created the custom checkout flow plugin in drupal 8. And added the required steps in it as per the the commerce2 documentation. See the code below. <?php namespace Drupal\commerce_custom\...
0
votes
0answers
7 views

How to change the product title shown on Commerce Registration pane on checkout

My question is linked to Commerce Registration during the checkout in the page where the user adds his information. Commerce Registration shows the product title instead of the product display title ...
0
votes
1answer
13 views

Hooking into page specific instance of checkout flow form

I'm working on manipulating the buttons used for the checkout flow of using D8 Commerce 2. I'm using MYMODULE_form_commerce_checkout_flow_multistep_default_alter but its changing both the form buttons ...
0
votes
1answer
78 views

Print custom product variation field in order email confirmation

Added custom field ('field_secretkey') under Commerce - Product variation (admin/commerce/config/product-variation-types). I am able to get this value in Orders view by adding the "Product variation"...
0
votes
0answers
23 views

Get price value in Webform submission

I'm trying to create a webform that has an entity selection element linked to an entity reference view that has a selection of products from the commerce module listed. So far this has all been ...
0
votes
1answer
40 views

Checking for string in variable fails in twig

I'm working on a twig template for use with a commerce product. Each product has a term applied to it like "Green Ball", "Yellow Ball", "Red Block", and "Purple Block". I'm trying to take the ...
0
votes
0answers
16 views

Commerce 2 onReturn order must stay at it's current state

I'm working on a new type of payment gateway with these steps: 1. The client is redirected to the payment gateway. 2. Client returns from payment gateway with payment information BUT THE PAYMENT CAN ...
0
votes
0answers
23 views

Creating a Product Display Catalog via taxonomy Drupal 8

I need to create a catalog system for a product range from taxonomy in Drupal 8 My taxonomy is structured like this : - Product Category 1 -- Sub Cat 1 -- Product 1 -- Product 2 ...
0
votes
2answers
67 views

How to prevent programmatically created blocks from caching

I've been working with Drupal 7 for a couple of years but am new to Drupal 8, and am just getting into building custom modules. What I have built is a module that alters Drupal Commerce in order to ...
0
votes
0answers
10 views

Setting up Drupal commerce orders being sent to company erp system

I am new to Drupal and therefore bear with me. This might be a really simple question. Instead of using any of the payment functionality in drupal Commerce 2x i want the order to be sent to my ...
0
votes
0answers
6 views

How do I email the file?

I am trying to send files 'purchased' with commerce file as HTML mail. I've created a rule that loops over the line items (commerce-order:commerce-line-items). I would like to get access to the ...
1
vote
1answer
17 views

Handling anonymous orders in custom commerce module

Drupal: 8.7.2 Commerce: 2.13 I have a custom module set up that adds the following functionality to Commerce: It prevents the user from adding more than one item to their cart. If they try to add a ...
0
votes
0answers
7 views

How can I make volume (tier) discount across multiple products variants

I'm looking for a solution to make it possible to give the customer a volume discount if he buys product A or product B. I tried with the module "Commerce pricelist" https://www.drupal.org/project/...
0
votes
0answers
10 views

How to mix preset amounts and a user entered amount in commerce

I am implementing donations functionality with Drupal commerce 2.x I have found a patch that allows for a direct checkout form (kind of "buy now" button) https://www.drupal.org/project/commerce/...
1
vote
1answer
28 views

Custom checkout pane for order comments not saving

I've created a custom checkout pane for commerce 2.x, Drupal version 8.7.x. I've added a textfield called field_order_notes on the order entity. The pane works, and I can run $this->order->set('...
-1
votes
1answer
43 views

Other twig syntax in templates

In some twig templates of the commerce modules, I can see the use of an alternate syntax: Ex. in commerce-cart-flyout-offcanvas-contents-items.html.twig : <% _.each(cart.order_items, function(...
0
votes
0answers
21 views

Altering Shipping/Billing address inline entity form

Now that Drupal 8 Commerce moved to Inline Entity Form approach. I am having trouble of altering Address for fields for the checkout... In the past I could do this: function ...
0
votes
1answer
23 views

How to change order currency in cart/checkout page?

I want to change the price of the order in the cart/checkout page. Let's say I have a product ABC with $100(USD) and I added that in cart. But after adding I want to change the currency to EUR and ...
1
vote
0answers
39 views

How can I round up price matrix percentage to two decimals?

I'm looking for a way to round the percentage from Drupal 8 Commerce Shipping Price Matrix module to cents in USD. Is this possible? I found this function in the commerce_shipping_price_matrix/src/ ...
0
votes
0answers
17 views

Error: Class 'Drupal\Component\Render\FormattableMarkup' not found in custome_module()

I have been working to insert a edit link for each row in a table for that... function my_sub() { $results = db_query("SELECT * FROM {my_form}"); $header = array(t('NAME'), t('EMAIL-ID'), t('...
0
votes
1answer
53 views

Capture amount on order state change

I would like to know if it is possible to capture payments by subscribing to order transition events. Example: Transaction mode: Authorize only On order placed - Capture some amount (application fee)...