Open Mathias88 opened 8 years ago
carts_id
looks odd.
In the config, I change the name of table. By default, the name is "cart", but I change by "carts"
Did you changed the name of column in table items as well? On Mar 24, 2016 5:38 PM, "Mathias88" notifications@github.com wrote:
In the config, I change the name of table. By default, the name is "cart", but I change by "carts"
— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/amsgames/laravel-shop/issues/41#issuecomment-201074217
In the table items, the name of column is cart_id.
Your query for some reason is looking for carts_id instead of cart_id. Weird On Mar 25, 2016 11:43 AM, "Mathias88" notifications@github.com wrote:
In the table items, the name of column is cart_id.
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/amsgames/laravel-shop/issues/41#issuecomment-201382653
Hi,
I have this problem when I use {!! $cart->count !!}. Why?
This is the error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'items.carts_id' in 'on clause' (SQL: select sum(items.quantity) as itemCount, sum(items.price * items.quantity) as totalPrice, sum(items.tax * items.quantity) as totalTax, sum(items.shipping * items.quantity) as totalShipping from
carts
inner joinitems
onitems
.carts_id
=carts
.id
wherecarts
.id
= 8 limit 1) (View: /var/www/theshop/modules/Shopping/Resources/views/cart/cart.blade.php)Thanks!