Questions tagged [plugin-craftcommerce3]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
0 answers
13 views

Commerce 3 - Register user and save payment source after order complete for guest checkout

We register and send account activation emails to guest customers after checkout using registerUserOnOrderComplete. We also want the guest customer to be able to save their payment card during ...
user avatar
  • 438
0 votes
1 answer
37 views

How to make a curl request with a session to an action url?

I am building a onepagecheckout for craft commerce 3. I created a custom controller to submit cart and payment info in one form submit. I'll call the default updateCart action with a curl request and ...
user avatar
0 votes
0 answers
13 views

How query the total sales of a selection of products in a specific time range in Craft Commerce?

I want to create a list of products and show how many times a product has been sold in a certain period. But how? I'll dived into the topProduct widgets and there they use a custom querie.
user avatar
2 votes
1 answer
46 views

How I'll get the orderId in EVENT_AFTER_COMPLETE_ORDER in craft commerce?

I'll want to update an orderStatus in craft commerce after the order is complete for a specific (digital) pruduct type. To send an extra email with download links, confirm email is already send based ...
user avatar
0 votes
0 answers
14 views

Use Craft Commerce for on-location Orders

I'm running a small physical shop besides my commerce 3 shop. I'm thinking about handling the orders in the physical shop also trough craft commerce and I wonder what would be the best approach. Idea: ...
user avatar
  • 3,664
1 vote
1 answer
40 views

Add custom field value to Commerce Order Confirmation E-Mail

