Guest Dazmanjunket Posted October 5, 2011 Share Posted October 5, 2011 Hi just wondering being new to Cubecart where do I need to look to start adding some external php/java/ajax code to and existing document in the main content page> I have created a document in the admin panel for partner searches, which will use a store locator postcode search with geocoding, do I need to create a separate .php file or can I add the code for the external web app straight to the page editor using the source option in the editor? Any help would be useful. Quote Link to comment Share on other sites More sharing options...
Guest john323232 Posted October 5, 2011 Share Posted October 5, 2011 You must study SMARTY, in practise your php routine become a type of function with parameter and with a sort of template-call you can put it in your code. It's more simple if you seek for smarty in gogle and study from example. I know you must study a new programming style but it will be a good idea. i have solved several type of problem for example i have added external reference at other database or i have modified template to show my data. Hi just wondering being new to Cubecart where do I need to look to start adding some external php/java/ajax code to and existing document in the main content page> I have created a document in the admin panel for partner searches, which will use a store locator postcode search with geocoding, do I need to create a separate .php file or can I add the code for the external web app straight to the page editor using the source option in the editor? Any help would be useful. Quote Link to comment Share on other sites More sharing options...
Guest kieranbarnes Posted October 6, 2011 Share Posted October 6, 2011 Your question has two answers... You need to edit skins/your-theme/templates/main.php 1. Adding JS is easy. Just paste the code in surrounded by {literal} {/literal} 2. PHP code is similar but has an extra step, see http://bloke.org/php/snippet-allow-php-in-smarty-cubecart-5/ Quote Link to comment Share on other sites More sharing options...
Guest Dazmanjunket Posted October 11, 2011 Share Posted October 11, 2011 To john323232 - You say I must study Smarty, can you be more specific on what version to study? As i believe there is a version 2 and a version 3 and there are significant changes made. Thank you kieranbarnes for the info and link. Quote Link to comment Share on other sites More sharing options...
Homar Posted October 11, 2011 Share Posted October 11, 2011 To john323232 - You say I must study Smarty, can you be more specific on what version to study? As i believe there is a version 2 and a version 3 and there are significant changes made. Thank you kieranbarnes for the info and link. CubeCart V5 uses Smarty version 3. 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.