Inspired by this thread: http://forum.opencart.com/viewtopic.php?f=20&t=53452
Special thanks to Eyechild for his patience getting the code right.
What it does:
Adds a contact form to one of your information pages
eg: Instructions are included with the zip. Make sure that you read them carefully or it won't work.
Tested on 1.5.1.3 only.
Special thanks to Eyechild for his patience getting the code right.
What it does:
Adds a contact form to one of your information pages
eg: Instructions are included with the zip. Make sure that you read them carefully or it won't work.
Tested on 1.5.1.3 only.
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
UPDATE: version below now has drop down selection for country and state/zone as well as a field for confirming that the correct email address was entered.
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
Awesome work - Hi is there anyway after this form is sent that the email goes to the admin email and also to person sending the form with a link to a pdf to download?
Thank you for your contribute,
I got an error with the 1.4.9
Call to a member function link() on a non-object in .../vq2-catalog_controller_information_information.php on line 12
Do you have any idea on how can I fix this bug?
Thanks a lot
I got an error with the 1.4.9
Call to a member function link() on a non-object in .../vq2-catalog_controller_information_information.php on line 12
Do you have any idea on how can I fix this bug?
Thanks a lot
I'm sure that it could be done. Maybe ask on the thread listed in the first post as this is where all of the info came from to make this vQmod.visnetmedia wrote:Awesome work - Hi is there anyway after this form is sent that the email goes to the admin email and also to person sending the form with a link to a pdf to download?
EDIT: I see that you've already asked there. Hopefully SkipperTheEyeChild can help.
Last edited by philbydevil on Tue Apr 10, 2012 12:39 pm, edited 1 time in total.
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
As mentioned in the first post, this is tested on 1.5.1.3 only. You'll have to look through the vQmod and the files that it references as I'm sure that there are many differences that won't work "out of the box" in the 1.4.9.giovanni.davi wrote:Thank you for your contribute,
I got an error with the 1.4.9
Call to a member function link() on a non-object in .../vq2-catalog_controller_information_information.php on line 12
Do you have any idea on how can I fix this bug?
Thanks a lot
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
Hi the dropdowns are awesome - is there a way to have this show in fancybox - I see some code in there:
Would be really cool if on the information page you have a link and it pops up to use saving space on a large page. Is this possible or is this code for something else?
Thanks again...
Code: Select all
<add><![CDATA[
<script type="text/javascript"><!--
$('select[name=\'zone_id\']').load('index.php?route=account/register/zone&country_id=<?php echo $country_id; ?>&zone_id=<?php echo $zone_id; ?>');
//--></script>
<script type="text/javascript"><!--
$('.fancybox').fancybox({
width: 560,
height: 560,
autoDimensions: false
});
//--></script>
]]></add>
Thanks again...
Hi I gave it a try and the fancybox shows but is blank - this is what I put in can you please tell me what I can change to get it to work:
Code: Select all
<file name="catalog/view/theme/default/template/information/information.tpl">
<operation>
<search position="after"><![CDATA[
<?php echo $description; ?>
]]></search>
<add><![CDATA[
<?php if ($this->request->get['information_id'] == 9) { ?>
<a href="#contactfrm" title="Conference Form" class="fancybox"> Click Here To Enquire About Allan's Conference Events</a>
<div id="contactfrm" style="display:none;">
<form action="" method="post" enctype="multipart/form-data" id="contact">
<div class="content">
<div class="left"><span class="required">*</span> <b><?php echo $text_name; ?></b><br />
<input type="text" name="name" value="<?php echo $name; ?>" />
<br />
<?php if ($error_name) { ?>
<span class="error"><?php echo $error_name; ?></span>
<?php } ?>
<br />
<span class="required">*</span> <b><?php echo $text_company; ?></b><br />
<input type="text" name="company" value="<?php echo $company; ?>" />
<br />
<?php if ($error_company) { ?>
<span class="error"><?php echo $error_company; ?></span>
<?php } ?>
<br />
<span class="required">*</span> <b><?php echo $text_street_address; ?></b><br />
<input type="text" name="street_address" value="<?php echo $street_address; ?>" />
<br />
<?php if ($error_street_address) { ?>
<span class="error"><?php echo $error_street_address; ?></span>
<?php } ?>
<br />
<b><?php echo $text_street_address_2; ?></b><br />
<input type="text" name="street_address_2" value="<?php echo $street_address_2; ?>" />
<br />
<?php if ($error_street_address_2) { ?>
<span class="error"><?php echo $error_street_address_2; ?></span>
<?php } ?>
<br />
<span class="required">*</span> <b><?php echo $text_suburb; ?></b><br />
<input type="text" name="suburb" value="<?php echo $suburb; ?>" />
<br />
<?php if ($error_suburb) { ?>
<span class="error"><?php echo $error_suburb; ?></span>
<?php } ?>
<br />
<span class="required">*</span> <b><?php echo $text_postcode; ?></b><br />
<input type="text" name="postcode" value="<?php echo $postcode; ?>" />
<br />
<?php if ($error_postcode) { ?>
<span class="error"><?php echo $error_postcode; ?></span>
<?php } ?>
<br />
<span class="required">*</span> <b><?php echo $text_country; ?></b></b><br />
<select name="country_id" onchange="$('select[name=\'zone_id\']').load('index.php?route=account/register/zone&country_id=' + this.value + '&zone_id=<?php echo $zone_id; ?>');">
<option value=""><?php echo $text_select; ?></option>
<?php foreach ($countries as $country) { ?>
<?php if ($country['country_id'] == $country_id) { ?>
<option value="<?php echo $country['country_id']; ?>" selected="selected"><?php echo $country['name']; ?></option>
<?php } else { ?>
<option value="<?php echo $country['country_id']; ?>"><?php echo $country['name']; ?></option>
<?php } ?>
<?php } ?>
</select>
<br/>
<?php if ($error_country) { ?>
<span class="error"><?php echo $error_country; ?></span>
<?php } ?>
<br />
<span class="required">*</span> <b><?php echo $text_zone; ?></b><br />
<select name="zone_id">
</select>
<br/>
<?php if ($error_zone) { ?>
<span class="error"><?php echo $error_zone; ?></span>
<?php } ?>
<br />
<b><?php echo $text_enquiry; ?></b><br />
<textarea name="enquiry" cols="40" rows="10" style="width: 80%;"><?php echo $enquiry; ?></textarea>
<br />
<?php if ($error_enquiry) { ?>
<span class="error"><?php echo $error_enquiry; ?></span>
<?php } ?>
<br /></div>
<div class="right"><span class="required">*</span> <b><?php echo $text_phone; ?></b><br />
<input type="text" name="phone" value="<?php echo $phone; ?>" />
<br />
<?php if ($error_phone) { ?>
<span class="error"><?php echo $error_phone; ?></span>
<?php } ?>
<br />
<b><?php echo $text_mobile; ?></b><br />
<input type="text" name="mobile" value="<?php echo $mobile; ?>" />
<br />
<?php if ($error_mobile) { ?>
<span class="error"><?php echo $error_mobile; ?></span>
<?php } ?>
<br />
<span class="required">*</span> <b><?php echo $text_email; ?></b><br />
<input type="text" name="email" value="<?php echo $email; ?>" />
<br />
<?php if ($error_email) { ?>
<span class="error"><?php echo $error_email; ?></span>
<?php } ?>
<br />
<span class="required">*</span> <b><?php echo $text_confirm; ?></b></b><br />
<input type="text" name="confirm" value="<?php echo $confirm; ?>" />
<br/>
<?php if ($error_confirm) { ?>
<span class="error"><?php echo $error_confirm; ?></span>
<?php } ?>
<br />
<span class="required">*</span> <b><?php echo $text_captcha; ?></b><br />
<input type="text" name="captcha" value="<?php echo $captcha; ?>" />
<br />
<img src="index.php?route=information/contact/captcha" alt="" />
<?php if ($error_captcha) { ?>
<span class="error"><?php echo $error_captcha; ?></span>
<?php } ?>
<br /><br /><br />
<div class="buttons">
<a onclick="$('#contact').submit();" class="button"><span>Submit Event Enquiry!</span></a></div>
</div>
</div>
</form>
</div>
<?php } ?>
]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[
<div class="right"><a href="<?php echo $continue; ?>" class="button"><span><?php echo $button_continue; ?></span></a></div>
]]></search>
<add><![CDATA[
<div class="breadcrumb"><br /></div><div class="right"><a href="<?php echo $continue; ?>" class="button"><span><?php echo $button_return_home; ?></span></a></div>
]]></add>
</operation>
<operation>
<search position="after"><![CDATA[
<?php echo $content_bottom; ?></div>
]]></search>
<add><![CDATA[
<script type="text/javascript"><!--
$('select[name=\'zone_id\']').load('index.php?route=account/register/zone&country_id=<?php echo $country_id; ?>&zone_id=<?php echo $zone_id; ?>');
//--></script>
<script type="text/javascript"><!--
$('.fancybox').fancybox({
width: 560,
height: 560,
autoDimensions: false
});
//--></script>
]]></add>
</operation>
</file>
Hi I have changed this xml to not have the country dropdown but keep getting this error:
Is there anyway I can stop this error?
Thanks - it works well.
Code: Select all
PHP Notice: Undefined variable: country_id in /home/peaseint/public_html/vqmod/vqcache/vq2-catalog_view_theme_default_template_information_information.tpl on line 101
PHP Notice: Undefined variable: zone_id in /home/peaseint/public_html/vqmod/vqcache/vq2-catalog_view_theme_default_template_information_information.tpl on line 101
Thanks - it works well.
I don't think you've removed the country/zone completely.
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
Does this work on 1.5.4.1?
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
Hi Im using versoin 1.5.3.1.
However was unable to have it working.
Please assist in where and which lines of code to make changes for it to work on 1.5.3.1.
Thank you.
However was unable to have it working.
Please assist in where and which lines of code to make changes for it to work on 1.5.3.1.
Thank you.
For 1.5.5.1it wasn't working so I just modified the following:
Code: Select all
[b]Replace line 37:[/b]
<search position="bottom" offset="2"><![CDATA[
]]></search>
[b]TO:[/b]
<search position="bottom" offset="2"><![CDATA[
}
?>
]]></search>
Hi phil
don't seem to be getting this to work think its done ok
supposed to go to this page http://tonerrefilluk.co.uk/toner-cartri ... ng-service
Hope you can help
Garry
don't seem to be getting this to work think its done ok
supposed to go to this page http://tonerrefilluk.co.uk/toner-cartri ... ng-service
Hope you can help
Garry
Code: Select all
</operation>
</file>
<file name="catalog/language/english/english.php">
<operation>
<search position="after"><![CDATA[
$_['button_continue'] = 'Continue';
]]></search>
<add><![CDATA[
$_['button_return_home'] = 'Homepage';
]]></add>
</operation>
</file>
<file name="catalog/view/theme/otp716/template/information/information.tpl">
<operation>
<search position="after"><![CDATA[
<?php echo $description; ?>
]]></search>
<add><![CDATA[
<?php if ($this->request->get['information_id'] == 13) { ?>
<form action="" method="post" enctype="multipart/form-data" id="contact">
<div class="content">
<div class="left"><span class="required">*</span> <b><?php echo $text_name; ?></b><br />
<input type="text" name="name" value="<?php echo $name; ?>" />
<br />
<?php if ($error_name) { ?>
<span class="error"><?php echo $error_name; ?></span>
<?php } ?>
<br />
<span class="required">*</span> <b><?php echo $text_company; ?></b><br />
<input type="text" name="company" value="<?php echo $company; ?>" />
<br />
<?php if ($error_company) { ?>
<span class="error"><?php echo $error_company; ?></span>
<?php } ?>
<br />
<span class="required">*</span> <b><?php echo $text_street_address; ?></b><br />
<input type="text" name="street_address" value="<?php echo $street_address; ?>" />
<br />
<?php if ($error_street_address) { ?>
<span class="error"><?php echo $error_street_address; ?></span>
<?php } ?>
<br />
<b><?php echo $text_street_address_2; ?></b><br />
<input type="text" name="street_address_2" value="<?php echo $street_address_2; ?>" />
<br />
<?php if ($error_street_address_2) { ?>
<span class="error"><?php echo $error_street_address_2; ?></span>
<?php } ?>
<br />
<span class="required">*</span> <b><?php echo $text_suburb; ?></b><br />
<input type="text" name="suburb" value="<?php echo $suburb; ?>" />
<br />
<?php if ($error_suburb) { ?>
<span class="error"><?php echo $error_suburb; ?></span>
<?php } ?>
<br />
<span class="required">*</span> <b><?php echo $text_postcode; ?></b><br />
<input type="text" name="postcode" value="<?php echo $postcode; ?>" />
<br />
<?php if ($error_postcode) { ?>
<span class="error"><?php echo $error_postcode; ?></span>
<?php } ?>
<br />
<span class="required">*</span> <b><?php echo $text_country; ?></b></b><br />
<select name="country_id" onchange="$('select[name=\'zone_id\']').load('index.php?route=account/register/zone&country_id=' + this.value + '&zone_id=<?php echo $zone_id; ?>');">
<option value=""><?php echo $text_select; ?></option>
<?php foreach ($countries as $country) { ?>
<?php if ($country['country_id'] == $country_id) { ?>
<option value="<?php echo $country['country_id']; ?>" selected="selected"><?php echo $country['name']; ?></option>
<?php } else { ?>
<option value="<?php echo $country['country_id']; ?>"><?php echo $country['name']; ?></option>
<?php } ?>
<?php } ?>
</select>
<br/>
<?php if ($error_country) { ?>
<span class="error"><?php echo $error_country; ?></span>
<?php } ?>
<br />
<span class="required">*</span> <b><?php echo $text_zone; ?></b><br />
<select name="zone_id">
</select>
<br/>
<?php if ($error_zone) { ?>
<span class="error"><?php echo $error_zone; ?></span>
<?php } ?>
<br />
<b><?php echo $text_enquiry; ?></b><br />
<textarea name="enquiry" cols="40" rows="10" style="width: 80%;"><?php echo $enquiry; ?></textarea>
<br />
<?php if ($error_enquiry) { ?>
<span class="error"><?php echo $error_enquiry; ?></span>
<?php } ?>
<br /></div>
<div class="right"><span class="required">*</span> <b><?php echo $text_phone; ?></b><br />
<input type="text" name="phone" value="<?php echo $phone; ?>" />
<br />
<?php if ($error_phone) { ?>
<span class="error"><?php echo $error_phone; ?></span>
<?php } ?>
<br />
<b><?php echo $text_mobile; ?></b><br />
<input type="text" name="mobile" value="<?php echo $mobile; ?>" />
<br />
<?php if ($error_mobile) { ?>
<span class="error"><?php echo $error_mobile; ?></span>
<?php } ?>
<br />
<span class="required">*</span> <b><?php echo $text_email; ?></b><br />
<input type="text" name="email" value="<?php echo $email; ?>" />
<br />
<?php if ($error_email) { ?>
<span class="error"><?php echo $error_email; ?></span>
<?php } ?>
<br />
<span class="required">*</span> <b><?php echo $text_confirm; ?></b></b><br />
<input type="text" name="confirm" value="<?php echo $confirm; ?>" />
<br/>
<?php if ($error_confirm) { ?>
<span class="error"><?php echo $error_confirm; ?></span>
<?php } ?>
<br />
<b><?php echo $text_website; ?></b><br />
<input type="text" name="website" value="<?php echo $website; ?>" />
<br />
<?php if ($error_website) { ?>
<span class="error"><?php echo $error_website; ?></span>
<?php } ?>
<br />
<span class="required">*</span> <b><?php echo $text_captcha; ?></b><br />
<input type="text" name="captcha" value="<?php echo $captcha; ?>" />
<br />
<img src="index.php?route=information/contact/captcha" alt="" />
<?php if ($error_captcha) { ?>
<span class="error"><?php echo $error_captcha; ?></span>
<?php } ?>
<br /><br /><br />
<div class="buttons">
<a onclick="$('#contact').submit();" class="button"><span>Submit Listing!</span></a></div>
</div>
</div>
</form>
<?php } ?>
]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[
<div class="right"><a href="<?php echo $continue; ?>" class="button"><span><?php echo $button_continue; ?></span></a></div>
]]></search>
<add><![CDATA[
<div class="right"><a href="<?php echo $continue; ?>" class="button"><span><?php echo $button_return_home; ?></span></a></div>
]]></add>
</operation>
<operation>
<search position="after"><![CDATA[
<?php echo $content_bottom; ?></div>
]]></search>
<add><![CDATA[
<script type="text/javascript"><!--
$('select[name=\'zone_id\']').load('index.php?route=account/register/zone&country_id=<?php echo $country_id; ?>&zone_id=<?php echo $zone_id; ?>');
//--></script>
<script type="text/javascript"><!--
$('.fancybox').fancybox({
width: 560,
height: 560,
autoDimensions: false
});
//--></script>
]]></add>
</operation>
</file>
</modification>
I am trying to get working this contact mod, but I cant figure out what I am doing wrong. I followed instruction and edited xml file, but contact for is still not showing on information page at all. Is there any code that I need to insert also to the page itself or something else I am missing?
Any idea if this will work for 1.5.6.4, or if there's any recommended extension available for something like this? I found one, but the support seems to be lacking at best.
Who is online
Users browsing this forum: No registered users and 41 guests