[email protected]. Posted May 14, 2015 Share Posted May 14, 2015 I have installed crafty clicks from the market place using the lightning symbol and it is in my plugins, I have entered my access token and enabled it but nothiing is showing on the checkout page that relates to a postcode search! Any help as usual greatly appreciated.Using the latest version of CC Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 14, 2015 Share Posted May 14, 2015 Their blurb on the Marketplace says, "The Find Address button is hidden for non-UK visitors."In your testing, does CubeCart know where the customer is located? Quote Link to comment Share on other sites More sharing options...
[email protected]. Posted May 14, 2015 Author Share Posted May 14, 2015 to start with it's me just bench testing and I am definitely in the UK Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 14, 2015 Share Posted May 14, 2015 But does CubeCart know that?Specifically, at checkout, does CubeCart show a UK address in the Billing Address and Delivery Address group of form fields? Or are they blank? Are there shipping charges listed without the indicator that says these are estimates only? Quote Link to comment Share on other sites More sharing options...
[email protected]. Posted May 14, 2015 Author Share Posted May 14, 2015 (edited) Sorry - misunderstood where you were coming from! CC does show me as in the UK at checkout...Please try by putting a catalogue in the basket and see if it makes sense to youhttps://www.themodeltreeshop.co.uk/catalogue.html Edited May 14, 2015 by [email protected]. Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 14, 2015 Share Posted May 14, 2015 According to how I understand the CraftClicks plugin works, it wants to give to the template two javascript files using a method that loads references to the files in the {$HEAD_JS} array.The {$HEAD_JS} array is not found in skins designed for CC5 -- which includes Vector.Are you comfortable with editing HTML files? We can try to add the array to the Vector template.Or you could contact the publisher and ask if they have a version for CC5. Quote Link to comment Share on other sites More sharing options...
[email protected]. Posted May 14, 2015 Author Share Posted May 14, 2015 I'm not very comfy with it but have a couple of contact who could do this for me... Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 14, 2015 Share Posted May 14, 2015 In the Vector skin template file main.php, find: </head> <body id="section-{$SECTION_NAME}"> On a new blank line just above that, add: {foreach from=$HEAD_JS item=js}{$js}{/foreach} Because we have edited a skin template, we need to clear the skin template cache. So, in admin, Maintenance, Rebuild tab, check the Clear Cache box and Submit. Quote Link to comment Share on other sites More sharing options...
[email protected]. Posted May 14, 2015 Author Share Posted May 14, 2015 unfortunately that didn't work... Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 14, 2015 Share Posted May 14, 2015 I expected to see the javascript that the plugin is supposed to put here.Please verify that the module is enabled. Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 14, 2015 Share Posted May 14, 2015 As a test, please add an HTML comment above and below what was added earlier. Such as:<!-- Head_JS Insertion Point, Crafty Clicks --> {foreach from=$HEAD_JS item=js}{$js}{/foreach} <!-- HEAD_JS End -->Then, if I don't see the comments, I will conclude that perhaps the cache was not cleared, or the wrong file edited. Quote Link to comment Share on other sites More sharing options...
[email protected]. Posted May 15, 2015 Author Share Posted May 15, 2015 The lines have been added to public_html/skins/vector/templates/main.php the cache cleared but still no joy yet. Thanks for your perseverence so far. Quote Link to comment Share on other sites More sharing options...
[email protected]. Posted May 15, 2015 Author Share Posted May 15, 2015 (edited) Main.php Edited May 15, 2015 by [email protected]. Quote Link to comment Share on other sites More sharing options...
[email protected]. Posted May 15, 2015 Author Share Posted May 15, 2015 (edited) code deleted Edited May 15, 2015 by [email protected]. Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 15, 2015 Share Posted May 15, 2015 Please edit the post above and remove all that code.<!-- Head_JS Insertion Point, Crafty Clicks --> {foreach from=$HEAD_JS item=js}{$js}{/foreach} <!-- HEAD_JS End --> {foreach from=$HEAD_JS item=js}{$js}{/foreach} <!-- Head_JS Insertion Point, Crafty Clicks --> {foreach from=$HEAD_JS item=js}{$js}{/foreach} <!-- HEAD_JS End -->There is now three times what was needed to be added. Change the above, to just one instance:<!-- Head_JS Insertion Point, Crafty Clicks --> {foreach from=$HEAD_JS item=js}{$js}{/foreach} <!-- HEAD_JS End --> However, I now see that the browser is complaining that jQuery is not yet up and running when these functions are first seen.So, for the Vector skin, move the above three lines from where they are now, and place them:After: <!-- Plugin JavaScripts --> {foreach from=$JS_SCRIPTS key=k item=script} <script src="{$STORE_URL}/{$script}"></script> {/foreach} This may also not work because I see the PayPal Acceptance javascript is also having a problem.We may need to get creative in solving this for the Vector skin. Quote Link to comment Share on other sites More sharing options...
[email protected]. Posted May 15, 2015 Author Share Posted May 15, 2015 (edited) Do you mean all the underlined code? Meanwhile we have switched to foundation - apparently there are a few issues with Vector!(cost a lot of money not so long back) Edited May 15, 2015 by [email protected]. Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 15, 2015 Share Posted May 15, 2015 Please delete all the code in the post above that you copy/pasted from main.php. Quote Link to comment Share on other sites More sharing options...
[email protected]. Posted May 15, 2015 Author Share Posted May 15, 2015 I think I have done that right now - but as you suspected it still isn't flying...your knowledge and skill is appreciated and no I'm not a sycophant Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 15, 2015 Share Posted May 15, 2015 And now, in the forum post above, delete all the code that you copied from your browser and pasted into that post."Meanwhile we have switched to foundation"I am still seeing the Vector skin that your site is using. Quote Link to comment Share on other sites More sharing options...
[email protected]. Posted May 15, 2015 Author Share Posted May 15, 2015 Done that, switched back again to do the editing Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted May 15, 2015 Share Posted May 15, 2015 Delete all the code you copied into your forum posts above - just leave something along the line of "code deleted". Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 15, 2015 Share Posted May 15, 2015 What we will now try is to make Vector fetch the CraftyClicks javascript files directly, instead of trying to make Vector behave like a CC6 skin.So, I will give you a set of instructions, and hopefully you will get what you want.First, the statements you earlier added to the template main.php, you can delete.Next, in the file /skins/vector/js/application.js, at the bottom:Find: {bar: skin_path + '/js/plugins/jquery.bar.min.js'}, {flexslider: skin_path + '/js/plugins/jquery.flexslider.min.js'} ); Change to: {bar: skin_path + '/js/plugins/jquery.bar.min.js'}, {craftyclick1: skin_path + '/js/plugins/crafty_postcode.class.js'}, {craftyclick2: skin_path + '/js/plugins/craftyclicks.js'}, {flexslider: skin_path + '/js/plugins/jquery.flexslider.min.js'} ); Copy the following two files from the folder /modules/plugins/CraftyClicks/js/crafty_postcode.class.jscraftyclicks.jsand place those copies in the folder /skins/vector/js/plugins/In the file /skins/vector/templates/main.php:Find: <!-- Plugin JavaScripts --> {foreach from=$JS_SCRIPTS key=k item=script} <script src="{$STORE_URL}/{$script}"></script> {/foreach} Add BEFORE: <script>var trans_token = {Config::getInstance()->get('CraftyClicks','token')}</script> Summary: We have copied CraftyClick files to a place where Vector can get them directly, and told Vector to get them directly. Quote Link to comment Share on other sites More sharing options...
[email protected]. Posted May 16, 2015 Author Share Posted May 16, 2015 Thanks for the easy to follow instructions, I think I followed them all but still no joy. Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 16, 2015 Share Posted May 16, 2015 Please make this change:From:<script>var trans_token = {Config::getInstance()->get('CraftyClicks','token')}</script>To:<script>var trans_token = '{Config::getInstance()->get('CraftyClicks','token')}'</script>I forgot the quote marks around the variable's value.There is also another error regarding the /includes/extra/PayPal_acceptance.js file. We may have to do to it exactly the same steps as what we did for the CraftyClicks files. Quote Link to comment Share on other sites More sharing options...
[email protected]. Posted May 16, 2015 Author Share Posted May 16, 2015 Now we're cooking with gas! The post code search works fine Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.