OFFLINE-GmbH / oc-snipcartshop-plugin

Ecommerce solution for October CMS using snipcart.com as a backend
MIT License
11 stars 4 forks source link

Problem with webhook when you place order (error 500) #11

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hello,

I continue my tests with snipcart and tried to place a test order on the website.

I could correctly go throught the checkout process, but, once order is placed, I get a email from the snipcart team saying me that the webhook didn't work correctly.

If I go to the webhook log on snipcart website and see the details, I can see that the URL called return an error :

SQLSTATE[23000]: Integrity constraint violation: 19 NOT NULL constraint failed: offline_snipcartshop_orders.invoice_number

Any ideas about the problem ?

tobias-kuendig commented 7 years ago

This is because of the way SQLite handles nullable fields. Try to update the plugin to the latest version 1.0.24 to get better SQLite support.

Please report back if you experience any further issues.

Zmove commented 7 years ago

I updated the plugin and placed a new order. It seems better as I can see the order detail in the october backend.

However, I don't see the product line item. I have the addresses, subtotals, but no products (see attached screenshot).

tobias-kuendig commented 7 years ago

Do you see any errors in your system.log? It's possible that it cannot save entries into your orders_products table since there are some null values present.

Zmove commented 7 years ago

Hello,

Yes, if I go to the logs, I see the following error :

PDOException: SQLSTATE[23000]: Integrity constraint violation: 19 NOT NULL constraint failed: offline_snipcartshop_order_items.max_quantity in www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:390

tobias-kuendig commented 7 years ago

Thanks I'll take a look at it.

tobias-kuendig commented 7 years ago

This is fixed in version 1.0.26. Thank you for your report.