3

Quick answer. Yes you can use Apple Pay with Craft Commerce and the first-party Stripe Gateway Plugin. In order to do that, you need to customise your template and add the functionality for the Payment Request button. What this does is more or less generating a charge promise token for Stripe (same way it does for card). Charging the token is then handled ...


2

This is possible with Craft Commerce 3 Pro. Create an email that would trigger on an 'Invoice' order status that you configure. (or any other name you want) You would make the order in the Control Panel, then mark it as complete (which will set the the default status), then change the status to 'invoice' to trigger the email. In the email template, link ...


2

Best way to handle this is probably with a console command provided by a module. The console command would need to fetch all asset IDs that don’t have any corresponding rows in the relations database table. use Craft; use craft\db\Query; use craft\db\Table; use craft\elements\Asset; use yii\console\ExitCode; use craft\helpers\Console; public function ...


2

Commerce 3 is not a major change from Commerce 2 - you can see what you need to do to update here: https://docs.craftcms.com/commerce/v3/upgrading.html Stripe works with Commerce 3 without any update needed: https://github.com/craftcms/commerce-stripe/blob/develop/composer.json#L28


1

I think you're asking how to output custom fields based on their type. Something like this should work: {% for lineItem in cart.lineItems %} // Is the current line item a variant purchasable? {% if className(lineItem.purchasable) == 'craft\commerce\elements\Variant' %} {% switch lineItem.purchasable.product.type %} {% case "clothing" %} // ...


1

You could make 'pickup from store' a shipping method. Then in your checkout form, if a visitor chooses that shipping method, make sure you don't show the shipping address form, and add a hidden input to set order.shippingSameAsBilling to true. Commerce will then populate the shipping address with the billing address details. Code is untested, but it should ...


1

Not at the moment, you would need to manually put the states at the top of your select box in the front-end. There is no harm if you have a duplicate select option in your form, so you could list the popular ones first, then list all of them. We will look to add sorting of States in a future release of Craft Commerce. I have added it as a feature request ...


1

Have you seen this plugin? -> https://plugins.craftcms.com/web-payments edit: this is an answer for Craft 3/Commerce 2


1

According to Luke, this is the preferred method for Commerce 3. In a custom module or plugin: Event::on(\craft\commerce\models\Address::class, \craft\base\Model::EVENT_DEFINE_RULES, static function(\craft\events\DefineRulesEvent $event) { $rules = $event->rules; $rules[] = [['firstName','lastName'], 'required']; $event->rules = $rules; });...


1

I once wrote a custom service doing this (not for commerce, though). I'll post the code, and maybe it can help you along the way. You can set it up in a module, make a console controller, and have a cronjob hit it every minute (although, are you sure you need to do it that often?). The DeleteAssets is a very simple extension of BaseJob, basically looping ...


1

If your use-case is where you do only allow a single product at a time to be added to the cart, then one simple way I think you could do this is just take the first item in the lineItems array. I say this because it seems that whenever a product gets added to the cart, it becomes the first item in the array. I can't find any documentation on this but I ...


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