Admin area - view basket contents

Posted By saturation Wed 7 Sep 2011
Add to Favorites0
Author Message
saturation
 Posted Wed 7 Sep 2011
Supreme Being

Supreme Being - (66,762 reputation)Supreme Being - (66,762 reputation)Supreme Being - (66,762 reputation)Supreme Being - (66,762 reputation)Supreme Being - (66,762 reputation)Supreme Being - (66,762 reputation)Supreme Being - (66,762 reputation)Supreme Being - (66,762 reputation)Supreme Being - (66,762 reputation)

Group: Forum Members
Last Active: Fri 30 Nov 2012
Posts: 108, Visits: 1,185
I would like to see what's in my customer's saved baskets from the backend--at the individual level.   Is there a simple way to code this?
Mohammad
 Posted Fri 16 Sep 2011
Kartris Expert

Kartris Expert - (80,875 reputation)Kartris Expert - (80,875 reputation)Kartris Expert - (80,875 reputation)Kartris Expert - (80,875 reputation)Kartris Expert - (80,875 reputation)Kartris Expert - (80,875 reputation)Kartris Expert - (80,875 reputation)Kartris Expert - (80,875 reputation)Kartris Expert - (80,875 reputation)

Group: Administrators
Last Active: Sun 27 Sep 2015
Posts: 115, Visits: 706
Its not that easy to do it in back-end, but I can give a hint to start (but my code is a bit limited - version name, code number and the saved quantity for each version; options are a bit complicated so will not include it).

You need to have 2 new stored procedures:

1. To get the saved baskets for a customer
SELECT DISTINCT SB.SBSKT_ID, SB.SBSKT_Name, 
SB.SBSKT_DateTimeAdded, SB.SBSKT_LastUpdated
FROM tblKartrisSavedBaskets SB INNER JOIN tblKartrisBasketValues BV
ON SB.SBSKT_ID=BV.BV_ParentID AND BV.BV_ParentType='s'
WHERE SB.SBSKT_UserID=@UserID

@UserID is the customer id, you can remove the last line to get all the saved baskets regardless to the customer.

2. To get what is inside each saved basket
SELECT  vKartrisTypeVersions.V_Name, vKartrisTypeVersions.V_CodeNumber, tblKartrisBasketValues.BV_Quantity
FROM    tblKartrisBasketValues INNER JOIN vKartrisTypeVersions
ON tblKartrisBasketValues.BV_VersionID = vKartrisTypeVersions.V_ID
WHERE   vKartrisTypeVersions.LANG_ID = @LANG_ID
AND BV_ParentID=@BasketSavedID
AND BV_ParentType='s'

Red colored are same reference; you need to pass the value of the @BasketSavedID  from the first result set; field:SBSKT_ID.
Blue colored @LANG_ID is the language id in which the version name will display.

Hope that will help you.

Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top