please does anyone knows how to retrieve Current Logged in customerId. Will like to use it to query the datase using SQL.
please does anyone knows how to retrieve Current Logged in customerId. Will like to use it to query the datase using SQL.
Here's an example from an xmlpackage :-
HTML Code:<query name="Customer" rowElementName="Item"> <sql> <![CDATA[ SELECT * FROM Customer WHERE CustomerID = @CustomerID ]]> </sql> <queryparam paramname="@CustomerID" paramtype="system" requestparamname="CustomerID" sqlDataType="int" defvalue="0" validationpattern="^\d{1,10}$" /> </query>
TTFN
BFG
Thanx for ur help. isnt there anyway I can retrieve it programatically using c#?
If you look at the source of pages such as checkoutpayment.aspx.cs, you'll see in the Page_Load() method:
This allows access to the currently connected and registered customer. And you can then pass ThisCustomer.CustomerID to a SQL query.Code:ThisCustomer.RequireCustomerRecord(); ... if (!ThisCustomer.IsRegistered)
http://www.esedirect.co.uk
--------------------------------------------------------------------------
Using MS 9.2.0.0 with the following customisations:
Lightbox/Fancybox enlarged images;
Auto-suggest searchbox;
Extra product information shown only to our IP Address (such as supplier info, costs, etc.);
Failed transactions emailed via trigger;
Custom app to show basket contents when customer online;
Orders pushed through to accounting systems.
All the above without source!
As long as you are using the aspdotnetstorefrontcore it should work fine.C#/VB.NET Code:
Customer.Current.CustomerID
=====
Version (Code/DB): AspDotNetStorefront MSx 9.1.0.1/9.1.0.0
Execution Mode: 64 Bit
Dot Net Developments - E-commerce By Experience