in my confirmation e-mail i output all ordered items. now i want to add a custom field (the article number) from a product, but it does not show up. i show items like this: {% for item in order....
user avatar
  • 319
0 votes
0 answers
19 views

Email Template rendering issue with Verbb - GiftVoucher Email Attachements

I have the current problem that when I enable the attachments in the GiftVoucher Email Settings, the HTML emails are sent in plain text mode. (HTML of Email Template is visible) If I deactivate the ...
user avatar
  • 23
2 votes
1 answer
39 views

Craft Commerce: Multiple redirect submit buttons from cart form (checkout/update cart) without ajax

I'm building a basic cart page in Craft 3.7.37 with Commerce 3.4.12. The /store/cart page has a <form> with the line items in the cart next to an <input /> to change quantity and one to ...
user avatar
  • 55
1 vote
2 answers
77 views

Set Primary Billing Address and Primary Shipping Address

We have a site using Craft 3.6.11 and Commerce 3.3.5.1 We give users the options to create and account enter an address. Is there anyway to also have this address set as the Primary Billing Address ...
user avatar
  • 197
0 votes
0 answers
31 views

Need help combining an item with free shipping and an item with paid for shipping

Hi I'm going around in circles with Craft Commerce shipping functionality and I don't mind saying I'm pretty confused. This should, however, be fairly simple to solve... hopefully. My website has a ...
user avatar
  • 177
0 votes
0 answers
20 views

How can I programmatically remove an attachment from a Commerce email?

I use the EVENT_BEFORE_SEND_MAIL event (in Craft Commerce) to check if an order meets certain conditions. If true, the attachment that Commerce adds to the email should be removed. Is there a way to ...
user avatar
  • 6,288
1 vote
2 answers
88 views

Specific emails failing in queue

I have craft 3.7.11 with commerce 3.4.2 installed. The majority of site emails send correctly, but every few days, one order status change email fails. The prior emails for these orders send correctly,...
user avatar
0 votes
0 answers
13 views

Commerce 3: on user registration take adress also for shipping adress (stored in customer info tab in backend)

Not sure if i understand the user and customer relation correctly: i have a craft commerce site and want user to register. Right now if a user puts in all the information for registration, the ...
user avatar
  • 319
1 vote
1 answer
67 views

Commerce: Is there any way to give a discount for Product A if the costumer buy 3 Product B?

In Craft Commerce 3, there is a Order Condition Formula that allow us to condition for the discount. So here is my Case. I have product A and Product B, so I will give a discount to Product A if the ...
user avatar
  • 462
0 votes
0 answers
8 views

Sales not applying to products

I'm having trouble getting sales to apply to products. I'm running craft 3.7.2 and Commerce 3.3.5.1. The product I'm attempting to apply the sale to is marked as promotable. As far as the sale, I've ...
user avatar
0 votes
0 answers
46 views

craft commerce "Invalid payment or order. Please Review." on hasFlash('error')

Just trying to make a merchandise web shop with Craft CMS 3 and Craft Commerce 3. However, whenever payment is attempted to be made for merchandise on checkout page with commerce/payments/pay, there ...
user avatar
0 votes
0 answers
29 views

Commerce Trying to get property 'abbreviation' of non-object

I am getting this error after payment. payment is successfully done not redirect. And getting this error Trying to get property 'abbreviation' of non-object. I don't know why i am getting this error ...
user avatar
1 vote
1 answer
55 views

Checkout Without Payment

Recently Craft provide checkout without payment but not working for me. I followed the instruction of craft doc. set config variable: allowCheckoutWithoutPayment https://craftcms.com/docs/commerce/3.x/...
user avatar
0 votes
1 answer
61 views

Commerce search: return products containing keywords in related entries' fields

Craft CMS 3.6.11.2 / Commerce 3.2.17.4 We have a Stores structure section that contains fields (searchable) such as phone, address, etc. These Stores are assigned as Entries (searchable, max of 1) to ...
user avatar
  • 631
1 vote
1 answer
39 views

Get related variants from entry and then show products for related variants and then loop only the variants that are related in commerce

Struggling with this one. If anyone can help me...? I have a section of entries called Vehicles. In this I have a related Variants field type. This has many different variants that related to each ...
user avatar
  • 1,824
1 vote
1 answer
97 views

Do "update cart" and "complete cart" as one action

I am developing a site which has "normal" shop stuff that is added to cart and bought through the checkout process. But it also has to support submitting requests for food catering jobs. ...
user avatar
2 votes
0 answers
29 views

Craft Commerce - Stock And Cart

What if two people have the same item in the cart and it is the last in the stock one of those people finishes the purchase, then technically that product is no longer in the inventory that happens ...
user avatar
2 votes
2 answers
95 views

Craft Commerce: Frontend Validation on Address Fields

Yes I know there is this post But how do you do address validation in the frontend of Commerce 3? The problem is the way Billing Address & Shipping Address are set up. Billing Address are the same ...
user avatar
  • 3,664
1 vote
1 answer
38 views

In Craft Commerce, is it possible to make the product variant weight a required field?

In Craft Commerce, is it possible to make the product variant weight a required field? We are using weight to calculate shipping so it would be good if we could make it a required field to ensure that ...
user avatar
  • 65
2 votes
1 answer
32 views

Is there a way to get a variants stock quantity in commerce?

Like the question says. I know you can check if a variant is "in stock" with v.hasStock, but is there a way to pull the current stock quantity value? In my particular situation I would like ...
user avatar
1 vote
0 answers
75 views

How to programatically (e.g. in a custom a plugin) create a Discount Code? (Craft Commerce)

I've been working on some custom plugins recently to handle various bits of API functionality for the project I'm working on, and I'm now roughly familiar with Craft's OO approach to carrying out this ...
user avatar
  • 111
1 vote
1 answer
147 views

In Craft Commerce, is it possible to show a more meaningful error when the customer tries to add more of a product than is in stock to the cart

Currently, if a customer attempts to add a greater quantity of a product to the cart than is in stock, an "Unable to update cart" flash message in shown. e.g. there are 3 in stock and the ...
user avatar
  • 65
1 vote
1 answer
757 views

400 bad request ("Unable to verify your data submission.") when Adding product to cart

When a user tries to add something into the cart the following error appears: 400 bad request ("Unable to verify your data submission.") 2021-02-23 09:08:42 [-][-][...
user avatar
  • 3,664
1 vote
1 answer
35 views

Craft commerce 3 - Module - Lineitem - Get usergroup

I have the following code working. The only thing i have to do is to check which usergroup is the customer in. Is there a simple way to check what usergroup is the customer in? This is my first custom ...
user avatar
  • 13
1 vote
1 answer
174 views

Commerce new order error : mail::getRenderLanguage() must be of the type string

I just pushed an update to the latest version of craft cms and craft commerce and ran into an error that is blocking new orders from finalizing. Everything works on the local site. On the live site, ...
user avatar
  • 31
1 vote
0 answers
166 views

Craft Commerce 3 + Stripe for Craft Commerce, error while attempting to pay with iDEAL

I'm using headless Craft CMS + Craft Commerce 3 + Stripe for Craft Commerce plugin to create the webshop. My frontend is decoupled and built in Nuxt.js. I need to implement the payment form with the ...
user avatar
1 vote
1 answer
313 views

Remove item from cart

Ok, I'm getting pretty crazy here. I'm trying to remove a variant from the cart. Adding works fine, like this: <input type="hidden" name="purchasableId" value="{{ variant....
user avatar
0 votes
0 answers
36 views

How can I edit/change an existing customer's email address?

In Craft Commerce (v3), we have a number of orders of customers with a typo in their email address. I'd like to correct those email addresses in Craft, so I went to commerce -> customers. However, ...
user avatar
  • 6,288
1 vote
1 answer
94 views

paymentMethodID payment method id cannot be blank

We're using Craft Commerce 3.2.11 and Stripe as the payment gateway. We can put through a purchase using test cards no problem, but when we try with an actual card we get the message: paymentMethodID ...
user avatar
  • 197
1 vote
0 answers
81 views

Add custom fields to the cart line items in Craft Commerce 3

I have a product variants with the custom field for the variant image. In a cart overview I need to show an image of added line item (image should be of the added product variant if there are variants ...
user avatar
1 vote
3 answers
110 views

Get a list of countries available for shipping with Ajax in Craft Commerce

I need to fetch a list countries available for shipping in Craft Commerce. The problem is that I use decoupled frontend on Nuxt.js and I need fetch it with Ajax call and not with the twig code. I ...
user avatar
2 votes
2 answers
152 views

Getting a new cart after adding the product in decoupled frontend

I'm using the headless Craft together with decoupled frontend on Nuxt.js. I have to implement Craft Commerce 3 cart logic on the frontend, for that purpose I'm using graphQl/axios requests. However ...
user avatar
2 votes
1 answer
137 views

Custom shipping cost

One of the shipping companies that my client will use works by distance. This company offers an api where you tell the pickup address and the shipping address. You also specify what type of package to ...
user avatar
1 vote
1 answer
93 views

Searching for a way to add products to cart and sending the csrf token with ajax

Searching for a way to add products to cart and sending the csrf token with ajax This is my current code; $('.add-to-cart-form').on('submit', function(e) { e.preventDefault() ...
user avatar
1 vote
1 answer
32 views

Enable single line item mode on Commerce Pro

Is there a config option or something that would enable the 1 line item limit in cart. That means once customer adds second line item to cart first one would be removed so that only one would be left. ...
user avatar
  • 219
1 vote
1 answer
34 views

Craft Commerce: Filter completed orders based on a product category field

I know how to filter entries or products based on a category field with .relatedTo, but how can I filter completed orders based on a product category field? In this specific case, I have an overview ...
user avatar
1 vote
2 answers
204 views

Craft Commerce: ordering products like a structure

Is it possible to change the order of products in Craft Commerce (3) by drag & drop? Just like it is done with the entries of a structure? If not, how am I supposed to change the order of products?...
user avatar
  • 433
2 votes
1 answer
46 views

Partially pay for an order

Is there any way of partially paying for an order, so if the order total amount was $100, how can I programmatically set the payment amount to $50, and then pay the other $50 using another payment ...
user avatar
1 vote
1 answer
216 views

Craft Commerce 3 Decrease line Item qty by one?

I may be missing something obvious but I'm trying to update a +/- quantity button system for adding products to work on Craft Commerce 3 The desired functionality is that click '+' increases the cart ...
user avatar
0 votes
0 answers
25 views

Craft Commerce Barclays ePDQ integration

Has anyone got this plugin/payment gateway to work? Having issues with both client and test account details - testing on Craft Commerce 3 and know plugin was developed for Craft Commerce 2 so it is ...
user avatar
  • 1,721
1 vote
0 answers
80 views

How to send automated Commerce Subscription related emails?

What’s the best way to send automated Commerce Subscription related emails? For example, if a user sets up a new subscription they would get sent a confirmation email with details about it, how to ...
user avatar
  • 1,128
2 votes
2 answers
568 views

How to create a faceted search/facet filter in Craft Commerce

I want to create these kinds of filters on my Craft Commerce site: I have poked around with the Faceted Navigation plugin, but haven't gotten it to work the way I want yet (posted an issue about high ...
user avatar
  • 617
1 vote
0 answers
35 views

Paypal Express Redirecting to Undefined

I'm moving a site from craftcms/commerce-paypal to craft/commerce-paypal-checkout but I'm having an issue with the redirect after payment. Steps to reproduce: Choose Paypal as my gateway I choose pay ...
user avatar
1 vote
2 answers
67 views

Commerce - Advanced shipping cost calculations

What is the best way to implement advanced shipping cost calculations? Custom adjusters were deprecated right? I need to add shipping costs based on the total price of all products from a specific ...
user avatar
1 vote
1 answer
129 views

Free shipping discount on whole order doesn't appear as adjustment

TL;DR : Free shipping on order discounts don't appear as a discount (or any type of) adjuster. So how do I check if a free shipping discount has been applied? Sorry for the long post - hopefully it ...
user avatar