Setting up a "Request Form"
One of our employees is a photographer, and we are going to start selling prints of her "Stock" city photos as part of our art-prints service. We already have a good selection available, but we want to offer customers a "Requests" form for specific locations and such. I was wanting to use the email submission form from the Contact Us page, but it's set as an internal link, and isn't an EZ-page or loose php file. Where would I find the code for that to copy into the new EZ-page, or is there another, better option that would work for this?
Re: Setting up a "Request Form"
Quote:
Originally Posted by
Lordzoabar
One of our employees is a photographer, and we are going to start selling prints of her "Stock" city photos as part of our art-prints service. We already have a good selection available, but we want to offer customers a "Requests" form for specific locations and such. I was wanting to use the email submission form from the Contact Us page, but it's set as an internal link, and isn't an EZ-page or loose php file. Where would I find the code for that to copy into the new EZ-page, or is there another, better option that would work for this?
I have two request pages setup on my site, both are based on the zencart_get_quote mod. Good starting point, not based on EZ-page.
Re: Setting up a "Request Form"
Quote:
Originally Posted by
davewest
I have two request pages setup on my site, both are based on the
zencart_get_quote mod. Good starting point, not based on EZ-page.
I think I'm a bit confused... I see it in the define pages editor now, and it SOUNDS like it should work, but I have no idea where that file is pointing to or how to see it on the front end, to know what needs to be edited...
Re: Setting up a "Request Form"
Quote:
Originally Posted by
Lordzoabar
I think I'm a bit confused... I see it in the define pages editor now, and it SOUNDS like it should work, but I have no idea where that file is pointing to or how to see it on the front end, to know what needs to be edited...
The defines are information you wish to place on top of the page.. the link to the page needs to be inserted somewhere you wish to advertise it. Such as I did on my home page with a banner image.. it's defined within the home page define.. You can create a banner and add the link to the banner manager and run in any of the banner sections.. even add it to a EZ-page link..
The link is simply a url link as YOUR_URL/index.php?main_page=get_quote
I know the readme is a bit lacking in info and so is the form, which is why I suggested looking at my use of it.. the info gathered by the form is emailed to the shop same as the contact us form.. You can have them emailed to someone else too..
Re: Setting up a "Request Form"
Ok, I'm seeing the page now. When I loaded it in yesterday and went to that link, it just came back saying "page not found".
Now I just need to figure out how to fix the page layout. I assume it's because it's not playing nice with our template.
https://www.athensartandframe.com/in...page=get_quote
Re: Setting up a "Request Form"
Quote:
Originally Posted by
Lordzoabar
Ok, I'm seeing the page now. When I loaded it in yesterday and went to that link, it just came back saying "page not found".
Now I just need to figure out how to fix the page layout. I assume it's because it's not playing nice with our template.
You just need to add some breaks to the form. Just a screen size thing...
Code:
<div id="contact-col-left" class="back">
<label class="inputLabel" for="contactname"><?php echo ENTRY_NAME; ?> <?php echo '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label>
<?php echo zen_draw_input_field('contactname', $name, ' size="40" id="contactname"'); ?>
<br class="clearBoth" />
<label class="inputLabel" for="email-address"><?php echo ENTRY_EMAIL; ?> <?php echo '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label>
<?php echo zen_draw_input_field('email', ($email_address), ' size="40" id="email-address"'); ?>
<br class="clearBoth" />
<label class="inputLabel" for="subject" ><?php echo ENTRY_SUBJECT; ?> <?php echo '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label>
<?php echo zen_draw_input_field('subject', ($email_subject), ' size="40" id="subject"'); ?>
</div>
Someone pointed out that chrome had issues and to use div tag instead of br... I have Chromium which doesn't have that problem so I'm unable to test.
Code:
<div class="clearBoth"></div>
Re: Setting up a "Request Form"
Ok, I've got that looking more or less the way I want. Now my issue is whenever I try to submit a test email, it sends me to "page not found".
I also want to get rid of the "upload file" box, but that's less important.
Re: Setting up a "Request Form"
Quote:
Originally Posted by
Lordzoabar
Ok, I've got that looking more or less the way I want. Now my issue is whenever I try to submit a test email, it sends me to "page not found".
I also want to get rid of the "upload file" box, but that's less important.
I should add, the page is not "broken" or failing to load, and nothing is showing up in the logs. I just hit Submit, and it takes me to the stock 404 page not found.
Re: Setting up a "Request Form"
Quote:
Originally Posted by
Lordzoabar
I should add, the page is not "broken" or failing to load, and nothing is showing up in the logs. I just hit Submit, and it takes me to the stock 404 page not found.
Looking at your page source the form is pointing at define_get_quote and not get_quote right there you would fail submitting the form. the zen ID is also inserted in the draw from link and also as a hidden field which does not match each other so again, the form would fail. I would compare the mod to your files, you may have some things crossed up.
Re: Setting up a "Request Form"
Quote:
Originally Posted by
davewest
Looking at your page source the form is pointing at define_get_quote and not get_quote right there you would fail submitting the form. the zen ID is also inserted in the draw from link and also as a hidden field which does not match each other so again, the form would fail. I would compare the mod to your files, you may have some things crossed up.
So specifically what file should I be looking at? I just did a fresh upload of the mod, no changes except to the YOUR_TEMPLATE folder names and I'm getting the exact same results.
Re: Setting up a "Request Form"
Quote:
Originally Posted by
Lordzoabar
So specifically what file should I be looking at? I just did a fresh upload of the mod, no changes except to the YOUR_TEMPLATE folder names and I'm getting the exact same results.
Sorry... I had to go back to the download and look,, It's not you but I see now its in the tpl_get_quote_default.php code...
line 27 is
Code:
<?php echo zen_draw_form('contact_us', zen_href_link(FILENAME_DEFINE_GET_QUOTE, 'action=send'),'post',' enctype="multipart/form-data" '); ?>
should be
Code:
<?php echo zen_draw_form('contact_us', zen_href_link(FILENAME_GET_QUOTE, 'action=send'),'post',' enctype="multipart/form-data" '); ?>
If you plan on removing the file upload you can remove the
Code:
,' enctype="multipart/form-data"
line too. Only needed for uploading data.
Re: Setting up a "Request Form"
Perfect! That fixed it, and I've more or less got it where I want it. Functioning now, I can make it pretty later. lol
Re: Setting up a "Request Form"
Update: I've since installed the Contact_Us_Subject plugin so that when customers email us through our contact us pages, it will actually show the subject of their message instead of the stock "Website enquiry from...". And I've got it working as it is supposed to with the Contact Us files. When I go and make the same changes in the corresponding get_quote files, it adds the Subject text box to the page, but THOSE emails come through with the stock subject line still.
I'm looking at:
/includes/languages/english/your_template/contact_us.php.txt
/includes/modules/pages/contact_us/header_php.php.txt
/includes/templates/your_template/templates/tpl_contact_us_default.php.txt
and then the get_quote versions in the same locations.
Re: Setting up a "Request Form"
Quote:
Originally Posted by
Lordzoabar
Update: I've since installed the Contact_Us_Subject plugin so that when customers email us through our contact us pages, it will actually show the subject of their message instead of the stock "Website enquiry from...". And I've got it working as it is supposed to with the Contact Us files. When I go and make the same changes in the corresponding get_quote files, it adds the Subject text box to the page, but THOSE emails come through with the stock subject line still.
I'm looking at:
/includes/languages/english/your_template/contact_us.php.txt
/includes/modules/pages/contact_us/header_php.php.txt
/includes/templates/your_template/templates/tpl_contact_us_default.php.txt
and then the get_quote versions in the same locations.
You may have to ask on that mod support page, I use a drop down list for subjects as a required field which plays hell with bots..
The idea would be to create a field in the form for the subject line like input field name 'subject'
in the header, read and clean the submitted field
Code:
$subject = zen_db_prepare_input(zen_sanitize_string($_POST['subject']));
in the zen_mail( line replace EMAIL_SUBJECT with $subject
You can test the email string by dropping a test line in above zen_mail and create a test request. don't forget to comment out the line before going live.
Code:
die ('|| ' . $send_to_name . ' | ' . $send_to_email . ' | ' . $subject . ' | ' . $text_message . ' | ' . $name . ' | ' . $email_address . ' | ' . $html_msg);
Match the test to your form, I send both html and text with more info then what this mod does.