| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
PHP in temlate | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() how can I run php in the templates
__________________
x-cart 4.4.3 |
|||||||
#2
|
|||||||
|
|||||||
![]() {php}
your php here {/php}
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||||
|
|||||||||
![]() Though it's not recommended.
|
|||||||||
#4
|
|||||||
|
|||||||
![]() Right, forgot to mention, best to keep PHP in the php files.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#5
|
|||||||
|
|||||||
![]() That being said, what's the best way to make this work?
Code:
I'm trying to get it to display Videos Randomly based on this site. http://www.jakeludington.com/youtube/20070615_how_to_randomize_youtube_videos_with_php. html
__________________
X-Cart 4.3 Joomla Among other things ![]() |
|||||||
#6
|
|||||||
|
|||||||
![]() Two ways. The easiest is to just do this in the template like this:
Code:
That still puts code into the template and you'd end up duplicating it everywhere if you use it in multiple places. I prefer to use Smarty plugins for this kind of stuff like this: PHP Code:
__________________
Manuka Bay Company X-Cart Version 4.0.19 [Linux] UGG Boots and other fine sheepskin products http://www.snowriver.com |
|||||||
|
#7
|
|||||||
|
|||||||
![]() OMG that's awesome!!!
www.littlepuppiesonline.com Don't let your wife or gf or both look at this site though. lol You're a life saver Ralph!
__________________
X-Cart 4.3 Joomla Among other things ![]() |
|||||||
|
|||
X-Cart forums © 2001-2020
|