Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    May 2006
    Posts
    3
    Plugin Contributions
    0

    Default Custom contact forms

    Hey,

    Just wondering if there is a module or maybe something a little more obvious that I have missed to produce custom contact forms for ZenCart.

    A site I am building requires 2 pages which the visitors to the site will submit information to the store owners to update their in-house customer database.

    Whilst I could knock this up as a static page outside of the ZC install, it seems a little funny that this can't be done within the ZC infrastructure?

    Any help appreciated :)

  2. #2
    Join Date
    May 2004
    Location
    Hong Kong
    Posts
    1,291
    Plugin Contributions
    1

    Default Re: Custom contact forms

    A New Starter again

  3. #3
    Join Date
    May 2006
    Posts
    3
    Plugin Contributions
    0

    Default Re: Custom contact forms

    can this module be used irrespective of a product?

    specifically i need 3 pages which are completely unrelated to a product, category or manufacturer which simply act as a contact page, but with alternative fields than what the contact form provides...

  4. #4
    Join Date
    May 2004
    Location
    Hong Kong
    Posts
    1,291
    Plugin Contributions
    1

    Default Re: Custom contact forms

    Primary, it is a Ask A Question Contact Form although with the product questions for example. And how and where to use, also how to expand should be depend on you.
    A New Starter again

  5. #5
    Join Date
    Oct 2005
    Posts
    15
    Plugin Contributions
    0

    Default Re: Custom contact forms

    I'm trying to add a custom form to Zen-Cart and this looks promising but having installed the module, I don't see how I can get the form to display if there's no product info - I need to have a form that appears on an EZ Page.

    Has anyone got this module working like that?

  6. #6
    Join Date
    May 2006
    Posts
    3
    Plugin Contributions
    0

    Idea or Suggestion Re: Custom contact forms

    i gave up on that module, it was annoying...

    just hacked up the contacts page script to do what i wanted it to do...

    you need to understand forms to some extent, tho ZenCart has functions to do most things which are pretty easy to understand..

    first look in /includes/templates/theme_name/templates/tpl_contact_us_default.php
    copy this to whatever you want your new page to be called (in my case 'vip')
    sp tpl_vip_default.php

    then edit it to suit your requirements

    then goto /includes/modules/pages/contact_us/
    copy that folder to whatever you called your previous one
    ie: /includes/modules/pages/vip/

    then edit 'header_php.php' - this will process your form when you POST to it, you will need to match the variable names to what you put in the tpl file

    you may also need to go to /includes/languages/english/html_includes and copy define_contact_us.php to define_name.php (ie: define_vip.php)

    you will also need to go to /includes/languages/english and copy contact_us.php to the same name (ie: vip.php)

    I think that's all I did.. there may have been one other file that needs changing..

    I've attached a copy of the 4 files mentioned for anyone who wants to use them as a reference.. just ignore the ladym folder as that's the source tree for the project i was working on..
    Attached Files Attached Files
    Last edited by raverX; 27 Jun 2006 at 08:54 AM.
    ..:: INSANE TECHNOLOGIES :: databases - networks - websites ::..

  7. #7
    Join Date
    Oct 2005
    Posts
    15
    Plugin Contributions
    0

    Default Re: Custom contact forms

    Cool - thanks very much for that raverx I will have a go that way round.

  8. #8
    Join Date
    Oct 2005
    Posts
    15
    Plugin Contributions
    0

    Default one more thing

    I have just about got this working now and just thought I'd add that the other file that needs changing is includes/filenames.php where you need to add a define for the name of your folder. So in your previous case, add
    define('FILENAME_VIP', 'vip');
    you then need to edit the line in your new template
    <?php echo zen_draw_form('contact_us', zen_href_link(FILENAME_CONTACT_US, 'action=send')); ?>
    to
    <?php echo zen_draw_form('vip', zen_href_link(FILENAME_VIP, 'action=send')); ?>

    That all seems to work :)

  9. #9
    Join Date
    Jul 2006
    Posts
    16
    Plugin Contributions
    0

    Default Re: Custom contact forms

    I've added a custom contact page for wholesale inquiries, and am trying to add an extra field. The field shows up on the page, but when I test it, the info from that field does not come through. I've been playing around with this for a couple hours, and tried the method listed here, copied the info from the attached files in that message, nothing works so far. I've attached my two files header_php.php and tpl_wholesale_default.php if anyone has a clue what I've screwed up and how to make it work. Thanks!





    Quote Originally Posted by raverX
    i gave up on that module, it was annoying...

    just hacked up the contacts page script to do what i wanted it to do...

    you need to understand forms to some extent, tho ZenCart has functions to do most things which are pretty easy to understand..

    first look in /includes/templates/theme_name/templates/tpl_contact_us_default.php
    copy this to whatever you want your new page to be called (in my case 'vip')
    sp tpl_vip_default.php

    then edit it to suit your requirements

    then goto /includes/modules/pages/contact_us/
    copy that folder to whatever you called your previous one
    ie: /includes/modules/pages/vip/

    then edit 'header_php.php' - this will process your form when you POST to it, you will need to match the variable names to what you put in the tpl file

    you may also need to go to /includes/languages/english/html_includes and copy define_contact_us.php to define_name.php (ie: define_vip.php)

    you will also need to go to /includes/languages/english and copy contact_us.php to the same name (ie: vip.php)

    I think that's all I did.. there may have been one other file that needs changing..

    I've attached a copy of the 4 files mentioned for anyone who wants to use them as a reference.. just ignore the ladym folder as that's the source tree for the project i was working on..
    Attached Files Attached Files

  10. #10
    Join Date
    Oct 2006
    Posts
    1
    Plugin Contributions
    0

    Default Re: Custom contact forms

    This seems to be the only info I could find for how to create a custom form, and I was pleased to see some quality instruction.

    I created my new form and completed all of the steps as instructed, but when I send a test, it just refreshes the screen, with the data that I entered still showing in the boxes, and ads "&action=send" to the end of the URL.

    I know how to create a working form in HTML, but this php thing is new to me. Any suggestions?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. creating custom forms
    By TheMortician4 in forum Customization from the Admin
    Replies: 7
    Last Post: 2 Feb 2012, 04:17 PM
  2. Creating contact forms?
    By sim8729 in forum General Questions
    Replies: 2
    Last Post: 7 Jul 2011, 11:25 PM
  3. forms validation recommendations for contact us??
    By tlyczko in forum General Questions
    Replies: 1
    Last Post: 28 Apr 2010, 06:12 PM
  4. Custom Forms
    By wwiii in forum General Questions
    Replies: 3
    Last Post: 11 May 2009, 05:51 PM
  5. Multiple Contact Us Forms
    By nickelleon in forum General Questions
    Replies: 2
    Last Post: 1 May 2009, 08:59 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR