Jump to content

Listing products on homepage


Recommended Posts

Hi all, my first thread here on whmcs forum! :)

 

Anyways... Im doing this school assignment where Im writing a template / theme for whmcs and I cant seem to figure out how to get the products to show on homepage.tpl :)

Is there any way to make this work? I mean, as a customer this is the first thing I want to see when visiting a hosting company´s page, isnt it?

 

I´ve tried to the foreach loop in product.tpl, even include cart.php and product.tpl in to homepage.tpl without any success... This is probably a simple thing, but if you could point me in the right direction I would be more than happy :)

 

/ Niklas

Link to comment
Share on other sites

You are saying you want to customize a home page?

 

 

You could make a index.html make .htacess rules so it defaults to index.html not index.php

 

<?php

 

define("CLIENTAREA",true);

 

require("dbconnect.php");

require("includes/functions.php");

require("includes/clientareafunctions.php");

 

$pagetitle = '***********';

 

initialiseClientArea($pagetitle,$pageicon,$breadcrumbnav);

 

if ($_SESSION['uid']) {

# User is Logged In - put any code you like here

}

 

# To assign variables in Smarty use the following syntax.

# This can then be used as {$variablename} in the template

//$smartyvalues["variablename"] = $value;

 

# Define the template filename to be used without the .tpl extension

 

$templatefile = "home";

 

outputClientArea($templatefile);

 

?>

 

Then in your theme dir make a home.tpl file where you can make a homepage other than trying to use whmcs as a front end. Link to an inner page of your products.

 

You could then look through the documentation on how to do all the fun stuff. This way you dont have to try and edit up existing tpl files besides styling them.

Edited by tripler
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated