| Author |
Messages |
|
David Amm Posts:98
 river guide
 |
| 06/24/2009 8:09 AM |
|
Is it possible to import custom fields required by ASPDotNetStorefront - e.g. shipping address, billing address, customer group?
|
|
|
|
|
David To Posts:2745
 river guide
 |
| 06/24/2009 8:32 AM |
|
| Yes, any fields can be mapped provided you first create them as DNN core profile fields. So if you like to import / map shipping address, billing address, customer group you will need to go to Admin / User Account and choose Manage Profile Properties and add them there. Then when you use IUI, they should show up in the DNN fields to map with your CSV file. -- David |
|
|
|
|
David Amm Posts:98
 river guide
 |
| 06/29/2009 2:05 AM |
|
AspdotnetStorefront adds fields to deal with customer billing, shipping, pricing, etc. When a new user registers, the fields appear in the registration form. However, these additional user fields do not appear in Admin/User Account/Manage Profile Properties. I could add fields here, but how do I link them to the fields that display in the registration form? |
|
|
|
|
David To Posts:2745
 river guide
 |
| 06/29/2009 7:31 AM |
|
| HI David, I don't quite understand. How does Aspdotnetstorefront make the fields appear in the registration form? Also, the "registration form", this is not Dynamic Registration but rather DNN standard registration, correct? Do you know the SQL table / column it's storing the data to? -- David |
|
|
|
|
David Amm Posts:98
 river guide
 |
| 06/29/2009 8:28 AM |
|
Aspdotnetstorefront has addded 50 or so extra tables into the db. Among these are user/customer fields that I want to populate using DataSprings IUI module and display on a page using your User Directory module. I assume there's some sort of linkage between the DNN User Table and the new aspdotnetstorefront tables, but it's not obvious. I presume that aspdotnetstorefront have a custom user registration form that populates their tables as well as the core DNN user tables. |
|
|
|
|
David To Posts:2745
 river guide
 |
| 06/29/2009 8:39 AM |
|
| Well, the DNN core profile property definition is in a table called "ProfilePropertyDefinition". You need to somehow map / link the columns of this table to the "UserProfile" table and the Asp storefront table, which one/ones I have no clue since I don't have the module. Does Asp storefront allow SQL stored procedures to execute on submit? If so, that's how you can do the linking. -- David |
|
|
|
|
Chad Nash Posts:3866
 river guide
 |
| 07/08/2009 10:43 AM |
|
Hi, Maybe the customers table within the store module doesn't relate to the DNN Core Profile Fields at all (bummer). We are implementing these modules for another customers and I think we are going to have to use a SQL Event to registerwith Dynamic Registration and then insert the data directly into the store front customer tables. -Chad |
|
|
|
|
David Amm Posts:98
 river guide
 |
