[TYPO3-mvc] Building a Basket case within an extbase/fluid Extension
Franz Koch
typo3.RemoveForMessage at elements-net.de
Wed Feb 9 16:53:41 CET 2011
Hey Frank.
> I'm now in the stage of implementing a basket case a user can put items in.
> I built a session manager and a second repository,
>
> Which represents the items stored in the session while the user is logged
> in.
Just to get you right. By having two repositories, you also have two
different models, right? Something like Tx_ExtKey_Domain_Model_Product
and Tx_ExtKey_Domain_Model_BasketItem?
> The next step is to handle the "submit basketcase" action. The "simple" task
> is that the items should be marked in the original Item list as "requested". Therefore the items should update the original
> items stored in the database (the "default" repository),
So when a item get's added to your basket it should already be marked as
"requested" by setting a flag/property in the DB/product? What does this
"requested" flag stand for? Should it be a indication for the visitor
that this item is already in his basket? If that's the case you must not
change/modify your product, but rather check your basket items if it
contains a certain product - otherwise you would affect the display of
all users.
> So its about updating one repository from another. Does extbase recognize,
> which data set should be updated automatically or do I have to add a unique ID to my repository objects manually ? Any elegant
> way to handle it ?
not sure what you mean by that. If you alter a object it doesn't matter
which repository delivered it - it'll be updated in the DB in any case.
--
kind regards,
Franz Koch
More information about the TYPO3-project-typo3v4mvc
mailing list