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

item_model_bindings relation.name not working #286

Open
DevRaeph opened this issue Jun 24, 2021 · 2 comments
Open

item_model_bindings relation.name not working #286

DevRaeph opened this issue Jun 24, 2021 · 2 comments
Labels
Milestone

Comments

@DevRaeph
Copy link

Hey there.

I have a product and an item Model.
My config.item_model = \App\Models\Item::class;

My Item Model have a related Product Model Item->Product->name.

I'm trying to set up Item_model_bindings.
I tried to set:
\LukePOLO\LaraCart\CartItem::ITEM_NAME => 'Product.name',
sadly it's still null.
if i set
\LukePOLO\LaraCart\CartItem::ITEM_NAME => 'Product',
i got the Full Product Array in the name field.

Any suggestions. Also Price is not working.
Thank you in advance!

@lukepolo
Copy link
Owner

Looks like its the Product.name may be a bug , and not sure what the price is about.

@lukepolo lukepolo added the bug label Jun 24, 2021
@DevRaeph
Copy link
Author

DevRaeph commented Jun 24, 2021

I tested nearly everything at the moment😅
I have a little weird constalation with my models, with Item->Product->price i get my price normally only in the config file it did not find the value.

Thx for responding

Edit:
Maybe you have any idea how to handle, in the worst case i'll initialize the the cart products manuelly with the attrs. :b

@lukepolo lukepolo added this to the 2.1 milestone Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants