Skip to main content

Questions tagged [plugin-craftcommerce]

Use this tag for questions relating to the Craft Commerce product.

Filter by
Sorted by
Tagged with
1 vote
1 answer
23 views

Change email transport settings based on order site

I've been trying to send Commerce emails via two different domains but I'm having very little luck getting it working fully. In app.php I have something like this: 'mailer' => function() { $...
Jamie's user avatar
  • 121
1 vote
1 answer
22 views

Why am I seeing a version compatibility error after updating Craft Commerce to 4.6.0?

I recently updated Craft Commerce to version 4.6.0, but now whenever I run any Craft commands or navigate to site.com/admin, I encounter the following error: You need to be on at least Craft Commerce ...
Mostafa Soufi's user avatar
1 vote
1 answer
28 views

Save field value After Complete Order

I am using Craft Commerce and want to edit the order after it has been completed by the customer. For this I am using the EVENT_AFTER_COMPLETE_ORDER event. Event::on( Order::class, ...
Matthias's user avatar
  • 301
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
25 views

Add to cart via Ajax (sometimes) results in abandoned carts and invalid CSRF

In Craft Commerce, I am using the Blitz Cache plugin. My "add to cart"-button uses ajax to add the product to the cart. This is the twig-code for the form: <form method="post" ...
nitech's user avatar
  • 679
0 votes
0 answers
24 views

PaymentMethods of type 'ideal' cannot be saved to customers

I working on a craft commerce project with subscriptions. I have problems with saving a paymentsource of the type "ideal" and "bancontact" with stripe. Creditcards and sepa ...
Maarten Heideman's user avatar
1 vote
1 answer
27 views

Create and display PopUps for Craft (+Commerce) Frontend

Is there already a solution or plugin that can be used to create/maintain popups in the control panel, which are then displayed to the user in the frontend? For example, I would like to create a pop-...
MaxBay's user avatar
  • 11
1 vote
1 answer
33 views

Displaying coupon error messages on front end commerce 4

I have read in the Commerce documentation that natively, commerce doesn't display any errors when a false coupon is being entered. Did I understand the docs correctly or is there any why to achieve ...
LessMore Creative Studio's user avatar
1 vote
2 answers
28 views

Stripe gateway only display creditcard for subscription plans

I'll working on a project where users can buy a subscription to recieve extra features in their account. In the Stripe dashboard I'll set up 2 different products year en monthly payment. In craft ...
Maarten Heideman's user avatar
0 votes
0 answers
37 views

Sprig add to cart display cart

products index.twig file include a Sprig component with filters: {{ sprig('_components/productCategoryList.twig', { entryId: entry.id }) }} productCategoryList.twig file includes a list of all ...
jjem's user avatar
  • 497
0 votes
0 answers
18 views

Stripe Commerce Plugin - Checkout Payment Form Type (capture address)

I am using this checkout option in my commerce site with the Stripe Commerce Plugin: paymentFormType: 'checkout', However it only captures the clients Postcode - is there an easy way to capture Billng ...
Malcolm Maclean's user avatar
1 vote
2 answers
31 views

Webhook only firing when I log in

I've set up a Webhook in Craft 4 that triggers a Zap. The Sender class is craft\commerce\elements\Subscription and the event name is afterSave. When the trigger action happens (a user subscription), ...
Graham Bennett's user avatar
1 vote
1 answer
73 views

Why are number fields actually text fields in Craft?

I am building a small price calculator in the Product type entry for Craft Commerce by building a custom plugin. This plugin executes my javascript file. The issue I am encountering is that I need to ...
Matthias's user avatar
  • 301
0 votes
0 answers
24 views

Craft Commerce Stripe

I am using the commerce-stripe plugin and its all working ok. I was thinking about having a quick checkout option for products (so users dont have to go through basket and checkout etc). Is there a ...
Malcolm Maclean's user avatar
1 vote
1 answer
93 views

Payment form differences between Commerce 3 and Commerce 4 in headless application

I'm in the process of migrating Craft Commerce 3 to 4. I handle the payments forms with VueJS, and I've been struggling to understand why my paymentMethod body params were ignored after the migration. ...
Antoine's user avatar
  • 157
1 vote
1 answer
41 views

How to extend Craft Commerce?

We're building a webshop with Craft and Craft Commerce. The products will have dynamic pricing based on the weight and material. Is it possible to extend Craft Commerce products to add these fields ...
Matthias's user avatar
  • 301
1 vote
2 answers
65 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
40 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
0 votes
0 answers
30 views

Rounding Total Price Adjuster Commerce not working correctly

I have this adjuster which should round prices to the nearest 5 decimal. I am pretty sure it had been working, and now it does not anymore. I tried to debug, but I don't find the error. In my commerce ...
Henrik's user avatar
  • 425
0 votes
0 answers
16 views

Is Worldpay craft plugin integrates Cybersource

I'm kinda new to payment gateways, Is the craft commerce-worldpay plugin https://plugins.craftcms.com/commerce-worldpay integrates Cybersource as stated in this worldpay docs https://developer....
user2226937's user avatar
1 vote
1 answer
44 views

How do i check for customers, not users, in a cart

Using craft commerce 3. I have an adjuster which applies a discount if a user of a certain usergroup. I check this with: $user = Craft::$app->getUser()->getIdentity(); if (($user && ($...
Henrik's user avatar
  • 425
1 vote
1 answer
47 views

How to get category id of lineItem to use in commerce adjuster

I want to add an adjustment to a product in the basket via an adjuster, only when the product has certain categories. (10% off if there are more than 6 same items in the basket. It's not possible to ...
Henrik's user avatar
  • 425
1 vote
2 answers
142 views

Stop customers from increasing line item

I have a site where the owners want to stop customers from ordering more than 1 type of item. The Twig logic is already in place to stop any forms showing that would allow customers adding more than ...
Jaytrix's user avatar
  • 337
1 vote
1 answer
63 views

How to make AJAX request to controller inside module?

Created a new module to receive form values and process API in Craft CMS 4. How to make an AJAX request to access a controller in my module? module name - giftcard controller - GiftCardController ...
Gowri Shankar's user avatar
1 vote
1 answer
29 views

Craft Commerce Missing Products Tab

I've just installed the craft commerce plugin to trial it, but I'm not seeing the products tab under Commerce in the backend? Am I missing something? I'm using Craft 4.5.10. Thanks, Chris
Chris Nicholson's user avatar
0 votes
0 answers
27 views

Craft Commerce: Sell digital products from pool of predefined license keys

We’ve been asked to build a shop to sell e-books. The e-books are published by a third party and we will receive a list of pre-defined license keys (thus stock can run out). The plugin Digital ...
Moritz's user avatar
  • 69
1 vote
2 answers
90 views

Update Craft Commerce cart with ajax

Have been trying to get cart updates via ajax. I've looked at this answer: 'https://craftcms.stackexchange.com/questions/17347/update-commerce-cart-using-ajax' My cart seem to update ok but I can't ...
DieselHashtag's user avatar
1 vote
1 answer
96 views

I have an existing project called Craft cms v3.3, what should I do if I want to run it at local?(Mac OS)

I currently have a project that is definitely craft cms v3. I want to run it but this is the first time I keep stressing over it. Please help me
Phan Dương Ngọc Đô's user avatar
1 vote
1 answer
41 views

Why do I only have 3 options under 'Commerce' in Craft CMS Solo 4.5.6.1?

I have installed Craft Commerce 4.3.0 on Craft CMS Solo 4.5.6.1 on localhost (Xampp), but only have 3 options under 'Commerce' in the left-hand menu - Orders, Promotions, Store Settings. Do I need to ...
Andy's user avatar
  • 11
1 vote
1 answer
70 views

Big upgrade completed locally, how to upgrade live?

I have a site that was Craft 3.4 and Commerce 3.x (unsure of exact version). Locally, I've been spent a big chunk of today updating to the latest versions of everything and making sure all still works ...
Jaytrix's user avatar
  • 337
0 votes
0 answers
81 views

Commerce 3: How to programmatically create a custom field and assign it to a Product

With this kind of setup: function random() { return array_reduce(range(0, 9), fn ($x) => $x . range('a', 'z')[rand(0, 25)], ''); } $salt = random(); $result = Craft::$app->getFields()->...
msbit's user avatar
  • 121
0 votes
0 answers
45 views

How to export a list of customers per domain?

I got a Craft (-v 3.7.67) Commerce (-v 3.4.20) setup with 4 sites in two domains. I need to export a list of customers (or users, in my case users are 99% customers) per domain (so users that have ...
Antoine's user avatar
  • 157
1 vote
1 answer
130 views

Is manual payment possible for Craft Commerce subscriptions?

I need to allow manual payments for Craft Commerce subscriptions. Typical users for this industry sector require an invoice and then make a bank transfer, and don't want to use credit card. It's low ...
Graham Bennett's user avatar
0 votes
0 answers
35 views

Interface "React\Promise\ExtendedPromiseInterface" not found

So I upgraded the page from Craft 2.9 to latest 3.x.x version. Now I am trying to install a plugin and I get this error - any help? Cheers
Zoruak's user avatar
  • 11
1 vote
2 answers
87 views

Product URL missing category slug on production site

I upgraded a Craft CMS 3 site to version 4. The Product URI Format for my products look like this: Before I re-save a product, the URL displays correctly the way it looked in Craft 3: But when I re-...
nitech's user avatar
  • 679
1 vote
1 answer
117 views

Commerce LineItem Option validation

I have Line Item options that I'm trying to validate in a module. I'm using the example code from the docs here on the front-end of the cart. Below that it says: Commerce does not validate the ...
supazu's user avatar
  • 526
1 vote
1 answer
372 views

Craft Commerce 4 - customer phone number/address?

i am using Craft Commerce 4 and cannot get my head around how to add a phone number to a customers address at Checkout. I have a Commerce 3 site but the code does not work. I can see how to add a ...
Malcolm Maclean's user avatar
1 vote
1 answer
95 views

Set default values for new Commerce products

I'm trying to set some defaults for newly created products. That is, when a new product is created, I want to set some settings to specific default values, but users should be allowed to change those. ...
MoritzLost's user avatar
  • 11.5k
0 votes
1 answer
20 views

reverse relation question in Commerce

I have a reviews section with an entry field to Commerce products. I'm trying to show the reverse relationship review on the product page. It appears to work when there are related entries but when ...
glider's user avatar
  • 647
1 vote
1 answer
106 views

How to persist modified order of cart line items?

I wrote a function to sort / re-order the line items in a cart. function sortCart(Order $order) { $lineItems = $order->getLineItems(); $lineItemsOrdered = array(); // [...] $order-...
kindoflike's user avatar
0 votes
0 answers
115 views

How to modify a custom field on cart, when the cart is created

I want to set a custom field on shopping cart when I first retrieve it. https://craftcms.com/docs/commerce/4.x/extend/events.html#modifycartinfo sounds appropriate so I tried doing this: Event::on( ...
kindoflike's user avatar
1 vote
1 answer
154 views

Delete All Products (and their variants)

I'm looking for the correct way to delete all of the products and related variants from my Commerce site. This is just for my local development environment as I'm debugging an import job. The delete() ...
cherrykoda's user avatar
  • 1,114
1 vote
1 answer
71 views

How to represent member discount for Commerce products?

I'm working on a Craft Commerce project where users can register for paid events. The events have a different price for members and non-members of the organization the site belongs to. I'm not sure ...
MoritzLost's user avatar
  • 11.5k
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
0 votes
0 answers
106 views

How make custom order fields required with "event_define_rules" like a required address fields?

I want to make a craft commerce custom order field required (server side). I already use this for require the default address fields. But how to add custom fields? Because this is done on the Address ...
Maarten Heideman's user avatar
1 vote
1 answer
86 views

Batch retrieve the entry count per category item in facet filter

I'm building a facet filter using Craft Commerce products and Craft categories. I have a "Brand" category and each product entry has a brand defined. Same for the other facet filters that ...
Jesse's user avatar
  • 113
2 votes
1 answer
24 views

Feed me plugin craft\commerce\services\ProductTypes::hasPermission(): Argument #1 ($user) must be of type craft\elements\User

Whenever I run a feed via the Direct link eg. https://site.com/index.php?p=actions/feed-me/feeds/run-task&direct=1&feedId=[id]&passkey=[passkey] when I'm logged out of the CP. I get the ...
Hassan Mahmood's user avatar
1 vote
1 answer
151 views

How can I best add additional fields to the Address form during the checkout

I want my customers to enter their date of birth and place of birth during the checkout. Do I have to overwrite the Address commerce model somehow? (\craft\commerce\models\Address). Something else I ...
Rayco's user avatar
  • 11
1 vote
1 answer
93 views

How To Designate Adjuster on Order Only

Registering like so and all is well. Event::on( OrderAdjustments::class, OrderAdjustments::EVENT_REGISTER_ORDER_ADJUSTERS, function(RegisterComponentTypesEvent $event) { $event->...
Steve Mock's user avatar
1 vote
1 answer
260 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
2 3 4 5
18