[TYPO3-mvc] Extbase PropertyMapper in 1.2.0 (TYPO3 4.4)

Thomas "Thasmo" Deinhamer thasmo at gmail.com
Fri Feb 11 11:59:58 CET 2011


Hello Franz!

Franz Koch wrote:
> Hey,
>
>> Previously I was able to do this:
>
> by previously you mean extbase 1.1.1 or extbase 1.2.0?

I think it was 1.1, yes.


>> $propertyMapper->map(array('cartItems'), array('cartItems' =>
>> $cartItems), $this->customer);
>
> may I ask you why you do the mapping manually and not have extbase do
> the job?

I think it was the only working way to do it in 1.1,
but I'm not sure. Probably I should change this to
use the form fields with the property argument.


>> Not sure, but I think since TYPO3 4.4 (Extbase 1.2) this
>> doesn't work anymore as the cartItems are empty then.
>>
>> $cartItems is an array:
>> Array(
>> [5] => Array(
>> [quantity] => 15
>> [__identity] => 5
>> )
>> )
>>
>> It's about updating a cart item's quantity.
>>
>> Has there anything changed in the property mapper
>> which would cause to clear all cart items instead
>> of updating the quantity?
>
>  From what I've seen in the code (current trunk), the expected behavior
> according to your $cartItems array would be to wipe out any cartItem
> except the one with UID 5 and update it's quantity. And that's not
> happening for you?

No it's not working. The cart item with the UID 5 is the only cart item
which is in the cart and it gets wiped out (deleted flag is set to 1).

Maybe it's not even related to the property mapper, but any other
Extbase misconfiguration by mself, which would delete the cart items.

Any ideas?

Thanks,
Thomas


More information about the TYPO3-project-typo3v4mvc mailing list