[TYPO3-mvc] Basket / session question
Jan Kornblum
jan.kornblum at gmx.de
Thu Feb 14 23:44:53 CET 2013
Hi vosberg,
thanks a lot!
> when you add an attribute to the product-class it wont be persisted
> automatically. You must not define it in the tca.
This is good to know :)
> So I would:
> add the isInBasket attribute to the product with getters/setters.
>
> add a method to the basket markInBasketProducts($products), which iterates
> through the given products and sets the attribute.
>
> This method I would call in the controller.
You mean calling this method inside the ProductController, right?
Retrieving the products from repository, then passing the products to
this method, getting the adjusted products returned and passed to the
view...
Could this also be realized as an additional method inside the
ProductRepository? Like getProductsWithBasketInformation(), which first
gets the products from repo, and then does a
basket->markInBasketProducts($products)? Or would this break ddd/mvc
logic?
Kind regards, Jan
More information about the TYPO3-project-typo3v4mvc
mailing list