Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Adding a simple membership form to an EZ Page

Adding a simple membership form to an EZ Page

Locked

Views: 2,108

Results 1 to 14 of 14
This thread is locked. New replies are disabled.
4 Apr 2009, 6:14 AM
#1
stella01 avatar

stella01

New Zenner

Join Date:
Apr 2009
Location:
Sydney, Australia
Posts:
22
Plugin Contributions:
0

Adding a simple membership form to an EZ Page

Hello,

I was wondering if there is any documentation on how to put a very simple form, eg. email and submit into an ez page for membership so people can sign up for membership without creating an account?

is it possible to copy some of the contact page, just the email and send part of the form and action it exactly the same way?

4 Apr 2009, 11:23 AM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Adding a simple membership form to an EZ Page

Yes you can use the contact page as a bit of a module, but it's not an ideal one. The contact page is dynamically generated, whereas to add a form via an EZ-Page, you would need to create the form as static HTML. It might be better to drop the EZ-Page bit completely and create a dynamic page using more closely the Contact us page structure, i.e. includes/modules/pages/contact_us files and tpl_contact_us_default.php template.

5 Apr 2009, 12:26 AM
#3
stella01 avatar

stella01

New Zenner

Join Date:
Apr 2009
Location:
Sydney, Australia
Posts:
22
Plugin Contributions:
0

Re: Adding a simple membership form to an EZ Page

thanx for your reply it has been very helpful.

the new 'membership page' appears where it should. i've copied includes/modules/pages/contact_us/

to same but folder renamed /membership/

modified the header_php.php file so where ever contact_us replaced with membership.

next copied includes/templates/template_default/templates/tpl_contact_us_default.php (called it tpl_membership_default.php)

i also copied the following files and amended contact_us references to membership.
includes/languages/enlish/contact_us.php (membership.php)
includes/languages/english/html_includes/define_contact_us.php (membership.php)
includes/languages/english/html_includes/classic/define_contact_us.php (membership.php)

i added membership to these files.
admin/includes/language.english.php
admin/includes/languages/english/define_pages_editor.php

this is my problem after all this.
by changing this line of code in file tpl_membership_default.php
ie. where FILENAME_CONTACT_US used to be and change it to FILENAME_MEMBERSHIP causes the file not to be found get error 404 after i send the form

<?php echo zen_draw_form('membership', zen_href_link(FILENAME_MEMBERSHIP, 'action=send')); ?> (line 17)

it appears that it cannot find the FILENAME MEMBERSHIP and i can't work out why.

by changing that one line and make it go back to CONTACT_US. the form works fine. it appears to be a different form because the headings have all been changed but i don't think it is. i changed the form slightly on the new tpl membership.php but its the send command that seems to send it from the original contact_us form page.

also noticed that membership page hasn't added onto my site list? does this imply that there is a page missing somewhere or that i need to adjust my site list page manually?

is there any advice for me on this?

5 Apr 2009, 12:56 AM
#4
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Adding a simple membership form to an EZ Page

You will need to create a file in the includes/extra_configures folder that contains the line

define('FILENAME_MEMBERSHIP', 'membership');

5 Apr 2009, 1:46 AM
#5
stella01 avatar

stella01

New Zenner

Join Date:
Apr 2009
Location:
Sydney, Australia
Posts:
22
Plugin Contributions:
0

Re: Adding a simple membership form to an EZ Page

i've created the page in the extra configures, page can now be found no more 404 error but now form doesn't send. seems the action goes nowhere.

any suggestions ?

5 Apr 2009, 1:55 AM
#6
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Adding a simple membership form to an EZ Page

What result are you expecting to see?

5 Apr 2009, 2:20 AM
#7
stella01 avatar

stella01

New Zenner

Join Date:
Apr 2009
Location:
Sydney, Australia
Posts:
22
Plugin Contributions:
0

Re: Adding a simple membership form to an EZ Page

pls ignore the previous msg, have fixed.

almost all good now but for one last tiny problem.
i can't get rid of the message box as membership doesn't require it.
tried deleting this code but doesn't work.

<label for="enquiry"><?php echo ENTRY_ENQUIRY . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label>

<?php echo zen_draw_textarea_field('enquiry', '30', '7', '', 'id="enquiry"'); ?>

any further suggestions?

5 Apr 2009, 2:24 AM
#8
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Adding a simple membership form to an EZ Page

That is the code that draws the message. Delete it and it ceases to exist. If it's still showing up on the site, then I recommend double checking your assumptions. Did you save before uploading? Did you upload to the right place? Did you make the change in the right form?

5 Apr 2009, 6:26 AM
#9
stella01 avatar

stella01

New Zenner

Join Date:
Apr 2009
Location:
Sydney, Australia
Posts:
22
Plugin Contributions:
0

Re: Adding a simple membership form to an EZ Page

yes yr right, if i delete that bit of code from tpl_membership_default.php

<label for="enquiry"><?php echo ENTRY_ENQUIRY . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label>

<?php echo zen_draw_textarea_field('enquiry', '30', '7', '', 'id="enquiry"'); ?>

the form disappears from the page. not the desired solution, i want the form just not the message box only name and email, also the message field is mandatory which suits the contact form but not the membership. so i still have the same problem. how do i get rid of the message field in this new form.

any more suggestions?

5 Apr 2009, 11:19 AM
#10
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Adding a simple membership form to an EZ Page

Removing just that bit of code should just remove the message label, required star and the text area field. That's all that's in there. If the whole form disappears that would suggest that something in addition to the code posted is being accidentally removed along with it.

When this code is removed, though would also need to remove all references to it in the header_php.php file. These will start where the field contents are picked up as $_POST['enquiry'] and may (I'm guessing as I don't have the code) be converted to a local variable before being used to construct a string to send as part of an email.

As this is appears to be a required field for the contact_us page, there may also be some validation in a javascript file in the membership directory that would need to be removed, and soem processing in the header_php.php file to check that there has been input, which would need similar treatment.

6 Apr 2009, 2:05 AM
#11
stella01 avatar

stella01

New Zenner

Join Date:
Apr 2009
Location:
Sydney, Australia
Posts:
22
Plugin Contributions:
0

Re: Adding a simple membership form to an EZ Page

all done. mission finally complete. thanx for all yr help and patients. much appreciated.

6 Apr 2009, 2:06 AM
#12
stella01 avatar

stella01

New Zenner

Join Date:
Apr 2009
Location:
Sydney, Australia
Posts:
22
Plugin Contributions:
0

Re: Adding a simple membership form to an EZ Page

all done. mission finally complete. thanx for all yr help and patients. much appreciated.
:clap:

6 Apr 2009, 6:20 AM
#13
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Adding a simple membership form to an EZ Page

Well done..might wish to submit final files to
Free Software Add Ons section..
:wink: