Skip to content

[5.x]: Order in CP: I'm able to mark cart as completed even though there is no transaction defined #4143

@MatthiasBrodelet

Description

@MatthiasBrodelet

What happened?

Description

A client of ours often creates manual orders in the CP.
They often complete an order (convert from cart to order) without defining a transaction.
When an order is completed an order confirmation email is automatically sent to the client with of course the missing payment information.

Should a transaction not be mandatory before being able to complete an order?
Is there a way to prevent our client from completing orders without defining a transaction?

An even bigger issue is that when no transaction is defined and I use 'order.gateway.handle' in the order confirmation email template it will just render out the first possible gateway which is not even selected.
So it outputs wrong information.

Steps to reproduce

  1. Create order and complete an order in the CP without defining a transaction

Expected behavior

The transaction should be mandatory.

Actual behavior

I can complete an order without transaction.

Craft CMS version

5.8.17

Craft Commerce version

5.4.6

PHP version

8.2

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions