How can I put PHP into my product details pages?

Hi,



I need to insert custom PHP code all over the product details page (Along with some Ajax). I cannot insert it into the Smarty template pages.



What is the best way to do this?



Thanks

[URL=“{php} | Smarty”]Search Results for "docsv2" | Smarty

And this tells you how to call smarty variables into those {php} blocks:


{php}
// get assigned template var 'foo'
$myVar = $this->get_template_vars('foo');

// get all assigned template vars
$all_tpl_vars = $this->get_template_vars();

// take a look at them
print_r($all_tpl_vars);
{/php}

[quote name=‘sambessey’]Hi,



I need to insert custom PHP code all over the product details page (Along with some Ajax). I cannot insert it into the Smarty template pages.



What is the best way to do this?



Thanks[/QUOTE]



Curious why wouldn’t you create an addon to customize your product detail pages? There are ‘hooks’ for creating the content of a page, for the display of that info or you can completely overwrite the standard template? All your local changes would then be in

skins//customer/addons//hooks



This allows you to separate your changes from the standard distribution so you won’t be spending huge amounts of time resolving conflicts when an upgrade is available. I’ve made a free addon for local customization available at [url]http://www.ez-ms.com/local.addon.zip[/url]. Review the README.txt file for information.