-
Notifications
You must be signed in to change notification settings - Fork 34
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
total_including_tax - Call to a member function raw() on int #1035
Comments
I think this may be part of the reason you're running into this issue, since none of the totals you're showing for v6 are being augmented like they should be. What does your |
This looks a bit empty. Did I miss a step?
|
Can you try copying the contents of this file into there and let me know if it helps? It should be copying it over as part of the "move to database" process but something must have went weird. |
"Unsupported operand types: int + string" seems to be hanging on map in this function:
|
Hmm, looks like something that should be a number isn't a number. Can you share the contents of the |
Sure, here you go:
|
That looks okay to me 🤔
Are you able to provide the full stack trace for this error? |
I just added a dd in RawTaxTotalSplit:
result: €2.60 If I convert the amount to int it works:
The cart now shows correctly. sc:cart:total - €25.00 - Returns the overall/grand total of the cart |
|
I just need to find some time to dig into it a bit more, I don't need anything from you. :) |
Maybe this helps?
Result:
|
From a very brief look, I think it's happening because simple-commerce/src/Tags/CartTags.php Line 163 in a988310
It should probably be using the "raw" line item data from the order instead. I'll try and take a look at this issue this week. For now, you could maybe use a composer patch if you need it fixed for now. |
Cool. Didn't know about "composer patch". |
Just tagged a release (v6.0.11) which should fix it. |
Description
In version 5 an object is passed. For some reason in version 6 an integer is passed.
Version 5 - entries table
This seems to be the correct way. An object is passed.
Result:
Version 6 - Orders table
This seems incorrect. An integer is passed as total.
Result:
826 // vendor/doublethreedigital/simple-commerce/src/Tags/TotalIncludingTax.php:13
Output without {{ total_including_tax }}
If I leave out total_including_tax from antlers I get the following results.
for version 5
for version 6
Steps to reproduce
I created a separate branch to upgrade to version 6. There I switched orders from eloquent to database orders.
Environment
Environment
Application Name: Statamic
Laravel Version: 10.48.4
PHP Version: 8.2.16
Composer Version: 2.7.1
Environment: local
Debug Mode: ENABLED
URL: domain6.test
Maintenance Mode: OFF
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: statamic
Database: mysql
Logs: stack / single
Mail: smtp
Queue: sync
Session: file
Simple Commerce
Currencies: EUR
Gateways: Mollie
Repository: Customer: DuncanMcClean\SimpleCommerce\Customers\UserCustomerRepository
Repository: Order: DuncanMcClean\SimpleCommerce\Orders\EloquentOrderRepository
Repository: Product: DuncanMcClean\SimpleCommerce\Products\EntryProductRepository
Shipping Methods: Free Shipping
Tax Engine: DuncanMcClean\SimpleCommerce\Tax\BasicTaxEngine
Statamic
Addons: 3
Antlers: runtime
Sites: 1
Stache Watcher: Enabled
Static Caching: Disabled
Version: 4.54.0 PRO
Statamic Addons
doublethreedigital/simple-commerce: 6.0.10
statamic-rad-pack/runway: 6.6.1
statamic/eloquent-driver: 3.3.2
Statamic Eloquent Driver
Asset Containers: file
Assets: file
Blueprints: file
Collection Trees: file
Collections: file
Entries: eloquent
Forms: file
Global Sets: file
Global Variables: file
Navigation Trees: file
Navigations: file
Revisions: file
Taxonomies: file
Terms: file
The text was updated successfully, but these errors were encountered: