Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Akram MONCER
Custom Shopping Cart [Hook]
November 30, 2012 2:12 AM
Answer

Akram MONCER

Rank: Regular Member

Posts: 106

Join Date: September 25, 2012

Recent Posts

hi
i work on a hook to custom the shopping portlet in liferay my task is :
i want that the guest user (not logged user) can see the items and can see the feature of the item but he have to be logged to add an item in the cart
so to resume a guest user can see anything in the shopping portlet and not the cart .

can anyone give me an idea how can i do that
David H Nebinger
RE: Custom Shopping Cart [Hook]
November 30, 2012 5:46 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11293

Join Date: September 1, 2006

Recent Posts

Don't think it's possible. Shopping cart items are persisted to the database w/ the current user. Trying to do this w/ guest would not give you a unique id, so there would not be a way to distinguish your guest items from my guest items...
Akram MONCER
RE: Custom Shopping Cart [Hook]
November 30, 2012 5:55 AM
Answer

Akram MONCER

Rank: Regular Member

Posts: 106

Join Date: September 25, 2012

Recent Posts

thinks you but i want to ask you a question

so how liferay distinguish between my guest cart and an other one because in shopping portlet i can add an item in the cart when i'm not log-in
how they distinguish the item in my guest cart
Jan Geißler
RE: Custom Shopping Cart [Hook]
November 30, 2012 5:57 AM
Answer

Jan Geißler

Community Moderator

Rank: Liferay Master

Posts: 735

Join Date: July 5, 2011

Recent Posts

I would guess, that Every Guest User has it's own Session.
Akram MONCER
RE: Custom Shopping Cart [Hook]
November 30, 2012 6:21 AM
Answer

Akram MONCER

Rank: Regular Member

Posts: 106

Join Date: September 25, 2012

Recent Posts

yes what i think but do you have more detail about the subject
Jan Geißler
RE: Custom Shopping Cart [Hook]
November 30, 2012 7:05 AM
Answer

Jan Geißler

Community Moderator

Rank: Liferay Master

Posts: 735

Join Date: July 5, 2011

Recent Posts

No emoticon Sorry. Haven't looked inside this portlet at all till now. But I would recommend to take a look in the code ;)