Click here to Skip to main content
15,936,709 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi , Please I need help on how to create a permanent link to my cart page in php, that if i share the link with anyone and display the same item in cartpage shared. I am coding with php.

What I have tried:

Basically i have no idea of how it could works
Updated 19-Apr-23 19:51pm

1 solution

The whole idea of a cartpage is that it is specific to a single user - it's the list of items that they are about to (hopefully) buy. Sharing that means effectively adding items to someone else's shopping basket in the supermarket* which is generally going to at best make people uneasy. Adding items to a cart should realy be a specific user action - it's their money after all!

Instead, create "wish lists" that can be shared or sent to others - send them a link to a wish list page and they can select whish items to buy. Have a look at how Amazon does such lists - it's pretty good.

* And while this can be a good source of revenge if you select the right items it's probably not a good idea.
Share this answer
Richard Deeming 20-Apr-23 3:57am    
"... if you select the right items ..."

A tube of "Anusol", with the barcode obscured so that the checkout operator has to loudly call for a price-check, perhaps? :D
OriginalGriff 20-Apr-23 4:05am    
Yeah, and condoms.
Lacy underwear that clearly isn't going to fit the lady he is shopping with ... :D

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900