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

my own page like users.php

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-15-2006, 02:58 AM
 
metinex metinex is offline
 

Advanced Member
  
Join Date: Feb 2006
Posts: 82
 

Default my own page like users.php

I working on the admin side to add my own page. I take users.php as a starting point.

I duplicated the file /admin/users.php to /admin/pricing.php

Within that file:
$smarty->assign("main","users"); ---> $smarty->assign("main","pricing");

Then I created the file /skin1/admin/main/pricing.tpl copying from /skin1/admin/main/users.tpl

When I display /admin/pricing.php in the browser I got:
Page not found!
The requested page does not exist or you are not allowed to access it!

What am I missing?
__________________
Jay S

Xcart 4.1.3 & Mysql 5.0.20
Xcart 4.0.17 & Mysql 4.1
Apache 2.0 & Linux Whitebox 3
Reply With Quote
  #2  
Old 03-15-2006, 03:09 AM
 
Jiser Jiser is offline
 

Senior Member
  
Join Date: Oct 2004
Posts: 118
 

Default

Hi,

Please try:
Code:
func_display("main/pricing.tpl",$smarty);

Please check for further info BOOMERS info page: http://cart-lab.blogspot.com/2005/05/writing-your-own-x-cart-modifications.html
__________________
x-cart 4.05
Linux CENTOS
APACHE
Heavily customized
Reply With Quote
  #3  
Old 03-15-2006, 03:16 AM
 
metinex metinex is offline
 

Advanced Member
  
Join Date: Feb 2006
Posts: 82
 

Default

Thanks for the repley, but that tpl is supposed to be the main page's layout template. Isn't it?

BY the way in users.php i see that code
func_display("admin/home.tpl",$smarty);

Where is the admin/home.tpl by the way?

I've never seen file like that under an admin folder in Xcart files.
__________________
Jay S

Xcart 4.1.3 & Mysql 5.0.20
Xcart 4.0.17 & Mysql 4.1
Apache 2.0 & Linux Whitebox 3
Reply With Quote
  #4  
Old 03-15-2006, 03:26 AM
 
metinex metinex is offline
 

Advanced Member
  
Join Date: Feb 2006
Posts: 82
 

Default

Hey that page has been helpful, I solved the issue:

in /skin1/common_templates.tpl

I needed to put
{elseif $main eq "pricing"}
{include file="admin/main/pricing.tpl"}


somewhere in the code.

But interestingly I still don't see any condition like {elseif $main eq "users"} in that file.

So how come users.php being displayed then? Weird...
__________________
Jay S

Xcart 4.1.3 & Mysql 5.0.20
Xcart 4.0.17 & Mysql 4.1
Apache 2.0 & Linux Whitebox 3
Reply With Quote
  #5  
Old 03-15-2006, 03:47 AM
 
metinex metinex is offline
 

Advanced Member
  
Join Date: Feb 2006
Posts: 82
 

Default

Ok I found the following code in the code
{elseif $main eq "users"}
{include file="admin/main/users.tpl"}

in /skin1/single/home.tpl?


Why some of the variables in this file, some of them are in /skin1/common_templates.tpl?
__________________
Jay S

Xcart 4.1.3 & Mysql 5.0.20
Xcart 4.0.17 & Mysql 4.1
Apache 2.0 & Linux Whitebox 3
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 08:48 AM.

   

 
X-Cart forums © 2001-2020