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
0
votes
1 answer

Get a calculated price of 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, but don't see any promotions there. How can I get it? UPD: Tried to solve this problem…
Sizuji
  • 868
  • 2
  • 9
  • 26
0
votes
1 answer

Drupal 7/PayPal Express Checkout: How to set delivery options based on address

I have the "PayPal Express Checkout" Drupal 7 module installed and I need to ideally register what country the customer is checking out from and charge them a standard shipping fee, for example: UK: £4.50 EU: £12 USA: £20 Australia: £20 If this…
user1532669
  • 2,288
  • 4
  • 36
  • 72
0
votes
1 answer

How to display store fields from the product template?

I have a Drupal 8.7 site and the Drupal Commerce 2.14 module In the template of my store to display the field field_professionnel_cgv I use this code TWIG : {{ store.field_professionnel_cgv }} How to display this field from the template of my…
user12030855
0
votes
1 answer

How to create a condition with TWIG and Drupal 8 to check the type of store?

I have a Drupal Site 8 with Drupal Commerce. I create 2 types of store: personal_store professional_store I'm working on the template of my products and I want to display the code above only if the parent store is of type store_professional Is it…
user12030855
0
votes
1 answer

How to make a Drupal Commerce configuration entity revisionable

I have an Ember application on the frontend consuming Drupal's JSONAPI. Drupal has the commerce module installed. The ember application is requesting all product_types, and needs to display information about the product types. The product type has…
0
votes
1 answer

How to name twig files by the region they are in?

I am using Drupal with the Commerce Module to build a webshop. I am using the Commerce Cart Block to display a cart icon with the amount of items in the cart, in the navigation bar. Now I would also like to display the Cart Block on the Cart page,…
Mxkert
  • 346
  • 2
  • 5
  • 17
0
votes
1 answer

Drupal 8: Only add to cart if user has enough credits

I've a site where transactions are based purely on credits. No actual money is exchanged. In such a case, I want to restrict users from adding products to cart if they do not have credits to do so. In steps of how this should be accomplished, here…
0
votes
1 answer

How to overwrite commerce product details tpl.twig (commerce-product.html.twig) in theme template in drupal 8?

I created a bunch of products, but I need to style them per the designer's design. I know that I have to overwrite the template from /modules/contrib/commerce/modules/product/templates/commerce-product.html.twig but where do I put it in my…
Bipin Kumar Pal
  • 1,009
  • 2
  • 8
  • 16
0
votes
0 answers

Drupal commerce - Get all options from an option set

I have a drupal commerce website and I need to retrieve all options that are existing for my products. All of these options are in an option set called 'defaut'. My problem is that I can't find a way to get all these options (I need to check if a…
Spialdor
  • 1,475
  • 5
  • 20
  • 46
0
votes
1 answer

Drupal, invalid arguments supplied for foreach

I'm using Drupal Commerce and when I use some methods (the commerce_fees ones) I have this error : Warning : Invalid argument supplied for foreach() dans commerce_discount_usage_order_discounts() (ligne 1083 dans…
Spialdor
  • 1,475
  • 5
  • 20
  • 46
0
votes
1 answer

Drupal 8 Commerce 2: Placing an "Add to Cart" button in a custom product template

I've written a custom Twig product template 'commerce-product.html.twig', which uses fields such as {{product_entity.body.value}} and {{product_entity.field_picture.entity.uri.value}} to pull out specific data from my Product type and display them…
a000h
  • 47
  • 8
0
votes
1 answer

How to Subscribe to DrupalCommerce 2X Events for every new Order, Product etc is created

I need to be able to write a Plugin that gets the orders, product, etc., whenever a new Order, Product is created in DrupalCommerce 2X. but I can't seem to figure out how Commerce wants me to do it. I don't see any *events files that would give me…
0
votes
1 answer

Unexpected error when uninstalling drupal 8 commerce

I am trying to uninstall the commerce modules. I had purchased a template with the commerce modules and using the files with demo data from them. I have contacted the template provider and he has clarified the issue is not with the template and it…
Natraj
  • 1
  • 1
0
votes
1 answer

How "Subscribe to our newsletter" checkbox works for signup newsletter at checkout pages in Drupal

Can anybody tell the workflow of "Subscribe to our newsletter" checkbox at checkout page in Drupal commerce. Currently i need to sign-up a user for newsletter who has this checkbox checked after completing a checkout. But don't know how to make…
0
votes
1 answer

Multisite setup on Centos 7 Drupal commerce site

I have requirement of Drupal project which is a commerce website. We have used Drupal commerce module for the same purpose before. I have Centos 7 as my server with EasyApache installed. Everything is installed on the server to run Drupal project…
Arpi Patel
  • 775
  • 4
  • 10
  • 23