Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsStoreStoreDNN ProfileDNN Profile
Previous
 
Next
New Post
3/28/2008 2:41 PM
 

Hi Gilles/Allan/all previous authors,
First of all thanks for everything. Here are some changes marked wityh //fred001 to be able to use the DNN profile in the store. Please test and let me know how it works for you:
Regards,
Fred

--------------------------------------------------------------------------------

C:\DotNetNuke_2\Website\DesktopModules\WWStore\Providers\AddressProviders\DefaultAddressProvider\DefaultAddressCheckout.ascx.cs

Line108+

                lstBillAddress.Items.Insert(0, new ListItem(Localization.GetString("SelectBillingAddress", this.LocalResourceFile), "-1"));
                lstBillAddress.ClearSelection(); //fred001
                lstBillAddress.Items[1].Selected = true; //fred001
                lstBillAddress_SelectedIndexChanged(lstBillAddress, new EventArgs()); //fred001

                lstShipAddress.DataSource = addresses;
                lstShipAddress.DataTextField = "Description";
                lstShipAddress.DataValueField = "AddressID";
                lstShipAddress.DataBind();
                lstShipAddress.Items.Insert(0, new ListItem(Localization.GetString("SelectShippingAddress", this.LocalResourceFile), "-1"));
                populateShipAddress(int.Parse(lstBillAddress.SelectedValue)); //fred001
                //ShippingAddressSelectionEnabled = false;

 

--------------------------------------------------------------------------------

C:\DotNetNuke_2\Website\DesktopModules\WWStore\Providers\AddressProviders\DefaultAddressProvider\StoreAddress.ascx.cs

Line346+

  public void PopulateAddress()
  {
   if (_AddressInfo != null)
   {
    if (_CountryData.ToLower() == "text")
    {
     if (_AddressInfo.CountryCode == "")
     {
      cboCountry.SelectedIndex = 0;
     }
     else
     {
                        if (cboCountry.Items.Count == 0) //fred001
                        {
                            loadCountryList(); //fred001
                        }
                        if (!(cboCountry.Items.FindByText(_AddressInfo.CountryCode) == null))
                        {
                            cboCountry.ClearSelection();
                            cboCountry.Items.FindByText(_AddressInfo.CountryCode).Selected = true;
                        }


Line526+


     short tabIndex = (short)_StartTabIndex;
     foreach (System.Web.UI.WebControls.WebControl control in inputControls)
     {
      control.TabIndex = tabIndex++;
     }

                    if (cboCountry.Items.Count == 0) //fred001
                    {
                        loadCountryList(); //fred001
                    }


     //PopulateAddress();

--------------------------------------------------------------------------------


C:\DotNetNuke_2\Website\DesktopModules\WWStore\Checkout.ascx.cs

Line700+

            int m_BillingAddressID = 0;
            int m_ShippingAddressID = 0;
                //BillingAddress.AddressID = m_BillingAddressID;

    //fred001 if (Null.IsNull(BillingAddress.AddressID) || BillingAddress.AddressID == -1)
    //fred001 {
    BillingAddress.PortalID = this.PortalId;
    BillingAddress.UserID = this.UserId;
                m_BillingAddressID = controller.AddAddress(BillingAddress);

    //fred001 }
                //fred001 else
    //fred001 {
     //fred001 controller.UpdateAddress(BillingAddress);
                //fred001 }

             //fred001 if (Null.IsNull(ShippingAddress.AddressID) || ShippingAddress.AddressID == -1)
                //fred001 {
                ShippingAddress.PortalID = this.PortalId;
                ShippingAddress.UserID = this.UserId;

                if (ShippingAddress.Address1.Length == 0)
                {
                    m_ShippingAddressID = controller.AddAddress(BillingAddress);
                }
                else
                {
                    m_ShippingAddressID = controller.AddAddress(ShippingAddress);
                }
             //fred001 }
            //fred001 else
                //fred001 {
                //fred001 controller.UpdateAddress(ShippingAddress);
             //fred001 } 

   //Now that the addresses are saved update the tax and shipping.

--------------------------------------------------------------------------------

 

 
New Post
4/3/2008 6:31 AM
 

Hi Fred,

Thanks for the code.

Gilles


We (team members) are Humans offering their knowledge, their work and their spare time FOR FREE to benefit the community. It would be so particularly appreciated that your messages begin with "Hello" and end with "Thank you" or any other form of politeness. Ask yourself what your reaction would be, if you were approached by me (a total stranger) on the street to ask you something without saying "Hello" nor "Thank you"? After several years of services dedicated to the community, I begin to be tired to read requests without any form of politeness.
 
New Post
4/5/2008 9:08 AM
 

I tested this code, works great except for one glitch. The "Region" field is not populated as selected value "combo" control, instead it gets populated with correct address "region" value in terms of a plain text field. Although no biggies, it would be great if we can fix this small glitch as well.

Sincerely,


www.dotnetnuke.umaisa.com dnnsupport@dotnetnuke.umaisa.com - free DNN support - www.dotnetnuke.umaisa.com/dnnsupport
 
New Post
4/7/2008 7:33 PM
 

Hi Sid,

For countries with predefined  regions the following change should show combos, otherwise just text boxes. Please try:

...\Providers\AddressProviders\DefaultAddressProvider\StoreAddress.ascx.cs

375+

     }
    }

    Localize(); //fred002

    if (cboRegion.Visible)
    {

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsStoreStoreDNN ProfileDNN Profile


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out