Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [plugin-craftcommerce3]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
12 views

$0 Stripe Subscriptions

Has anyone successfully figured out how to do a $0 stripe subscription on commerce? Works fine in stripe but the commerce plugin requires a payment source and errors if you provide the payment source ...
cherrykoda's user avatar
  • 1,114
1 vote
2 answers
23 views

Error when calling renderPdfForOrder() in Module

The error I'm receiving is: Call to a member function getRenderLanguage() on null My Code (Edit - simplified): $mergeService = new Merger(); $batchFileName = 'VAT-' . $country . ( $date ? '-' . $...
cherrykoda's user avatar
  • 1,114
0 votes
0 answers
8 views

Craft Commerce 3 - two units same shipping cost

I have products which can be put into the same unit when shipping. Eg. If you buy two postcards, shipping costs are still 1x because you can put a lot of postcards in one letter. or you can get two ...
KSPR's user avatar
  • 3,786
1 vote
2 answers
63 views

Valid Business Tax ID

Is there a way to check on an order if the Business Tax ID was valid? Craft validates this in the order process, but Im in need of being able to narrow down some logic to orders that have a valid ...
cherrykoda's user avatar
  • 1,114
1 vote
2 answers
39 views

Return all orders from a list of countries in Commerce v3

A little stuck on trying to get the query right for this, I have a module where I need to write a function that returns all orders placed with billing addresses in a selected list of countries. The ...
cherrykoda's user avatar
  • 1,114
1 vote
1 answer
49 views

How to install Craft Commerce Shopping Feed Pro plugin

I'm attempting to install the Craft Commerce Shopping Feed Pro plugin using the following: composer require kerosin/craft-google-shopping-feed-pro But I'm getting the following error: Could not find a ...
MrCarrot's user avatar
  • 121
1 vote
0 answers
47 views

Object of class craft\commerce\models\ShippingMethod could not be converted to int Error generating from craft commerce

At a little bit of a loss here, just updated a Craft 3 site and I've started getting an error thrown whenever the cart is accessed. Relevant updates were: CraftCMS 3.7.11 -> 3.7.27.2 Craft ...
Josh Parylak's user avatar
1 vote
1 answer
50 views

Commerce 3: Apply discount only to additional items

I have a product where I want to charge the full price ($300) for the first one, and then a discounted amount ($50) for each additional one. So if a customer orders one, the cost is $300. Two would be ...
artmem's user avatar
  • 1,022
1 vote
1 answer
238 views

Commerce: Calling unknown method error on Edit Address screen

I'm using Commerce 3.4.16, Craft 3.7.51. I'm able to enter an address as part of checkout, and I can see that address in the CP, but when I go to the edit address screen on the front end, I get this ...
artmem's user avatar
  • 1,022
1 vote
1 answer
31 views

List Commerce products by category with a custom order

I'm using Commerce for the first time (v3), and I'm trying to display entries sorted by category in a custom order. I followed the Knowledge Base instructions for setting up a Commerce Products field, ...
artmem's user avatar
  • 1,022
2 votes
0 answers
149 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 ...
iamkeir's user avatar
  • 468
1 vote
1 answer
450 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 ...
Maarten Heideman's user avatar
0 votes
0 answers
44 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.
Maarten Heideman's user avatar
2 votes
1 answer
111 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 ...
Maarten Heideman's user avatar
1 vote
1 answer
180 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....
Henrik's user avatar
  • 425
2 votes
1 answer
169 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 ...
Yawner's user avatar
  • 65
1 vote
2 answers
484 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 ...
Mark's user avatar
  • 287
1 vote
2 answers
200 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,...
Josh Parylak's user avatar
1 vote
1 answer
193 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 ...
aodihis's user avatar
  • 801
0 votes
0 answers
184 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 ...
Steven Zhang's user avatar
0 votes
0 answers
41 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 ...
Taher Kathiriya's user avatar
1 vote
1 answer
169 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/...
Taher Kathiriya's user avatar
0 votes
1 answer
117 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 ...
biko's user avatar
  • 670
1 vote
1 answer
49 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 ...
Terry Upton's user avatar
  • 1,894
1 vote
1 answer
324 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. ...
bhu Boue vidya's user avatar
2 votes
0 answers
35 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 ...
Johanna Maldonado's user avatar
2 votes
2 answers
182 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 ...
KSPR's user avatar
  • 3,786
1 vote
1 answer
60 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 ...
Pete H's user avatar
  • 90
2 votes
1 answer
82 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 ...
Jeff Irwin's user avatar
1 vote
0 answers
184 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 ...
MyNotes's user avatar
  • 111
1 vote
1 answer
448 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 ...
Pete H's user avatar
  • 90
2 votes
1 answer
2k 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 [-][-][...
KSPR's user avatar
  • 3,786
1 vote
1 answer
53 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 ...
R14's user avatar
  • 13
1 vote
1 answer
270 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, ...
Jack's user avatar
  • 31
1 vote
0 answers
252 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 ...
Alex89's user avatar
  • 183
2 votes
1 answer
641 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....
Bart Rylant's user avatar
0 votes
0 answers
48 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, ...
Paul's user avatar
  • 6,338
1 vote
1 answer
206 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 ...
Mark's user avatar
  • 287
1 vote
0 answers
163 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 ...
Alex89's user avatar
  • 183
1 vote
3 answers
154 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 ...
Alex89's user avatar
  • 183
2 votes
2 answers
275 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 ...
Alex89's user avatar
  • 183
2 votes
1 answer
218 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 ...
David Saenz's user avatar
1 vote
1 answer
158 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() ...
Bram Beekman's user avatar
1 vote
1 answer
73 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. ...
Mato's user avatar
  • 229
1 vote
1 answer
58 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 ...
MetaMachine's user avatar
1 vote
2 answers
411 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?...
obs's user avatar
  • 541
2 votes
1 answer
87 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 ...
José Veríssimo's user avatar
1 vote
1 answer
328 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 ...
Josh Parylak's user avatar
0 votes
0 answers
39 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 ...
Cole Henley's user avatar
  • 1,741
2 votes
0 answers
116 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 ...
James's user avatar
  • 1,138