Closed aonic closed 10 years ago
:+1: However, my only concern with this is that we now have the MagentoProvider
class which has a lot of responsibilities – and even more to come.
What do you think about separting the MagentoProvider
class into sub-classes for products, basket, account, et cetera...?
For the IoC to work the way it is, a single Provider implementation needs to be defined for the ecommerce platform with all the functions implemented as required by the interface.
However, the Provider implementation can reference any other classes to execute the implementations of those functions. (example: using a REST API to something like Shopify)
The only way I can picture this change now is if the MagentoProvider.php had things like this:
function getCartItems() {
return $this->cart->getItems();
}
Thoughts?
I think let's leave it for the time being and merge it in, but can you open a separate ticket to consider this in the future please?
Thanks :+1: And more great work! I'll try and implement the login and registration after football.
:+1:
Laravel controller do not reference Magento directly, all Magento interactions in Magento API Provider