New answers tagged

0

A little digging and I figured it out on my own: Event handler for for this event: commerce_order.order.paid and with this handler code: public function paymentCompletedHandler($event) { $order = $event->getOrder(); $order->getState()->applyTransitionById('place'); return; }


1

You seem to misunderstand the term payment here. It should not be seen in the context of a regular payment that you make or complete in a store. In this context payments are entities and the events match those of database transactions (insert, update, delete, etc.). Theoretically the combination of these 3 events should allow you to determine if a payment ...


0

It's a result of your relationships: you're connecting each order item to the product it represents and then each product to each node that references it. Because of the way that database query works, it returns a unique result for every combination and renders them into your View. Judging by your View's configuration, this was the simplest way for it to ...


0

Here is the answer that worked for me: product.field_accessories[0]['#commerce_product_variation'].get('field_images')[0].entity.fileuri) And I looped over the product.field_accessories to get just the first image for each product


0

{% if product_entity.status.value == 0 %} {% set classes = [ 'is-unpublished' ] %} {% endif %} <article{{ attributes.addClass(classes) }}> .. </article>


0

by default drupal 8 uses commerce-product.html.twig. you can find it from modules/contrib/commerce/modules/product/templates/ and copy and paste it to your template folder in your theme. and to create separate template file for each product type you can add --product type at the end of file name. for example if you have shoes product type then you should ...


0

Solution is to add cookie to routes.yml file in .platform folder and than push it to the platform branch. After that currency resolver will work.


0

I think the typical issue is that because the address field value includes a country code by default, it's always assumed to have data ... so my guess is that whatever mechanism the Customer Profile Type UI is using to disable those sections of the order edit form isn't actually unsetting or otherwise removing them from the forms themselves. I don't have ...


0

I just wanted to comment on here about what to do if you're using the D7 version and come across this post (like we did). Here's the two relationships you will need to add in order to have SKU as a filter: Commerce Order: Referenced line items Commerce Line item: Referenced products


Top 50 recent answers are included