Forums / All Other Contributions/Addons / Need help building a plugin for the Contact Us page!

Need help building a plugin for the Contact Us page!

Views: 981

Results 1 to 7 of 7
12 Jun 2015, 6:13 PM
#1
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Need help building a plugin for the Contact Us page!

Duplicating the Contact Us form

Hi,

Here is what I'm doing:
I want to create a separate form based on the standard Contact Us and then have it appear elsewhere (at the bottom of a Define Page that I create or, better, at the bottom of an EZpage that I create).

In the second form, I will add the following modules:
• Image to Contact - allows user to send images
https://www.zen-cart.com/downloads.php?do=file&id=1708
• Contact Us - Add Subject
https://www.zen-cart.com/downloads.php?do=file&id=226
• Add Phone Number to Contact Us
https://www.zen-cart.com/downloads.php?do=file&id=221

FYI, this second form will be used for a Trade-In Program page. If a client visits the site and they are interested in trading-in their old equipment, they can click on the page, read about the program, then send info about their equipment, including pictures.

I would GREATLY prefer to go the EZpage route so this thing is not limited to the define page.

If I can get some help doing this in a way that uses the template folders (so no core files change), I will package it up along with instructions and submit it to become as a plugin.

+++++

My plan is to:

  1. Backup my site
  2. Install the three plugins above
  3. Test modifications
  4. Download the new php files
  5. Revert the site php files back (not the sql that was added)
  6. Rename the modified files that were downloaded
  7. Modify the code in the renamed files so that they call on each other
  8. Create a new page (defined or EZ) that summons the alternate form

I haven't been able to find a zc154 thread explains the mechanics of the Contact Us form in a simple way that can be followed.

Here are my questions:

  • Can I do this w/o changing core?
  • Can I do this w/o additional SQL patching (other than what is in the other mods)?
  • Where do the elements of the Contact Us page live? I read somewhere that there are 7 files?
  • How do I get the new form to show up on an EZpage or Define Page?

When I finish, this package could be useful to who need a second form.

12 Jun 2015, 6:27 PM
#2
picaflor_azul avatar

picaflor_azul

Totally Zenned

Join Date:
Jul 2009
Location:
picaflor-azul.com
Posts:
6,940
Plugin Contributions:
28

Re: Need help building a plugin for the Contact Us page!

Feznizzle:

Duplicating the Contact Us form

Hi,

Here is what I'm doing:
I want to create a separate form based on the standard Contact Us and then have it appear elsewhere (at the bottom of a Define Page that I create or, better, at the bottom of an EZpage that I create).

In the second form, I will add the following modules:
• Image to Contact - allows user to send images
https://www.zen-cart.com/downloads.php?do=file&id=1708
• Contact Us - Add Subject
https://www.zen-cart.com/downloads.php?do=file&id=226
• Add Phone Number to Contact Us
https://www.zen-cart.com/downloads.php?do=file&id=221

FYI, this second form will be used for a Trade-In Program page. If a client visits the site and they are interested in trading-in their old equipment, they can click on the page, read about the program, then send info about their equipment, including pictures.

I would GREATLY prefer to go the EZpage route so this thing is not limited to the define page.

If I can get some help doing this in a way that uses the template folders (so no core files change), I will package it up along with instructions and submit it to become as a plugin.

+++++

My plan is to:

  1. Backup my site
  1. Install the three plugins above
  1. Test modifications
  1. Download the new php files
  1. Revert the site php files back (not the sql that was added)
  1. Rename the modified files that were downloaded
  1. Modify the code in the renamed files so that they call on each other
  1. Create a new page (defined or EZ) that summons the alternate form

I haven't been able to find a zc154 thread explains the mechanics of the Contact Us form in a simple way that can be followed.

Here are my questions:

  • Can I do this w/o changing core?
  • Can I do this w/o additional SQL patching (other than what is in the other mods)?
  • Where do the elements of the Contact Us page live? I read somewhere that there are 7 files?
  • How do I get the new form to show up on an EZpage or Define Page?

When I finish, this package could be useful to who need a second form.

I would recommend doing a search of the forum for "custom form and data collection". It gives tons of info about how to construct customized forms for zen cart.

Thanks,

Anne

12 Jun 2015, 7:08 PM
#3
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: Need help building a plugin for the Contact Us page!

picaflor-azul:

I would recommend doing a search of the forum for "custom form and data collection". It gives tons of info about how to construct customized forms for zen cart.

Thanks,

Anne

Thank you, Anne! Finding good info already :)

12 Jun 2015, 7:28 PM
#5
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: Need help building a plugin for the Contact Us page!

Hmm. Bummer.

Ok.

If I added my own defined page, how would I go about calling the alternate Contact Us routine?

12 Jun 2015, 9:11 PM
#6
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Need help building a plugin for the Contact Us page!

I would take a look at the Ask A Question plugin - it uses identical code as the Contact Us page.

It includes a define page

It will help you to understand what and how that form works so you can build your own.

rbarbour

13 Jun 2015, 4:04 PM
#7
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: Need help building a plugin for the Contact Us page!

Awesome, thanks rbarbour!

Pretty sure I've used Ask A Question before, totally forgot about it. I'll grab a copy right now.