Make Cart model customizable and easy to exchange#13
Make Cart model customizable and easy to exchange#13tomhatzer wants to merge 5 commits intofreshbitsweb:masterfrom
Conversation
|
Hi Tom, I really appreciate your work here. This one looks good at the first pass. Let us work on this together to polish it :) Can you please also update tests accordingly to make sure that users' custom models would also work properly? Thanks. |
|
Hi @gauravmak ! Thanks for replying 😃 But for the models themself, there is currently no way to test it as everything is converted to arrays or Core/Cart and Core/CartItem. The models are only used for inserting data into the database and querying data inside the database. Do you possibly have anything in mind that could help with this? Thank you very much! Best wishes |
|
Tom, I will be able to take a look at it later this week. I will reply here. |
|
It would really make sense to be able to customize the model. |
|
Yes, it does. Haven't been able to go through this due to time constraints. This PR is quite old now. Is anyone still up to recreating with the latest code? |
Dear maintainers,
I've updated the package to allow custom Cart model classes.
This is a nice addition if you want to extend the base Cart model class with more relationships like adding a user and coupon relationship.
I hope my code is ok, otherwise please comment and I'll fix any issues that my occur.
Thank you very much!
Best wishes
Tom
PS: Sorry for the multiple commits...