CubeCartForums.org for CubeCart third-party documentation, modifications, skins and services

Welcome Guest ( Log In | Register )

 Forum Rules New mod submissions
2 Pages V  < 1 2  
Reply to this topicStart new topic
> Unique homepage template mod
goldentongs
post Mar 18 2012, 05:01 AM
Post #21


Member
Group Icon

Group: Supporter
Posts: 165
Joined: 23-August 09
From: Australia
Member No.: 11,459



Lovely quick mod
(dont know why i not seen before now)

I have 2 issues i am hoping someone can help me with

i want to display the login page on home.tpl
(when i tried to copy code from login.tpl it shows nothing)

Also how can i force guests to the new homepage (to login) before they can view the rest of the site ?
(not concerned with redirecting back to page they wanted to view)

As it is now, they can still access all the webpages directly,
but i want all customers logged in before they can view other pages

Thanks in advance to any who reply
Go to the top of the page
 
+Quote Post
Robsta
post Mar 18 2012, 08:55 AM
Post #22


Skin Developer
Group Icon

Group: Administrator
Posts: 8,255
Joined: 11-March 07
From: Exmouth, UK
Member No.: 2

Catalogue Listing
About Us
Store Review Here



This free mod only provides a unique homepage template. For any more please start a new topic, thanks.


--------------------
Integrated HELPDESK and RMA (Returns Management) - Integrated BLOG / NEWS - Better than using Wordpress!
Add a feature rich Blog/News System and Helpdesk/RMA system to your CubeCart v4 store. Contact us for a demo.
Follow us on Facebook! Get CubeCart!

Search Engine Sitemap Feeds - Merchant Center Product Feeds - Customer Follow-up Email Mod - Essential for every store!
Go to the top of the page
 
+Quote Post
Burgensteen
post May 11 2012, 10:45 PM
Post #23


CubeCart God
Group Icon

Group: Moderator
Posts: 1,418
Joined: 12-March 07
From: UK, York
Member No.: 8

Store Review Here



I use this script on a lot of sites for V3 and V4.
Its a little gem but I do regularily get clients getting back to me when they update their skin saying they have errors. This is mainly because when they change their skin they dont need the home.tpl anymore yet the script still loooks for it.

Simple solution is:

CODE
$checkhomepage = "skins/".$config['skinDir']."/styleTemplates/global/home.tpl";
    if (file_exists($checkhomepage)) {
    if(isset($_GET['act'])) {
        $body = new XTemplate ("skins/".$config['skinDir']."/styleTemplates/global/index.tpl");
    } else {
        $body = new XTemplate ("skins/".$config['skinDir']."/styleTemplates/global/home.tpl");
    }
    } else {
        $body = new XTemplate ("skins/".$config['skinDir']."/styleTemplates/global/index.tpl");
    }

It will check for home.tpl, if it doesnt exist it will defsult to index.tpl


--------------------
Go to the top of the page
 
+Quote Post
goldentongs
post Sep 26 2012, 05:16 PM
Post #24


Member
Group Icon

Group: Supporter
Posts: 165
Joined: 23-August 09
From: Australia
Member No.: 11,459



Would there be a way to make this mod
display the custom homepage when users are not logged in
and then
display the regular homepage once they are logged in ?
Go to the top of the page
 
+Quote Post
Robsta
post Sep 26 2012, 05:20 PM
Post #25


Skin Developer
Group Icon

Group: Administrator
Posts: 8,255
Joined: 11-March 07
From: Exmouth, UK
Member No.: 2

Catalogue Listing
About Us
Store Review Here



Yes, no probs.


--------------------
Integrated HELPDESK and RMA (Returns Management) - Integrated BLOG / NEWS - Better than using Wordpress!
Add a feature rich Blog/News System and Helpdesk/RMA system to your CubeCart v4 store. Contact us for a demo.
Follow us on Facebook! Get CubeCart!

Search Engine Sitemap Feeds - Merchant Center Product Feeds - Customer Follow-up Email Mod - Essential for every store!
Go to the top of the page
 
+Quote Post
MarksCarts
post Oct 17 2012, 11:16 PM
Post #26


Mega Member
Group Icon

Group: Moderator
Posts: 882
Joined: 12-March 07
From: Texas, USA
Member No.: 7

Catalogue Listing
Store Review Here



Nice tip, Burgensteen, try this one (a few less lines of code):
CODE
$checkhomepage = "skins/".$config['skinDir']."/styleTemplates/global/home.tpl";
    if (file_exists($checkhomepage) && !isset($_GET['act'])) {
        $body = new XTemplate ("skins/".$config['skinDir']."/styleTemplates/global/home.tpl");
    } else {
        $body = new XTemplate ("skins/".$config['skinDir']."/styleTemplates/global/index.tpl");
    }



--------------------
CC3.0.20 | CC4.4.7 | CC5.1.4 on various servers. Locally: WAMPserver Apache 2.2.11, PHP 5.3.0, MySQL 5.1.36, Windows 7
Visit CC3.biz for third-party products and services, including hundreds of mods for the legacy carts CC3 and CC4, a Helpdesk and a Freebies Vault. Get CubeCart!

CC3.biz mobile:
Go to the top of the page
 
+Quote Post

2 Pages V  < 1 2
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 19th December 2014 - 11:38 AM
CubeCart Developers Network
Get CubeCart!
© 2007 - 2014  CubeCartForums.org in association with Inspired Solutions.