ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From greg jocher <gr...@digitalcane.com>
Subject Re: Override / extend events
Date Thu, 13 Sep 2012 09:25:51 GMT
Hi

thank you for your answer, here's a detail by example:

1. The problem:
We have virtual products with more than 2k variants.
The default generated varianttree is way to big (3mb).

2. Our solution:
We list all variants in selects and verify the combination either on 
submit or by ajax.
The problem with this solution is the missing productId which is 
"needed" by addToCart.
We can get the productId by ajax, but there are clients without js..

My idea was to override addToCart, add the productId to the parameter 
and point the response to the overridden event (response type=request)
But then, i have to wrap HttpServletRequest... which is more a hack than 
a solution.

So, is there a clean way to do such things with events or do we have to 
search for another solution?


On 09/13/2012 09:18 AM, Brajesh Patel wrote:
> Hi,
>
> Please provide more info for your question:
>
> comment inline:
>
> On Thu, Sep 13, 2012 at 12:47 AM, greg jocher <gregor@digitalcane.com>wrote:
>
>> Hi all
>>
>> Is there a way to add/change parameters in an event and pass it to another
>> (the "parent") event?
>>
> Event don't have any definition so need not to define any parameters, if
> you are working with service so need override that service in your
> customize component.
Yes, i know that - but if productId is not set for addToCart we get 
redirected to a form which asks for it.

>
>
>
>> Eg:
>> Override addToCart, add a needed parameter and fire the "parent" event.
>> (controller->response: type=request)
>>
>> regards
>> greg
>>
>>
>>
>>
>>
>>
>>
>>
>
regards
greg

Mime
View raw message