Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cart.lastTransaction throws TypeError #558

Closed
mrksmts opened this issue Nov 8, 2018 · 0 comments
Closed

cart.lastTransaction throws TypeError #558

mrksmts opened this issue Nov 8, 2018 · 0 comments

Comments

@mrksmts
Copy link

mrksmts commented Nov 8, 2018

Description

When the cart is empty and you call cart.lastTransaction in your Twig template you get the following error:

Argument 1 passed to craft\commerce\services\Transactions::getAllTransactionsByOrderId() must be of the type integer, null given, called in /app/vendor/craftcms/commerce/src/elements/Order.php on line 1460

Steps to reproduce

  1. Make sure your cart is empty
  2. Put {{ cart.lastTransaction }} in your template

Additional info

  • Craft version: 3.0.29
  • PHP version: 7.1.22
  • Database driver & version: MySQL 5.7.24
  • Plugins & versions:
    -- Control Panel CSS 2.1.0
    -- Cookies 1.1.10
    -- CP Field Inspect 1.0.5
    -- Craft Commerce 2.0.0-beta.13.1
    -- Element API 2.5.4
    -- Embedded Assets 1.0.2
    -- Expanded Singles 1.0.5
    -- Inlin 2.1.1
    -- MultiSafepay for Craft Commerce 1.0.0
    -- Neo dev-dev-3-port
    -- Redactor 2.1.6
    -- Social 2.0.0-beta.14
    -- Super Table 2.0.11
    -- Typed link field 1.0.15
    -- Video Embedder 1.1.1
    -- Width Fieldtype 1.0.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant