New answers tagged

1

The solution is apparently to add $query->accessCheck(FALSE);.


0

To achieve this in views, you have to add a relationship named "Commerce Line item: Referenced products" and it will fetch field from your product node.


0

FWIW, I found a work around that doesn't involve modifying core, though its much less elegant and only really applicable if you only have a few terms. It also requires the twig_tweak module. Basically I created a view block for each Related Products block filtered by one of the terms. Then in the twig template for the product view I created a bunch of ...


1

If the data about a product are not available when processing a "line item", you can make them available. To do so, use a technique similar to what is explained in my answer to "How to access commerce_product field of line-items using Rules to flag the Commerce Product?", which includes a Rules Component that looks like so: { "...


0

So I realized the Payment Process step was broken and it was doing everything leading up to that. It wound up being a subclassed PaymentInformation class that was set up improperly. I added a hook directing to the subclass and set up the subclass the correct way and it's all good now.


1

to get ALL orders of a user - get user ID ($user_id) then $orders = \Drupal::entityTypeManager() ->getStorage('commerce_order') ->loadByProperties(['uid' => $user_id]);


0

This patch (https://www.drupal.org/files/issues/2019-02-26/order_receipt_payment_gateway_and_instructions.patch) from this thread (https://www.drupal.org/project/commerce/issues/2884497#comment-12988057) fixed my issue. It required patching commerce_order.module and commerce_payment.module, as well as adding the display code to the order email receipt twig.


1

The code in my example was fine. In my product variation's display I was rendering the product entity, and in my product entity I was rendering my variant. If anyone encounters multiple copies of their product rendered, check how the fields are rendered in the display.


0

Is this a Drupal 7 or a Drupal 8 site? That will impact the admin URL as noted below: 8: /admin/commerce/config/payment-gateways/ 7: /admin/commerce/config/payment-methods/ You will want to edit the Authorize payment method, and look for "Default credit card transaction type" - that setting should be "Authorization and capture" as opposed to "Authorization ...


0

Your version of Commerce Discount is too outdated to support discount compatibility. However, it's so old, that the upgrade process may be complicated. Drupal Commerce itself is also currently at version 1.15, so that will need to be updated, too. I'd recommend creating a copy of your website and bringing those modules up to date, maybe even one version at ...


0

Figured it out! Took a few steps: I created a View of type: Order Item. Added my custom fields to that view (Job Title, etc). Added a Contextual Filter "Order item: ID". Provide Default Value: Content ID from URL. I created a Viewfield on each of my Order Item Types, using the View I created in the previous step. I went to /admin/commerce/config/order-item-...


Top 50 recent answers are included