customizing events, eg addToCart

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

customizing events, eg addToCart

Grant Edwards-2
Hi,

The customization of services using the hot-deploy component is fairly
simple. But what about events like the one below? I dont really want to
go scratching around in org.ofbiz.order.shoppingcart.ShoppingCartEvents
as this would make future updates from the project difficult to handle.

Is a custom order component, and all that goes with it, the way to go ?


Kind regards

Grant Edwards





<request-map uri="additem">
       <security https="true" auth="true"/>
       <event type="java"
path="org.ofbiz.order.shoppingcart.ShoppingCartEvents" invoke="addToCart"/>
       <response name="success" type="request" value="orderentry"/>
       <response name="survey" type="view" value="survey"/>
       <response name="product" type="view" value="product"/>
       <response name="error" type="request" value="orderentry"/>
   </request-map>
Reply | Threaded
Open this post in threaded view
|

Re: customizing events, eg addToCart

Jacopo Cappellato-3
You can just mount a webapp (in the ofbiz-controller.xml file that  
overrides the order (or ecommerce etc..) webapp and then add a new  
request-map entry to replace the event:

> <request-map uri="additem">
>      <security https="true" auth="true"/>
>      <event type="java" path="com.mycompany.CustomEvents"  
> invoke="addToCart"/>
>      <response name="success" type="request" value="orderentry"/>
>      <response name="survey" type="view" value="survey"/>
>      <response name="product" type="view" value="product"/>
>      <response name="error" type="request" value="orderentry"/>
>  </request-map>
>

Hope it helps,

Jacopo


On Jun 19, 2008, at 10:55 AM, Grant Edwards wrote:

> Hi,
>
> The customization of services using the hot-deploy component is  
> fairly simple. But what about events like the one below? I dont  
> really want to go scratching around in  
> org.ofbiz.order.shoppingcart.ShoppingCartEvents as this would make  
> future updates from the project difficult to handle.
>
> Is a custom order component, and all that goes with it, the way to  
> go ?
>
>
> Kind regards
>
> Grant Edwards
>
>
>
>
>
> <request-map uri="additem">
>      <security https="true" auth="true"/>
>      <event type="java"  
> path="org.ofbiz.order.shoppingcart.ShoppingCartEvents"  
> invoke="addToCart"/>
>      <response name="success" type="request" value="orderentry"/>
>      <response name="survey" type="view" value="survey"/>
>      <response name="product" type="view" value="product"/>
>      <response name="error" type="request" value="orderentry"/>
>  </request-map>

Reply | Threaded
Open this post in threaded view
|

products sort for e-commerce

Eric DE MAULDE
In reply to this post by Grant Edwards-2
Hello,

In my e-commerce application, category detail screen,
I would like sorting the category products
by sale (1st case)
by promos and/or price rules and/or "percentSaved" (in productsummary.ftl)

Is there this function ?
Or, how can I begin to implement it ?

Thanks

Eric
Reply | Threaded
Open this post in threaded view
|

Re: customizing events, eg addToCart

Grant Edwards-2
In reply to this post by Jacopo Cappellato-3
Thank you Jacopo  .... I will look into it further this afternoon and
let you know how it goes.

Jacopo Cappellato wrote:

> You can just mount a webapp (in the ofbiz-controller.xml file that
> overrides the order (or ecommerce etc..) webapp and then add a new
> request-map entry to replace the event:
>
>> <request-map uri="additem">
>>      <security https="true" auth="true"/>
>>      <event type="java" path="com.mycompany.CustomEvents"
>> invoke="addToCart"/>
>>      <response name="success" type="request" value="orderentry"/>
>>      <response name="survey" type="view" value="survey"/>
>>      <response name="product" type="view" value="product"/>
>>      <response name="error" type="request" value="orderentry"/>
>>  </request-map>
>>
>
> Hope it helps,
>
> Jacopo
>
>
> On Jun 19, 2008, at 10:55 AM, Grant Edwards wrote:
>
>> Hi,
>>
>> The customization of services using the hot-deploy component is
>> fairly simple. But what about events like the one below? I dont
>> really want to go scratching around in
>> org.ofbiz.order.shoppingcart.ShoppingCartEvents as this would make
>> future updates from the project difficult to handle.
>>
>> Is a custom order component, and all that goes with it, the way to go ?
>>
>>
>> Kind regards
>>
>> Grant Edwards
>>
>>
>>
>>
>>
>> <request-map uri="additem">
>>      <security https="true" auth="true"/>
>>      <event type="java"
>> path="org.ofbiz.order.shoppingcart.ShoppingCartEvents"
>> invoke="addToCart"/>
>>      <response name="success" type="request" value="orderentry"/>
>>      <response name="survey" type="view" value="survey"/>
>>      <response name="product" type="view" value="product"/>
>>      <response name="error" type="request" value="orderentry"/>
>>  </request-map>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: customizing events, eg addToCart

Jacques Le Roux
Administrator
Note that Jacopo certainly meaned ofbiz-component.xml file

Jacques

From: "Grant Edwards" <[hidden email]>

> Thank you Jacopo  .... I will look into it further this afternoon and
> let you know how it goes.
>
> Jacopo Cappellato wrote:
>> You can just mount a webapp (in the ofbiz-controller.xml file that
>> overrides the order (or ecommerce etc..) webapp and then add a new
>> request-map entry to replace the event:
>>
>>> <request-map uri="additem">
>>>      <security https="true" auth="true"/>
>>>      <event type="java" path="com.mycompany.CustomEvents"
>>> invoke="addToCart"/>
>>>      <response name="success" type="request" value="orderentry"/>
>>>      <response name="survey" type="view" value="survey"/>
>>>      <response name="product" type="view" value="product"/>
>>>      <response name="error" type="request" value="orderentry"/>
>>>  </request-map>
>>>
>>
>> Hope it helps,
>>
>> Jacopo
>>
>>
>> On Jun 19, 2008, at 10:55 AM, Grant Edwards wrote:
>>
>>> Hi,
>>>
>>> The customization of services using the hot-deploy component is
>>> fairly simple. But what about events like the one below? I dont
>>> really want to go scratching around in
>>> org.ofbiz.order.shoppingcart.ShoppingCartEvents as this would make
>>> future updates from the project difficult to handle.
>>>
>>> Is a custom order component, and all that goes with it, the way to go ?
>>>
>>>
>>> Kind regards
>>>
>>> Grant Edwards
>>>
>>>
>>>
>>>
>>>
>>> <request-map uri="additem">
>>>      <security https="true" auth="true"/>
>>>      <event type="java"
>>> path="org.ofbiz.order.shoppingcart.ShoppingCartEvents"
>>> invoke="addToCart"/>
>>>      <response name="success" type="request" value="orderentry"/>
>>>      <response name="survey" type="view" value="survey"/>
>>>      <response name="product" type="view" value="product"/>
>>>      <response name="error" type="request" value="orderentry"/>
>>>  </request-map>
>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: customizing events, eg addToCart

Jacopo Cappellato-3
yeah, thanks Jacques and sorry for the confusion.

Jacopo

On Jun 19, 2008, at 1:19 PM, Jacques Le Roux wrote:

> Note that Jacopo certainly meaned ofbiz-component.xml file
>
> Jacques
>
> From: "Grant Edwards" <[hidden email]>
>> Thank you Jacopo  .... I will look into it further this afternoon  
>> and let you know how it goes.
>> Jacopo Cappellato wrote:
>>> You can just mount a webapp (in the ofbiz-controller.xml file that  
>>> overrides the order (or ecommerce etc..) webapp and then add a new  
>>> request-map entry to replace the event:
>>>
>>>> <request-map uri="additem">
>>>>     <security https="true" auth="true"/>
>>>>     <event type="java" path="com.mycompany.CustomEvents"  
>>>> invoke="addToCart"/>
>>>>     <response name="success" type="request" value="orderentry"/>
>>>>     <response name="survey" type="view" value="survey"/>
>>>>     <response name="product" type="view" value="product"/>
>>>>     <response name="error" type="request" value="orderentry"/>
>>>> </request-map>
>>>>
>>>
>>> Hope it helps,
>>>
>>> Jacopo
>>>
>>>
>>> On Jun 19, 2008, at 10:55 AM, Grant Edwards wrote:
>>>
>>>> Hi,
>>>>
>>>> The customization of services using the hot-deploy component is  
>>>> fairly simple. But what about events like the one below? I dont  
>>>> really want to go scratching around in  
>>>> org.ofbiz.order.shoppingcart.ShoppingCartEvents as this would  
>>>> make future updates from the project difficult to handle.
>>>>
>>>> Is a custom order component, and all that goes with it, the way  
>>>> to go ?
>>>>
>>>>
>>>> Kind regards
>>>>
>>>> Grant Edwards
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> <request-map uri="additem">
>>>>     <security https="true" auth="true"/>
>>>>     <event type="java"  
>>>> path="org.ofbiz.order.shoppingcart.ShoppingCartEvents"  
>>>> invoke="addToCart"/>
>>>>     <response name="success" type="request" value="orderentry"/>
>>>>     <response name="survey" type="view" value="survey"/>
>>>>     <response name="product" type="view" value="product"/>
>>>>     <response name="error" type="request" value="orderentry"/>
>>>> </request-map>
>>>
>>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: customizing events, eg addToCart

Ashish Vijaywargiya
Jacopo,

You won't believe but I had read it ofbiz-component.xml instead of
ofbiz-controller.xml :-)

--
Ashish


On Thu, Jun 19, 2008 at 8:41 AM, Jacopo Cappellato <
[hidden email]> wrote:

> yeah, thanks Jacques and sorry for the confusion.
>
> Jacopo
>
>
> On Jun 19, 2008, at 1:19 PM, Jacques Le Roux wrote:
>
>  Note that Jacopo certainly meaned ofbiz-component.xml file
>>
>> Jacques
>>
>> From: "Grant Edwards" <[hidden email]>
>>
>>> Thank you Jacopo  .... I will look into it further this afternoon and let
>>> you know how it goes.
>>> Jacopo Cappellato wrote:
>>>
>>>> You can just mount a webapp (in the ofbiz-controller.xml file that
>>>> overrides the order (or ecommerce etc..) webapp and then add a new
>>>> request-map entry to replace the event:
>>>>
>>>>  <request-map uri="additem">
>>>>>    <security https="true" auth="true"/>
>>>>>    <event type="java" path="com.mycompany.CustomEvents"
>>>>> invoke="addToCart"/>
>>>>>    <response name="success" type="request" value="orderentry"/>
>>>>>    <response name="survey" type="view" value="survey"/>
>>>>>    <response name="product" type="view" value="product"/>
>>>>>    <response name="error" type="request" value="orderentry"/>
>>>>> </request-map>
>>>>>
>>>>>
>>>> Hope it helps,
>>>>
>>>> Jacopo
>>>>
>>>>
>>>> On Jun 19, 2008, at 10:55 AM, Grant Edwards wrote:
>>>>
>>>>  Hi,
>>>>>
>>>>> The customization of services using the hot-deploy component is fairly
>>>>> simple. But what about events like the one below? I dont really want to go
>>>>> scratching around in org.ofbiz.order.shoppingcart.ShoppingCartEvents as this
>>>>> would make future updates from the project difficult to handle.
>>>>>
>>>>> Is a custom order component, and all that goes with it, the way to go ?
>>>>>
>>>>>
>>>>> Kind regards
>>>>>
>>>>> Grant Edwards
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> <request-map uri="additem">
>>>>>    <security https="true" auth="true"/>
>>>>>    <event type="java"
>>>>> path="org.ofbiz.order.shoppingcart.ShoppingCartEvents" invoke="addToCart"/>
>>>>>    <response name="success" type="request" value="orderentry"/>
>>>>>    <response name="survey" type="view" value="survey"/>
>>>>>    <response name="product" type="view" value="product"/>
>>>>>    <response name="error" type="request" value="orderentry"/>
>>>>> </request-map>
>>>>>
>>>>
>>>>
>>>>
>>>
>