| 07/20/2009 6:10 AM |
|
We have finally got our cart working but needed to make some compromises along the way.
The ASPDotNetStorefront customer tables are separate from the Core DNN user and user profile tables. They have integrated user registration by adding storefront fields to the DNN registration control and modifying the scripts to add a storefront customer id when a DNN user is created.
This works fine if you add users one by one. Out cart now registers customers and shows their details in Data Springs User Directory.
However, if you import users with Data Springs User Import module the storefront customer id is not created (and can't be created manually). That's a problem! I'm looking for solutions and am happy to pay for custom code if anyone has somehting that works. |
|
|
|
|
David To Posts:2745
 river guide
 |
| 07/20/2009 10:27 AM |
|
HI David, we just worked on a project to implement DR with ASPDotNetStoreFront. The SQL table aspdnsf_tcustomer "CustomerID" is auto-generated, and there's a field corresponding to the UserID. So in essence, even if you use Interactive User Import to import a list of users into your DNN website, you can easily create an SQL statement (stored procedure) to populate all those users into the ASPDotNetStoreFront tables "aspdnsf_tcustomer" and "aspdnsf_address". -- David |
|
|
|
|
David Amm Posts:98
 river guide
 |
| 07/20/2009 11:16 PM |
|
Can you send me sample code to add the CustomerId? |
|
|
|
|
David To Posts:2745
 river guide
 |
| 07/21/2009 9:31 AM |
|
HI David, it something like the following. However, you may have to tweak it depending on your DR form fields and what your shortname fields are,etc. create procedure usp_DR_ASPDOTNETSTOREFRONT_InsertSQL (@UserID int,@PortalID int,@URLReferrer nvarchar(1000),@IPAddress nvarchar(20), @Username nvarchar(200),@Firstname nvarchar(50),@Lastname nvarchar(50), @Email nvarchar(200),@Howdid nvarchar(50),@Phone nvarchar(20),@OKto nvarchar(5), @FirstnameBill nvarchar(50),@LastnameBill nvarchar(50),@PhoneBill nvarchar(20), @CompanyBill nvarchar(200),@AddressTypeBill nvarchar(50),@Address1Bill nvarchar(200), @Address2Bill nvarchar(200),@SuiteBill nvarchar(100),@CityBill nvarchar(100), @CountryBill nvarchar(100),@ZipBill nvarchar(15),@StateBill nvarchar(50), @Sameas nvarchar(5), @FirstnameShip nvarchar(50),@LastnameShip nvarchar(50), @PhoneShip nvarchar(20),@CompanyShip nvarchar(200),@AddressTypeShip nvarchar(50), @Address1Ship nvarchar(200),@Address2Ship nvarchar(200),@SuiteShip nvarchar(100), @CityShip nvarchar(100),@CountryShip nvarchar(100),@ZipShip nvarchar(15),@StateShip nvarchar(50)) as begin declare @OkayToEmail int declare @BillingEqualsShipping int declare @FullnameBill nvarchar(200) declare @FullnameShip nvarchar(200) declare @BillingAddressID int declare @ShippingAddressID int declare @CustomerID int set @FullnameBill = @FirstnameBill + ' ' + @LastnameBill set @FullnameShip = @FirstnameShip + ' ' + @LastnameShip if (@OKto = 'Yes') set @OkayToEmail = 1 else set @OkayToEmail = 0 if (@Sameas = 'Yes') set @BillingEqualsShipping = 1 else set @BillingEqualsShipping = 0 -- check if customer already exists based on UserID, if not insert new record if not exists (select userid from aspdnsf_tcustomer where userid = @UserID) begin -- insert into ASPDOTNETSTOREFRONT aspdnsf_tcustomer SQL table insert into aspdnsf_tcustomer(CustomerGUID,CustomerLevelID,RegisterDate,Phone,AffiliateID,Referrer,OkToEmail, BillingEqualsShipping,LastIPAddress,LocaleSetting,RecurringShippingMethodID,BillingAddressID,ShippingAddressID, GiftRegistryGUID,GiftRegistryIsAnonymous,GiftRegistryAllowSearchByOthers,GiftRegistryHideShippingAddresses, CODCompanyCheckAllowed,CODNet30Allowed,Deleted,CreatedOn,Over13Checked,VATSetting,StoreCCInDB,IsRegistered, AdminCanViewCC,Active,UserID,PortalID) values(newid(),0,getdate(),@Phone,0,@URLReferrer,@OkayToEmail,@BillingEqualsShipping,@IPAddress,'en-US',1,@BillingAddressID,@ShippingAddressID, newid(),1,1,1,0,0,0,getdate(),0,0,1,1,1,1,@UserID,@PortalID) set @CustomerID = (select scope_identity()) -- insert into ASPDOTNETSTOREFRONT aspdnsf_address SQL table for Billing insert into aspdnsf_address(AddressGUID,CustomerID,FirstName,LastName,Company,Address1,Address2,Suite,City, State,Zip,Country,ResidenceType,Phone,Email,CardName,eCheckBankAccountName,Deleted,CreatedOn,Crypt,PortalID) values(newid(),@CustomerID,@FirstnameBill,@LastnameBill,@CompanyBill,@Address1Bill,@Address2Bill,@SuiteBill,@CityBill, @StateBill,@ZipBill,@CountryBill,@AddressTypeBill,@PhoneBill,@Email,@FullnameBill,@FullnameBill,0,getdate(),0,@PortalID) set @BillingAddressID = (select scope_identity()) -- insert into ASPDOTNETSTOREFRONT aspdnsf_address SQL table for Shipping insert into aspdnsf_address(AddressGUID,CustomerID,FirstName,LastName,Company,Address1,Address2,Suite,City, State,Zip,Country,ResidenceType,Phone,Email,CardName,eCheckBankAccountName,Deleted,CreatedOn,Crypt,PortalID) values(newid(),@CustomerID,@FirstnameShip,@LastnameShip,@CompanyShip,@Address1Ship,@Address2Ship,@SuiteShip,@CityShip, @StateShip,@ZipShip,@CountryShip,@AddressTypeShip,@PhoneShip,@Email,@FullnameShip,@FullnameShip,0,getdate(),0,@PortalID) set @ShippingAddressID = (select scope_identity()) -- now update aspdnsf_tcustomer table with the corresponding BillingAddressID / ShippingAddressID update aspdnsf_tcustomer set BillingAddressID = @BillingAddressID, ShippingAddressID = @ShippingAddressID where CustomerID = @CustomerID end -- update record instead else if exists (select userid from aspdnsf_tcustomer where userid = @UserID) begin declare @UpdateBillingAddressID int declare @UpdateShippingAddressID int declare @UpdateCustomerID int set @UpdateBillingAddressID = (select BillingAddressID from aspdnsf_tcustomer where userid = @UserID) set @UpdateShippingAddressID = (select ShippingAddressID from aspdnsf_tcustomer where userid = @UserID) set @UpdateCustomerID = (select CustomerID from aspdnsf_tcustomer where userid = @UserID) -- update tcustomer table update aspdnsf_tcustomer set Phone = @Phone, Referrer = @URLReferrer,OkToEmail = @OkayToEmail, LastIPAddress = @IPAddress, BillingEqualsShipping = @BillingEqualsShipping where userid = @UserID -- update billing record update aspdnsf_address set FirstName = @FirstnameBill, LastName = @LastnameBill,Company = @CompanyBill, Address1 = @Address1Bill, Address2 = @Address2Bill, Suite = @SuiteBill, City = @CityBill, State = @StateBill, Zip = @ZipBill, Country = @CountryBill, ResidenceType = @AddressTypeBill, Phone = @PhoneBill, Email = @Email, CardName = @FullnameBill, eCheckBankAccountName = @FullnameBill, PortalID= @PortalID where AddressID = @UpdateBillingAddressID and CustomerID = @UpdateCustomerID -- update shipping record update aspdnsf_address set FirstName = @FirstnameShip, LastName = @LastnameShip,Company = @CompanyShip, Address1 = @Address1Ship, Address2 = @Address2Ship, Suite = @SuiteShip, City = @CityShip, State = @StateShip, Zip = @ZipShip, Country = @CountryShip, ResidenceType = @AddressTypeShip, Phone = @PhoneShip, Email = @Email, CardName = @FullnameShip, eCheckBankAccountName = @FullnameShip, PortalID= @PortalID where AddressID = @UpdateShippingAddressID and CustomerID = @UpdateCustomerID end end -- David |
|
|
|
|
|