Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

embedded static pages, html only?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-23-2004, 11:20 AM
 
ketok ketok is offline
 

Advanced Member
  
Join Date: Jun 2003
Posts: 45
 

Default embedded static pages, html only?

I would like to run a simple php photo gallery as an embedded page from within x-cart.

However, it appears that only .html embedded static pages are created. Is this correct?

Can someone point me in the right direction.

Big Thanks!
__________________
X-Cart version 4.1.8
Operation system Linux
location - a blue state
Reply With Quote
  #2  
Old 07-23-2004, 12:29 PM
 
ian_fs ian_fs is offline
 

Advanced Member
  
Join Date: Apr 2004
Location: Norwich, UK
Posts: 86
 

Default

You can if you copy the home.tpl file and rename it something else eg, photo_gallery.tpl get rid of the line home_main.tpl, where that was you can put you php code etc.

The in the actual customer php which call the tpl files copy home.php rename it photo_gallery.php and replace the line

$smarty->display("customer/home.tpl");

with

$smarty->display("customer/photo_gallery.tpl");

this should allow you to have your photo gallery page but with the x-cart features as well.

hope that helps. sorry if it seems rather rushed.

jez
__________________
X-Cart 4.0.17
Reply With Quote
  #3  
Old 07-23-2004, 01:28 PM
 
ketok ketok is offline
 

Advanced Member
  
Join Date: Jun 2003
Posts: 45
 

Default

thanks for the reply. I follow all of that.

My next question is can I put php code directly in a .tpl page?
so on photo_gallery.tpl - in that area between:





do I simply insert all the php code?
or must I do an include.
What is the syntax for that?

Sorry, I've not mixed php and smarty before.
__________________
X-Cart version 4.1.8
Operation system Linux
location - a blue state
Reply With Quote
  #4  
Old 07-23-2004, 02:20 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

to use php code in smarty you can use

{php}
echo "here is my php code";
{/php}

In this case, you'd be better doing an include, or you could do a php include

{php}
include "file.php";
{/php}
Reply With Quote
  #5  
Old 07-23-2004, 02:32 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

FunkyDunk has a simple gallery mod for X-Cart @ http://www.prodynamix.co.uk. I used it for a while and it is good for a simple mod.
Reply With Quote
  #6  
Old 07-25-2004, 04:39 PM
 
ketok ketok is offline
 

Advanced Member
  
Join Date: Jun 2003
Posts: 45
 

Default

Thanks Jon - that is just the info I need.

Thanks adpboss - I went ahead and ordered funkydunk's mod. Just what I was looking to do.
__________________
X-Cart version 4.1.8
Operation system Linux
location - a blue state
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:43 AM.

   

 
X-Cart forums © 2001-2020