Forums / Templates, Stylesheets, Page Layout / Bypass 'Update Address Book' for new accounts

Bypass 'Update Address Book' for new accounts

Views: 1,565

Results 1 to 10 of 10
16 Dec 2013, 8:47 AM
#1
m_e71 avatar

m_e71

New Zenner

Join Date:
Dec 2013
Location:
Nottingham
Posts:
5
Plugin Contributions:
0

Bypass 'Update Address Book' for new accounts

Hi guys and gals of the forum,

To cut a long story short, I am converting my Zen Cart to be more of an Order Picker than a Shopping Cart. Luckily, through the Admin changes and Mods available, I can bypass the whole Payment area and send the Cart to email, which I have running fine at the moment.

My issue is signing up new accounts for engineer's access.

I have adjusted the scripts and values to strip away most of the New Account values and left only what I require, which is basically First and Last name, email address and password. However, when this is submitted, although account is successfully created, I am then forwarded onto 'Address Book Update' under 'My Account', where I am being asked to input the data I do not want to input and spent all the time removing from new account registration!

Is there an easy way to bypass this with a script mod and if so, what file should I be looking at? Or any other work around that I am missing?

Thanks in advance.

16 Dec 2013, 12:06 PM
#2
m_e71 avatar

m_e71

New Zenner

Join Date:
Dec 2013
Location:
Nottingham
Posts:
5
Plugin Contributions:
0

Re: Bypass 'Update Address Book' for new accounts

Sorry. Version number incorrect - using 1.5.1

17 Dec 2013, 6:24 PM
#5
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Bypass 'Update Address Book' for new accounts

m_e71,
Option 1 - Are you referring to the checkout success page having address details and the edit button
**Option 2 **- or are you clicking continue then landing on the my account page?

Peek at the address bar you should see the name of the page that's operating the code.

Option 1 - Just hide the address book 'call' in php
Option 2 - Change the redirect page or landing page to one you specify instead of 'last page' or 'my account'

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

18 Dec 2013, 3:23 PM
#6
m_e71 avatar

m_e71

New Zenner

Join Date:
Dec 2013
Location:
Nottingham
Posts:
5
Plugin Contributions:
0

Re: Bypass 'Update Address Book' for new accounts

Hi and thanks for all the input.

The minimum information plugin does not work as I am not using the payment gateway as required by the mod.

I have a work around for what I want to acheive, but do not know how to implement (sorry.....bit of a php noob!)

The field for the COUNTRY selection dropdown box is called for by the line of script below in tpl_modules_create_account.php:

<?php echo zen_get_country_list('zone_country_id', $selected_country, 'id="country" ' . ($flag_show_pulldown_states == true ? 'onchange="update_zone(this.form);"' : '')) . (zen_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="alert">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?>

I still require the function of this script, but do not want it visible on the screen to users. I have hidden the LABEL value with a simple mod of the CSS file, but cannot seem to hide the drop down box itself.

Any thoughts and help appreciated.

19 Dec 2013, 2:57 AM
#7
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Bypass 'Update Address Book' for new accounts

Have a look at **includes/functions/html_output.php
**
You'll see that the function output of echoing 'zen_get_country_list...' is to build the list and 'return zen_draw_pull_down_menu'

I'm a bit sketchy on what you're trying to accomplish now...

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

19 Dec 2013, 3:30 AM
#8
m_e71 avatar

m_e71

New Zenner

Join Date:
Dec 2013
Location:
Nottingham
Posts:
5
Plugin Contributions:
0

Re: Bypass 'Update Address Book' for new accounts

Hi Twitchtoo,

When a customer creates a new account, or in my case, an engineer, the Country field has to be filled in. I do not require this information to be chosen by the user. Instead, I want the country filed to be hidden from view. It will still be set to default for United Kingdom, and when submit is hit, the account will be created without any issues (ie will not be sent to update address book).

I have it all running OK at present, but the country field is on view - which I do not want.

Make sense?

:blink:

19 Dec 2013, 4:09 AM
#9
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Bypass 'Update Address Book' for new accounts

Shot in the dark... what happens when you remove the echo?

Then what happens if you add in zen_draw_hidden_field('zone_country_id', $selected_country, ' ');

Whereby you may need to define the country code and forgo using the list building function, as it's not relevant in your application.

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

19 Dec 2013, 2:36 PM
#10
m_e71 avatar

m_e71

New Zenner

Join Date:
Dec 2013
Location:
Nottingham
Posts:
5
Plugin Contributions:
0

Re: Bypass 'Update Address Book' for new accounts

twitchtoo:

Shot in the dark... what happens when you remove the echo?

First thing I tried - end up on 'Update Address Book' page with Country input error.....

twitchtoo:

Then what happens if you add in zen_draw_hidden_field('zone_country_id', $selected_country, ' ');

I presume you are placing the code above within the template module code for creating account and replacing the existing line:

zen_get_country_list('zone_country_id', $selected_country, 'id="country" '

??

Sorry........pHp self-learner!! Hey, if you going to learn, might as well do it in style!!!

:smile: