Skip to main content
5 votes
Accepted

How to represent member discount for Commerce products?

Options #1 and #3 are the two options you'll want to decide between, and you've hit the nail on the head in terms of the pros and cons of each. If a discount code being deleted / modified poses a ...
cherrykoda's user avatar
  • 1,114
2 votes

Stripe for Craft Commerce 4: Payment Method Id cannot be blank

Looks like the example in the sample code in the doc of the Stripe Gateway plugin is wrong - cf https://github.com/craftcms/commerce-stripe/issues/220 The parameter should be paymentForm[stripe][...
Seb's user avatar
  • 197
2 votes
Accepted

Commerce 4 Address Logic

Did you already run this command when upgrading to commerce 4? php craft commerce/upgrade If I am not wrong this command will do migrate the address also. Yes, the craft address is an element now, so ...
aodihis's user avatar
  • 801
2 votes
Accepted

Craft Commerce Missing Products Tab

The Products link in the navigation only shows up if you have at least one product type defined. Go to Commerce -> System settings -> Product Types to create your first product type.
MoritzLost's user avatar
  • 11.9k
2 votes

Craft Commerce 4 - customer phone number/address?

Not sure what the problem is here, since you already mentioned the solution. Addresses in Craft 4 have a field layout, so you can add any fields you want to them. There are some native properties you ...
MoritzLost's user avatar
  • 11.9k
2 votes
Accepted

How to add a 'Share Cart' button to send email to customer with cart link

To inject the button into the order edit page, you can use the cp.commerce.order.edit.order-actions template hook via a custom plugin/module. use Craft; Craft::$app->getView()->hook('cp....
Ben Croker's user avatar
  • 7,796
1 vote

Change email transport settings based on order site

The answer seems to be to drop the mailer component modification completely. There's a Yii method setTransport() which can be called via Commerce's EVENT_BEFORE_SEND_MAIL event. Event::on( Emails::...
Jamie's user avatar
  • 121
1 vote

After Craft CMS v4 Update: Getting unknown property: craft\models\Volume::settings

Sorry that your migration to Craft 4 has hit a hiccup! Something I would suggest starting with is deleting the vendor folder in your project, and then re-running composer install. This will pull in a ...
cherrykoda's user avatar
  • 1,114
1 vote
Accepted

How to query variants on product relatedTo

Try this: {% set relatedProducts = craft.products().relatedTo(currentCategory) %} or if you want specific field {% set relatedProducts = craft.products().relatedTo({ targetElement: ...
RomanAvr's user avatar
  • 712
1 vote

Craft Commerce PayPal Checkout: Error: Expected an order id to be passed

I had the same issue. I solved it by following the developer's guide to create an app with dedicated credentials (https://github.com/craftcms/commerce-paypal-checkout/blob/develop/README.md#creating-...
Giammarco Bianchini's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible