Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [plugin-craftcommerce2]

The tag has no usage guidance.

0
votes
0answers
13 views

Live Preview for Product not working in Craft 3 & Craft Commerce 2 [on hold]

When I click Live Preview while viewing a Commerce 2 product, I get the following error: To debug this I systematically removed pieces of code until I was left with an empty template, but I kept ...
0
votes
0answers
18 views

Commerce: Is it possible to determine if a customer has used a discount?

The client would like to offer a single-use discount after the customer's first order is processed – that will be sent in an automated email when the order state changes. Is there a way to determine ...
1
vote
1answer
27 views

Using a custom Commerce 2 Adjuster in a Craft Plugin

I wrote a little commerce 2 price adjuster that works fine if i place it in /vendor/craftcms/commerce/src/adjusters/FriendsDiscountAdjuster.php and register it manually in /vendor/craftcms/commerce/...
1
vote
1answer
27 views

getTransactionByHash() must be of the type string, null given

I'm building my first Payment Gateway (offsite gateway) for Commerce 2. This one is for Moneris. I'm hitting an error when the page returns the response. Argument 1 passed to craft\commerce\...
2
votes
1answer
49 views

Is it possible to import orders into Craft Commerce?

We have to migrate a CSV dump from a Drupal commerce shop to Craft Commerce. It is important to import ‘Order Email’ / ‘Username’, ‘Order Date’, ‘Ordered Items’ (Name or ID), ‘Item Price’. Address ...
0
votes
0answers
9 views

Shipping Amount not added to cart.totalprice in Commerce 2

The shipping cost isn't added on to the cart total price after the shipping screen, is there something that I've missed out? Included the code snippet for the shipping screen as follows: <form ...
1
vote
1answer
21 views

Craft Commerce 2: PayPal Express not working - Correlation id: unknown

I try to get PayPal Express running but have quite some difficulties. I use the default templates for testing and can get through the whole checkout and payment process, but then PayPal closes and in ...
1
vote
0answers
10 views

Craft Commerce 2: Get products which are availableForPurchase

I try to get all the products of a certain category which have availableForPurchase set to true. {% set criteria = craft.products.type( 'weine' ).relatedTo( cat ).search( 'availableForPurchase:1' )....
1
vote
1answer
16 views

User-determined price for a product variant?

Is there a way in Craft Commerce 2 to have a user-input price as a product variant? In my case, I'm offering several pre-set amounts for a donation product (each is a variant), but I also want to ...
1
vote
1answer
25 views

Is there a way to localise error messages in Craft Commerce 2?

I'm using Craft Commerce v2 on a Craft 3 Pro website. The checkout process of the shop includes a number of forms such as the ones that visitor can use to add or edit shopping and billing addresses. ...
2
votes
1answer
20 views

Craft Commerce 2 - get order data for plugin

I want to write a plugin which writes all the order data into a CSV file. Unfortunately the documentation for Commerce 2 isn't quite complete yet so I have difficulties to find out how to do the ...
1
vote
1answer
28 views

Upgraded to Craft 3 and lost my Commerce Gateways

I upgraded to Craft 3 and I went to my payment gateways and I have the old ones in there with no details such as keys. And my only gateway options are Dummy and Manual. I know there were changes such ...
1
vote
0answers
16 views

Complex shipping logics

In Craft Commerce 2, we have two shipping categories: PostNL, which is one of the Dutch main shipping methods, which we use for packages that fit in the mailbox. For this category we use the weight ...
0
votes
0answers
32 views

Custom Commerce product type URL from custom field

I've run into a dead end when trying to create custom URL's for a product type in Commerce 2. I want to create the URL from a custom field -- a Commerce Product field to be exact. This product does ...
2
votes
1answer
34 views

How can I show a list of product options as checkboxes in the cart?

In my cart (Craft3/Commerce2), I need to show a line item's possible options from a checkbox field called "productOptions", and allow the user to select the desired options. Based on the Craft Docs, ...
1
vote
1answer
60 views

Craft Commerce 2 — Remove Line Item (and other actions)

Knowing that all other actions besides update-cart has been deprecated I'm curious what needs to be passed with the action to remove a line item from the cart using a button as opposed to check a ...
2
votes
1answer
42 views

Getting previous order history in a Commerce 2 adjuster

I am trying to write a Commerce 2 adjuster that will apply a discount on all items from a specific type if a customer bought a specific item with another product type in the last year as well as a ...
0
votes
0answers
12 views

Unable to apply Free (0 costs) shipping to the cart

If shipping doesn't cost anything (0) the cart doesn't get updated. The controller returns (test ajax) cart without shipping method being updated. If shipping method isn't free, the method ...
1
vote
1answer
48 views

302 redirect when updating the cart via Ajax using Craft Commerce 2

I'm working on a site that has recently migrated from Craft v2 with Commerce v1 to Craft v3 with Commerce v2. Using Commerce v1 I was able to update the cart via Ajax and get a data object with the ...
1
vote
1answer
96 views

Craft Commerce 2: Subscription Payment Gateway

I am working in Craft 3 with the Commerce 2 plugin. I am trying to create new subscription plan there. But I am not able to do so because I don't have any Payment Gateway Installed that supports ...
1
vote
1answer
23 views

Is there a way to retrieve discounts for a product in Craft Commerce v2?

I would like to retrieve all available discounts for an eshop using the Craft Commerce v2. In Craft Commerce v1, I could use the following: craft.commerce.discounts.all() However, I can't find an ...