When do Shopping Cart object come into existence ??

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

When do Shopping Cart object come into existence ??

Vikas Mayur-2
The controller file for order mangager contains request entry
"initorderentry" which invoke method "initializeOrderEntry" on
ShoppingCartEvents.java.
In this method we have statement
ShoppingCart cart = getCartObject(request);

This getCartObject first checks the cart object  in the request  and if it
is not in request than it finds it in the session.
My thought was that first time it will not find it in the session too, so
the following line of the method will got executed
            cart = new WebShoppingCart(request, locale, currencyUom);
            session.setAttribute("shoppingCart", cart);
and here we get the cart object initialized and set it in the session.
But these statements are not executed when i run the order process.

Than i guess probably some preprocessors may be doing that. But unable to
locate any thing about this.
My point is, first time we run the order manager or the ecommerce
application at what point the cart object comes into existence.

Any pointers will be helpful.

Thanks,

--
Vikas Mayur
Reply | Threaded
Open this post in threaded view
|

Re: When do Shopping Cart object come into existence ??

Bilgin Ibryam
Vikas,

why you decided that cart = new WebShoppingCart(request, locale, currencyUom); is not executed ?
If you debug it right you will see that this line is executed at first visit and then WebShoppingCart line 44 super((GenericDelegator)request.getAttribute("delegator"), ProductStoreWorker.getProductStoreId(request) ... creates the shopping cart.

It happens at first visit to ecommerce or at Order Entry->Continue.
I am not aware of any preprocessors for this. Of course may be i am wrong...
May be your browser donot destroy the session. You can destroy your shopping cart through Clear Order.

I hope this will help you.

Bilgin Ibryam
Reply | Threaded
Open this post in threaded view
|

Re: When do Shopping Cart object come into existence ??

Vikas Mayur-2
Bilgin

Yes you are right.
In order manager when I click on continue link in
https://localhost:8443/ordermgr/control/orderentry,
new cart object is created first time.

>> May be your browser donot destroy the session
Yes this may have happened but it should not as I ran Ofbiz every time to
test this.

When i tried to track the flow using the log messages they do not show up.
So i thought probably it is created
some where else. I do not know why this has happened.

Any way thanks for help.

On 9/4/07, Bilgin Ibryam <[hidden email]> wrote:

>
>
> Vikas,
>
> why you decided that cart = new WebShoppingCart(request, locale,
> currencyUom); is not executed ?
> If you debug it right you will see that this line is executed at first
> visit
> and then WebShoppingCart line 44
> super((GenericDelegator)request.getAttribute("delegator"),
> ProductStoreWorker.getProductStoreId(request) ... creates the shopping
> cart.
>
> It happens at first visit to ecommerce or at Order Entry->Continue.
> I am not aware of any preprocessors for this. Of course may be i am
> wrong...
> May be your browser donot destroy the session. You can destroy your
> shopping
> cart through Clear Order.
>
> I hope this will help you.
>
> Bilgin Ibryam
> --
> View this message in context:
> http://www.nabble.com/When-do-Shopping-Cart-object-come-into-existence----tf4372170.html#a12477068
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>


--
Vikas Mayur