Closed Kwaadpepper closed 1 year ago
The changes do not really make sense, the $name
argument can be the quantity when the first argument is a Buyable. Please see the examples, it is withing the first chapter:
Cart::add()
If you still feel that these changes should be merged please open another pull request.
The issue I have is that using this method I cannot pass options. I need to pass options to the add to cart, while passing model that are buyable.
My bad just read this example using the facade it will be handled it seems, I made the pr because while debugging the part seemed not very clear. And this PR solved my issue. Again I was not using the facade, because it does not privé dock block definitions mostly.
It should be handled by the facade as well as a cart instance. The ability to call add with multiple types of arguments is not as clear when coming from the code itself, my refactor PR does improve this a bit by introducing multiple argument type hints but it could be simplified even more by reducing the amount of ways an item can be added.
Fix the Cart add function using Buyable model