Zen Cart Logo
Forums / Basic Configuration / Placing Logos at Sidebox on homepage only

Placing Logos at Sidebox on homepage only

Locked

Views: 2,325

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
10 May 2006, 6:59 PM
#1
stenrique avatar

stenrique

Zen Follower

Join Date:
Apr 2005
Posts:
355
Plugin Contributions:
0

Placing Logos at Sidebox on homepage only

My affiliation with some marketing agents requires me to place their logos at my website. I wish to place these logos along the right side sidebox area and display them only at the homepage. Is an easy way to achieve this? Thanks.

11 May 2006, 10:39 AM
#2
stenrique avatar

stenrique

Zen Follower

Join Date:
Apr 2005
Posts:
355
Plugin Contributions:
0

Re: Placing Logos at Sidebox on homepage only

I was considering to use the banner feature to achieve the objective listed in my posting above but realized that the banner would be displayed in every page rather then just the homepage.

In addition, I would like to display these logos without any borders, header, and footer. Can someone pls. help. Thanks.

11 May 2006, 3:45 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Placing Logos at Sidebox on homepage only

You could make a custom sidebox for these images ... and turn them off based on the current page setting so that they only show when you want them to ...

13 May 2006, 1:56 PM
#4
stenrique avatar

stenrique

Zen Follower

Join Date:
Apr 2005
Posts:
355
Plugin Contributions:
0

Re: Placing Logos at Sidebox on homepage only

Thanks for the suggestion Linda, I am not much of a php programmer. Is there a sample template i can refer to?

15 Sep 2006, 5:19 PM
#5
stenrique avatar

stenrique

Zen Follower

Join Date:
Apr 2005
Posts:
355
Plugin Contributions:
0

Re: Placing Logos at Sidebox on homepage only

I have created a sidebox and am trying to get it to display only at the homepage w/o much luck. I referred to this link here but still aren't clear as to how to go about doing it.

Any advise would be much appreciated.

16 Sep 2006, 2:05 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Placing Logos at Sidebox on homepage only

There is a new feature in Zen Cart v1.3.5 to know if you are on the real home page ... :smile:

if ($this_is_home_page) {
// I am on home page
} else {
// I am not home page
}

Look at the other sideboxes and you will see $show_something ... follow that logic to enable/disable the sidebox utilizing the $this_is_home_page ...

18 Sep 2006, 4:36 AM
#7
stenrique avatar

stenrique

Zen Follower

Join Date:
Apr 2005
Posts:
355
Plugin Contributions:
0

Re: Placing Logos at Sidebox on homepage only

What shld I list as condition(s) in the If statement to determine whether the homepage is displayed? Many thanks.

18 Sep 2006, 4:48 AM
#8
stenrique avatar

stenrique

Zen Follower

Join Date:
Apr 2005
Posts:
355
Plugin Contributions:
0

Re: Placing Logos at Sidebox on homepage only

Ajeh:

There is a new feature in Zen Cart v1.3.5 to know if you are on the real home page ... :smile:

if ($this_is_home_page) {
// I am on home page
} else {
// I am not home page
}

> 
> Look at the other sideboxes and you will see $show_something ... follow that logic to enable/disable the sidebox utilizing the $this_is_home_page ...

BTW, just to add that I am still at version 1.2.7d.
18 Sep 2006, 4:59 AM
#9
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Placing Logos at Sidebox on homepage only

bummer ... $this_is_home_page lives in v1.3.5 ... :cry:

Might download it and install a test shop and find how that variable is determined ... then customize something similar ...

Or ... upgrade ... :cool:

19 Sep 2006, 5:14 AM
#10
stenrique avatar

stenrique

Zen Follower

Join Date:
Apr 2005
Posts:
355
Plugin Contributions:
0

Re: Placing Logos at Sidebox on homepage only

Perhaps a little background info. What I need to achieve is:

if (Hompage)
show sidebox 1
else
show sidebox 2

I looked thru' v1.3.5 and found this code:

$this_is_home_page = ($current_page=='index.php' && !isset($_GET['cPath']));

It's working somewhat to what I need. By that I mean when the Homepage is displayed, sidebox 1 is shown. When any category is clicked, sidebox 2 is switched to. However, when i click on a product which causes the URL to changed from

https://www.mywebsite.com

to

http://www.mywebsite.com/index.php?main_page=product_info&products_id=962

the code failed to switch to sidebox 2.

I believe the condition in my IF statement is incomplete. Could anyone point out what I am missing? Thanks very much.