Overview: When a user shares a cart on the website (from the active cart tab), we need to record what the screen said when they hit Send on the popup, so we can bring it back up later. Currently the save does not account for the logged in user sharing someone else’s cart.
Process:
- Add OWNER.ID to the Named Params Array.
- Change RPC$SHAREDCART_SAVE
- Change CONTACT.NBR in setting the SHOPPINGCART.ID to OWNER.ID
- Clone RPC$SHAREDITEM_GETBYFILTER and make it change to:
- Name: RPC$SHAREDCART_GETBYFILTER
- Open SHAREDCARTS.USR instead of SHAREDITEMS.USR
- Change SAVEDITEM.ID to SAVEDCART.ID
- SAVEDCART.ID = OWNER.ID * CART.NAME
- This is because CONTACT.NBR will be the logged in use, but that user can share someone else’s cart. So, we want to attach that user’s sharing to the original cart. This means we no longer can assume the CONTACT.NBR is the owner of the cart.
- SHAREITEM.IDS = SHAREDCART.REC<24>
- Include LD.INCLUDES SHAREDCART.READ
- Clone LD.INCLUDES SHAREDITEM.READ to SHAREDCART.READ
- Reach SHAREDCARTS.USR instead of SHAREDITEMS.USR and everything else stays the same. This is possible because all the content is stored in field 7.