"Region" list?

Mar 23, 2010 at 6:50 PM

I'm sure this question has been asked, but I can't find it...

I'm trying to find a way to change the "region" selection (in the CART) so that it is a drop down list (like the country list). Specifically, I'd like to make it a list of STATES (i'm in the U.S.) I can either setup my own list in backoffice, or there is a list already setup in DNN which lists states (It's called "Country.UnitedStates:Region")

 

The reason I need to do this is because the "region" needs to be passed to PayPal as a two digit value. If it is not, then PayPal will ignore the address and ask the user to re-enter their address....

 

(Also, if there is any way to change the label "Region" on the form so that it reads "State" that would be excellent)

 

Any help is greatly appreciated!

Coordinator
Mar 23, 2010 at 9:08 PM

Hi,

yes, the regional addess is always an issue outside of Europe., but basically you need to deal with the country.list as a state list..

Have a look at this thread, it's long, but inthere somewhere is some advice on setting up state shipping. (In New Zealand)

http://nbstore.codeplex.com/Thread/View.aspx?ThreadId=69785

The text for "Region" should be changable from the checkout.ascx.resx file, you can edit this manually or through the DNN langauge editor.

Hopefully in a future version, we'll have some better method of implementing this....like a real regions setting.

Regards,

Dave.

 

Mar 24, 2010 at 12:57 AM

Hi Lee,

OK, I think I understand everything (basically just use the "country" drop down as the "state" and then relabel it as STATE and remap it to PayPal)

That seems pretty straight forward, but then the question becomes getting rid of the REGION because I'll no longer need it..

According to that thread you posted I should just be able to insert a parameter into the portal.css, but that isn't hiding the region for me.. Any thoughts?

 

Here is the clip from that thread:

"

On the region field... At this stage the easiest way to hide that on a particular site, without messing with the address collector code, is to find the ID of the table row that it resides in, and then hide that.

If you look at the source of the page as rendered by the browser (easiest done using Firebug's Inspect Element function), you'll find an Id looking something like this:

dnn_ctr4296_CheckOut_billaddress_rowRegion

The only difference will be that it has a different number. You could also just search the page source for "rowRegion" and that'll find it.

Then you can simply add the following to your portal.css to hide it:

#dnn_ctr4296_CheckOut_billaddress_rowRegion{display:none}

"

I did that (and changed mine to #dnn_ctr423_CheckOut_billaddress_rowRegion{display:none} which is proper for my site) but it didn't end up hiding anything...

Also, I think once I do this then the validation will fail because REGION will be blank. Any way to just automatically fill in REGION with some generic info so that it won't be blank and thus validation won't fail?

Coordinator
Mar 24, 2010 at 2:34 AM

That should work Justin. Have you got a link to your page?.. I'll check the css to be sure.

I've also just checked my site and the region doesn't trigger a validation message, and I can't see anything that I've changed in order to do that so it should work for you too. Try hitting the continue button without filling anything in and see what is required.

Rob

 

Mar 24, 2010 at 7:36 PM

If you could check my site that would be great! (I'm fairly new to all this, so may have just screwed up sometime trivial)

 

My DNN installation is located at http://www.myflyguys.com/home

The NB store is located at http://www.myflyguys.com/home/supplies.aspx (Obviously you can add something to the cart and then click on teh CHECKOUT if you need to double check against the cart itself..)

THANKS!

Coordinator
Mar 25, 2010 at 1:30 AM

Ok yep, put this in your portal.css and it'll all work fine.

#dnn_ctr423_CheckOut_billaddress_rowRegion{display:none}

One small tip - Make the checkout page the one that displays by default after registration, or put a link to the cart page on the page that currently displays. That'll help buyers get back on track after registering.

Regards,
Rob

Mar 25, 2010 at 5:17 AM

Hey, I already have that exact line in the portal.css file (I thought) and it isn't working...

Only thing I can think of is that perhaps I'm just putting it in the wrong file?

I'm just going to ADMIN>SITE SETTINGS and adding it to the stylesheet there... Any chance that is the wrong place?

Coordinator
Mar 25, 2010 at 5:36 AM

Yep that's the correct place. However CSS is cached... make sure you force-refresh to load the changes. Control+R or Control+F5

Let me know if that works

Rob

Mar 25, 2010 at 5:40 AM

I finally got it, but the cache wasn't the only thing..

I had it originally at the end of the CSS file, and I moved it to the begining and that did it...

 

Any idea why that would make a difference?

Coordinator
Mar 25, 2010 at 5:53 AM

Great to hear it's working.

That would normally make no difference at all. it would even be more likely to work at the end.

Tip: One thing you can do when a style won't "stick" is to add !important inside the brackets, with a space ahead of it... for example like this:

#dnn_ctr423_CheckOut_billaddress_rowRegion{display:none !important}

At least it works now though :)

Rob

 

Mar 25, 2010 at 6:06 AM

Nice, I'll try that too..

 

Thanks so much for all the help! Greatly appreciated!

Mar 26, 2010 at 5:56 AM

Hey robax, kind of off topic, but related to the "tip" you offered above (in relation to redirecting the user after registration)

I noticed that a RETURN URL variable is included in the address bar when clicking on REGISTER or LOGIN, so I simply removed any redirect (in the user settings page)

 

Now when a user logs in, they are redirected to the last page they were looking at (so if they were shopping, they are redirected back to the shopping cart). Only problem is that if a user clicks on REGISTER, after registering they are redirected back to the home page on my site as opposed to the shopping cart...

I know I can just set the redirect to always go back to the cart, but I'd prefer it to just stay "dynamic" like the login and logout is...

Any ideas?

(I guess I could start a new topic for this..)

Coordinator
Mar 26, 2010 at 7:40 AM

I don't think there is any ideal solution for this with DNN, other than just not providing the registration link up front on the site... just have it on the page that shows during checkout. Then it will always be within the workflow for people with and without accounts.

On my sites I tend to disable registration whenever possible, so that I avoid the issue altogether.

rob