X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Add new "Affiliate Tools Page" to Partner area (https://forum.x-cart.com/showthread.php?t=15621)

Jazzer 08-01-2005 07:49 PM

Add new "Affiliate Tools Page" to Partner area
 
I want to add a new page to the affiliate area called "Affiliate Tools" which explains details of how to use the Affiliate area. It's a page which must have the same left-hand navigation as the rest of the partner area, therefore creating a static-page is out of the question. So here's what I've tried to do.

I created the file partner/main/tools.tpl which I want to be called from partner/tools.php

I added the following line to partner/home.tpl

Code:

{elseif $main eq "tools"} {include file="partner/main/tools.tpl"} 


then I made a copy of partner/stats.php and renamed it partner/tools.php

Can someone modify the code in this file to call partner/home.tpl and include the tools.tpl file that i have created?

Here's the code from the tools.php file that I created (it's just a duplicate of stats.php but it's a start. I'm not a php kind-a-guy so any help would be appreciated.

partner/tools.php

Code:

require "./auth.php";
require $xcart_dir."/include/security.php";

$location[] = array(func_get_langvar_by_name("lbl_summary_statistics"), "");

#
# Define data for the navigation within section
#
$dialog_tools_data["right"][] = array("link" => "payment_history.php", "title" => func_get_langvar_by_name("lbl_payment_history"));

include $xcart_dir."/include/stats.php";

# Assign the current location line
$smarty->assign("location", $location);

# Assign the section navigation data
$smarty->assign("dialog_tools_data", $dialog_tools_data);

$smarty->assign("main", "stats");

func_display("partner/home.tpl",$smarty);
?>


Jazzer 08-02-2005 04:38 AM

I've been thinking about this and maybe I'm going about it all wrong. Perhpas I could add an embedded static page and somehow modify the help.php file to display the partner area menu for that particular static page using and {if}{else} statement?

Would that work? Anyone? :)


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

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.