How to add basic custom code and/ or use: <?php include 'http://webpagename.com/file.php'; ?> on the homepage

Hi,



I'm trying to incorporate some basic/ custom code in the homepage of the store. For instance, I would like to add my own form or menu bar that have been already coded for another site.



I'm thinking I can isolate that code into a php file and call the file in the store using

[color=#444444] [/color]



If I'm working in a regular html page or wordpress site, this is straight forward. How do I get this to work within CS Cart?



When I tried to add this code to a block (html block) it doesn't work. The system (v4) won't recognize php that way. I tried to create and add-on / template… Honestly, this starts the get beyond my understanding and I can't seem to find simply [enough] instructions to guide me.



I've been able to add the 'my_changes' add-on and add some design elements but need to add my own divs and basic code in some areas.



Please help

Maybe this will help?



[url=“How to create a block with PHP? - Developers' Corner - CS-Cart Community Forums”]How to create a block with PHP? - Developers' Corner - CS-Cart Community Forums

[quote name='zeero6' timestamp='1384285529' post='171448']

Maybe this will help?



http://forum.cs-cart…__1#entry146434

[/quote]



Thanks, but this doesn't seem to help/ work. The instructions were to:

[color=#a9a9a9][font=arial, verdana, tahoma, sans-serif]For example you put a [/font][font=arial, verdana, tahoma, sans-serif]file[/font][font=arial, verdana, tahoma, sans-serif] named “section_name.tpl” into the /skins/SKINNAME/customer/blocks/wrappers and insert[/font][font=arial, verdana, tahoma, sans-serif] this code. [/font][font=arial, verdana, tahoma, sans-serif]And after that, you have to add a “HTML block” with any content, and set the block wrapper to the section_name wrapper.[/font][/color]



[font=“arial, verdana, tahoma, sans-serif”]I know the file structure has changed and tried to add the .tpl file to the appropriate sections but - the html block doesn't give option to have a wrapper. Not getting how to pull this off. [/font]



[font=“arial, verdana, tahoma, sans-serif”]Anymore insight?[/font]

You can approach your problem in a variety of ways. Some are more portable than others and some are proper for integrating with cs-cart. I would suggest that you provide template variables to your html via a PHP controller/addon. Then write your html using Smarty template variables to pass the business logic into your page.



You can use template extensions by enabling PHP usage in templates (not recommended) and then using Smarty PHP tags {php}code{/php}.



There's a ton of info on this forum for how to do what you want. Spend some time researching or hire a developer if you have more $$ than time/skill.

how to access a smarty html block i made in the frontent home page by my addon ?

how to access a smarty html block i made in the frontent home page by my addon ?

Put the file to the blocks/static_templates folder of the theme or your module and add block to the Home page layout in the admin panel.