X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   UK Electoral Role Check and Google Maps Link (https://forum.x-cart.com/showthread.php?t=31913)

bigmaggot 06-18-2007 07:48 AM

UK Electoral Role Check and Google Maps Link
 
Hi,

Have found this mod to be very useful and thought I would share, it has loads of possibilities so please add to this code. Designed for 4.0.18, haven't looked at it for 4.1.x branch.

With a click of a button it can do the following:

Electroral role check
Check post code in google maps (you can then view maps etc)
Calculate shipping and billing address route

Very easy to install:

Edit skin1/main/order_info.tpl

Add the following at the end:

{if $usertype eq 'A'}
{literal}
<form class="homesearch" id="search" name="search" action="http://www.192.com/search/search.cfm" method="post" enctype="application/x-www-form-urlencoded" target="_blank">
<input type="hidden" name="section" value="all" />
<input type="hidden" name="view" value="S" />
<input type="text" name="who" id="who" autocomplete="off" value="{/literal}{$customer.b_lastname}{literal}" />
<input type="text" name="location" id="location" autocomplete="off" value="{/literal}{$customer.b_zipcode}{literal}" />
<input type="submit" name="btnSearch" id="btnSearch" onClick="if(isSubmittable('who') == true){document.forms[0].submit();} else {return false;}" value="Billing 192" class="submit" />
&nbsp; <a href="http://www.google.co.uk/search?hl=en&q={/literal}{$customer.b_zipcode}{literal}&btnG=Google +Search&meta=cr%3DcountryUK%7CcountryGB" target="_blank">Google Search</a>

&nbsp; <a href="http://maps.google.co.uk/maps?q={/literal}{$customer.b_zipcode}{literal}" target="_blank">Google Map</a>
</form>

<br>
<form class="homesearch" id="search" name="search" action="http://www.192.com/search/search.cfm" method="post" enctype="application/x-www-form-urlencoded" target="_blank">
<input type="hidden" name="section" value="all" />
<input type="hidden" name="view" value="S" />
<input type="text" name="who" id="who" autocomplete="off" value="{/literal}{$customer.s_lastname}{literal}" />
<input type="text" name="location" id="location" autocomplete="off" value="{/literal}{$customer.s_zipcode}{literal}" />
<input type="submit" name="btnSearch" id="btnSearch" onClick="if(isSubmittable('who') == true){document.forms[0].submit();} else {return false;}" value="Shipping 192" class="submit" />
&nbsp; <a href="http://www.google.co.uk/search?hl=en&q={/literal}{$customer.s_zipcode}{literal}&btnG=Google +Search&meta=cr%3DcountryUK%7CcountryGB" target="_blank">Google Search</a>
&nbsp; <a href="http://maps.google.co.uk/maps?q={/literal}{$customer.s_zipcode}{literal}" target="_blank">Google Map</a>
</form>

<br>
<a href="http://maps.google.co.uk/maps?q={/literal}{$customer.b_zipcode}{literal}+to+{/literal}{$customer.s_zipcode}{literal}" target="_blank">Google Map Directions</a>
{/literal}
{/if}

Please let me know what you think.

Cheers,

Andy

chamberinternet 06-18-2007 10:10 AM

Re: UK Electoral Role Check and Google Maps Link
 
Cool ! ...
Works with 4.1.7 too :)

Nice one Andy.

Regards

Shafiq :sK

cotc2001 06-18-2007 02:42 PM

Re: UK Electoral Role Check and Google Maps Link
 
and in 4.0.5 - nice addition

vtonya 06-20-2007 08:10 AM

Re: UK Electoral Role Check and Google Maps Link
 
Thank you very much for your share.
Works in 4.1.7 too

dfawdon 06-20-2007 11:45 AM

Re: UK Electoral Role Check and Google Maps Link
 
Cheers Andy, Very handy little add-on :D


All times are GMT -8. The time now is 05:44 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.