RE: Integrating Fast Easy Checkout with Crafty Clicks UK post code lookup
Hi,
I am new to Numinix. I see you have many wonderful and useful add ons for zen cart. I downloaded your fast easy checkout and followed the install instructions carefully. It works perfectly absolutely amazing!! thanks so much!
My problem is I use a module by craftyclicks.co.uk to call up post codes automatically. While the option appears on all the change address pages, the unique Numinix pages, like create account page, doesnt show it at all. So I did a little digging and re-read the crafty clicks install instructions again.
Here they are:
You will need to modify:
includes/templates/template_default/templates/tpl_modules_address_book_details.php
includes/templates/template_default/templates/tpl_modules_checkout_new_address.php
includes/templates/template_default/templates/tpl_modules_create_account.php
admin/customers.php
*** NOTE *** : 'template_default' needs to be substituted with your own template directory name.
++++++++++++++++++++++++++++++++++++++++++++< STEP 2.1 >++++++++++++++++++++++++++++++++++++++++++++
In file includes/templates/YOURTEMPLATE/templates/tpl_modules_address_book_details.php
INSERT AT THE TOP (around line 13, after the comments)
<?php
require(DIR_WS_MODULES.'craftyclicks/crafty_html_output.php');
echo tep_crafty_script_add('addressbook', 1);
?>
FIND (around line 97)
<?php echo zen_draw_input_field('postcode', $entry->fields['entry_postcode'], zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_postcode', '40') . ' id="postcode"') . (zen_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="alert">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?>
INSERT before the last semicolon
. ' ' . tep_crafty_button_add(1)
THE RESULT SHOULD BE
<?php echo zen_draw_input_field('postcode', $entry->fields['entry_postcode'], zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_postcode', '40') . ' id="postcode"') . (zen_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="alert">' . ENTRY_POST_CODE_TEXT . '</span>': ''). ' ' . tep_crafty_button_add(1); ?>
FIND (just below around line 98)
<br class="clearBoth" />
INSERT AFTER
<span id="crafty_postcode_result_display"> </span>
<br class="clearBoth" />
INSERT AT THE BOOTM OF THE FILE:
<? echo tep_crafty_country_handler(1); ?>
++++++++++++++++++++++++++++++++++++++++++++< STEP 2.2 >++++++++++++++++++++++++++++++++++++++++++++
In file includes/templates/YOURTEMPLATE/templates/tpl_modules_checkout_new_address.php
INSERT AT THE TOP (around line 13, after the comments)
<?php
require(DIR_WS_MODULES.'craftyclicks/crafty_html_output.php');
echo tep_crafty_script_add('checkout_address', 1);
?>
FIND (around line 94)
<?php echo zen_draw_input_field('postcode', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_postcode', '40') . ' id="postcode"') . (zen_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="alert">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?>
INSERT before the last semicolon
. ' ' . tep_crafty_button_add(1)
THE RESULT SHOULD BE
<?php echo zen_draw_input_field('postcode', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_postcode', '40') . ' id="postcode"') . (zen_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="alert">' . ENTRY_POST_CODE_TEXT . '</span>': ''). ' ' . tep_crafty_button_add(1); ?>
FIND (just below around line 95)
<br class="clearBoth" />
INSERT AFTER
<span id="crafty_postcode_result_display"> </span>
<br class="clearBoth" />
INSERT AT THE BOOTM OF THE FILE:
<? echo tep_crafty_country_handler(1); ?>
++++++++++++++++++++++++++++++++++++++++++++< STEP 2.3 >++++++++++++++++++++++++++++++++++++++++++++
In file includes/templates/YOURTEMPLATE/templates/tpl_modules_create_account.php
INSERT AT THE TOP (around line 14, after the comments)
<?php
require(DIR_WS_MODULES.'craftyclicks/crafty_html_output.php');
echo tep_crafty_script_add('create_account', 1);
?>
FIND (around line 110)
<?php echo zen_draw_input_field('postcode', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_postcode', '40') . ' id="postcode"') . (zen_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="alert">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?>
INSERT before the last semicolon
. ' ' . tep_crafty_button_add(1)
THE RESULT SHOULD BE
<?php echo zen_draw_input_field('postcode', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_postcode', '40') . ' id="postcode"') . (zen_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="alert">' . ENTRY_POST_CODE_TEXT . '</span>': ''). ' ' . tep_crafty_button_add(1); ?>
FIND (just below around line 111)
<br class="clearBoth" />
INSERT AFTER
<span id="crafty_postcode_result_display"> </span>
<br class="clearBoth" />
INSERT AT THE BOOTM OF THE FILE:
<? echo tep_crafty_country_handler(1); ?>
++++++++++++++++++++++++++++++++++++++++++++< STEP 2.4 >++++++++++++++++++++++++++++++++++++++++++++
In file admin/customers.php
FIND (around line 485)
</head>
INSERT BEFORE:
<?php
require(DIR_FS_CATALOG.DIR_WS_MODULES.'craftyclicks/crafty_html_output.php');
echo tep_crafty_script_add('customers', 1, true);
?>
FIND (around line 703)
<?php
if ($error == true) {
if ($entry_post_code_error == true) {
echo zen_draw_input_field('entry_postcode', $cInfo->entry_postcode, zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_postcode', 10)) . ' ' . ENTRY_POST_CODE_ERROR;
} else {
echo $cInfo->entry_postcode . zen_draw_hidden_field('entry_postcode');
}
} else {
echo zen_draw_input_field('entry_postcode', $cInfo->entry_postcode, zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_postcode', 10), true);
}
?></td>
</tr>
INSERT before the ?></td>
echo ' ' . tep_crafty_button_add(1);
INSERT after the </tr>
<tr>
<td class="main"> </td>
<td class="main" id="crafty_postcode_result_display"> </td>
</tr>
THE RESULT SHOULD BE
<?php
if ($error == true) {
if ($entry_post_code_error == true) {
echo zen_draw_input_field('entry_postcode', $cInfo->entry_postcode, zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_postcode', 10)) . ' ' . ENTRY_POST_CODE_ERROR;
} else {
echo $cInfo->entry_postcode . zen_draw_hidden_field('entry_postcode');
}
} else {
echo zen_draw_input_field('entry_postcode', $cInfo->entry_postcode, zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_postcode', 10), true);
}
echo ' ' . tep_crafty_button_add(1);
?></td>
</tr>
<tr>
<td class="main"> </td>
<td class="main" id="crafty_postcode_result_display"> </td>
</tr>
AT THE BOTTOM OF THE FILE ADD
<? echo tep_crafty_country_handler(1); ?>
SO, I thought that Fast easy checkout must use extra files for the create account page. I found and modified
tpl_modules_fec_change_checkout_new_address.php with the above amendments.
I got the Crafty Clicks button to appear next to the post code box even on the new easy checkout page.
BUT I cant click it, I mean nothing happens.
So im stuck.
I think I probably need to amend some other FEC files but im not sure which
Would you mind to give me some direction please?
Is it the Jscript files or some other tpl file
Let me know if you can as I would like my first Numinix experience to be a really good one.
Thanks!!


Reply With Quote


Good Luck!

