Forums / Templates, Stylesheets, Page Layout / scrolling bestseller sidebox wrapper

scrolling bestseller sidebox wrapper

Locked

Views: 1,375

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
9 Mar 2009, 12:42 AM
#1
hardwiredtemplates avatar

hardwiredtemplates

Zen Follower

Join Date:
Sep 2008
Posts:
211
Plugin Contributions:
0

scrolling bestseller sidebox wrapper

hey fellow zenners. Just noticed a weird thing on my shop and it's quiet irritating to fix it. I am sure you gurus can see it in seconds not in days like myself:huh:

The bestseller sidebox is missing the left, right, and bottom boarders. I am sure it's a simple thing, but eveything i've tried failed. Please look at the code what am I missing here.:frusty:

<?php $content = ''; $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="rightsideBoxContent">' . "\n"; $content .= '<div class="wrapper">' . "\n" . '<ol>' . "\n"; for ($i=1; $i<=sizeof($bestsellers_list); $i++) { $rp .= '<li> <a href="' . zen_href_link(zen_get_info_page($bestsellers_list[$i]['id']), 'products_id=' . $bestsellers_list[$i]['id']) . '">' . '<img align= "Center" width="100" class="bestsellers_thumbnail" src="images/' . $bestsellers_list[$i]['image'] . '">' . '<br>' .zen_trunc_string($bestsellers_list[$i]['name'] ) . '</a></li>' . "\n"; } $total = $i; if ($total > 1) { //if more than one special exists in the db then scrolling begins $content .= '<MARQUEE style="position:relative" behavior= "scroll" align= "center" direction= "up" width="140" height="260" scrollamount= "2" scrolldelay= "5" onmouseover=\'this.stop()\' onmouseout=\'this.start()\'>' . $rp .'</MARQUEE>'; } elseif ($total == 1) { // If only one special exists in the db then the specials box will remain static $content .= $rp; } else { // If there are no bestsellers then this text is displayed $content .= "No bestsellers this month!"; } $content .= '</div>' ?>
9 Mar 2009, 1:34 AM
#2
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: scrolling bestseller sidebox wrapper

Try adding the following declaration to your stylesheet.css (includes/templates/comstock/css/stylesheet.css)

.rightsideBoxContent {
background-image:url(../images/sidebox_content_bg.gif);
background-repeat:no-repeat;
background-position:bottom;
padding: 0 0.3em 1em 0.3em;
line-height: normal;
}

hardwiredtemplates:

hey fellow zenners. Just noticed a weird thing on my shop and it's quiet irritating to fix it. I am sure you gurus can see it in seconds not in days like myself:huh:

The bestseller sidebox is missing the left, right, and bottom boarders. I am sure it's a simple thing, but eveything i've tried failed. Please look at the code what am I missing here.:frusty:

<?php $content = ''; $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="rightsideBoxContent">' . "\n"; $content .= '<div class="wrapper">' . "\n" . '<ol>' . "\n"; for ($i=1; $i<=sizeof($bestsellers_list); $i++) { $rp .= '<li> <a href="' . zen_href_link(zen_get_info_page($bestsellers_list[$i]['id']), 'products_id=' . $bestsellers_list[$i]['id']) . '">' . '<img align= "Center" width="100" class="bestsellers_thumbnail" src="images/' . $bestsellers_list[$i]['image'] . '">' . '<br>' .zen_trunc_string($bestsellers_list[$i]['name'] ) . '</a></li>' . "\n"; } $total = $i; if ($total > 1) { //if more than one special exists in the db then scrolling begins $content .= '<MARQUEE style="position:relative" behavior= "scroll" align= "center" direction= "up" width="140" height="260" scrollamount= "2" scrolldelay= "5" onmouseover=\'this.stop()\' onmouseout=\'this.start()\'>' . $rp .'</MARQUEE>'; } elseif ($total == 1) { // If only one special exists in the db then the specials box will remain static $content .= $rp; } else { // If there are no bestsellers then this text is displayed $content .= "No bestsellers this month!"; } $content .= '</div>' ?>

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

9 Mar 2009, 3:09 AM
#3
hardwiredtemplates avatar

hardwiredtemplates

Zen Follower

Join Date:
Sep 2008
Posts:
211
Plugin Contributions:
0

Re: scrolling bestseller sidebox wrapper

clydejones:

Try adding the following declaration to your stylesheet.css (includes/templates/comstock/css/stylesheet.css)

.rightsideBoxContent {
background-image:url(../images/sidebox_content_bg.gif);
background-repeat:no-repeat;
background-position:bottom;
padding: 0 0.3em 1em 0.3em;
line-height: normal;
}

Thank you Clyde, Your reply gave me the adea to recognize what was wrong. Since this was a contribution I figures something is wrong, and to narrow the problem I've turned on the languages sidebox and it's great, so my stylesheet is got to be doing the right thing. Since this is a contribution (probably should have mentioned that i guess) it needed tweeking.

Anyhow this is what I did:

Changed this line from:
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="rightsideBoxContent">' . "\n";

To this:
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';

I dont know much about php nor html but that solved the problem.

Would you happen to know why there is a little white space at the top?

9 Mar 2009, 3:18 AM
#4
hardwiredtemplates avatar

hardwiredtemplates

Zen Follower

Join Date:
Sep 2008
Posts:
211
Plugin Contributions:
0

Re: scrolling bestseller sidebox wrapper

Never mind played around with the file now it's fixed

Took this line out, although I am not too sure what it was doing(hope it isn't ciritacl code)

$content = "";
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';
$content .= '<div class="wrapper">' . "\n" . '<ol>' . "\n";
for ($i=1; $i<=sizeof($bestsellers_list); $i++) {

Next task is to try to make the background (inside the box) white... is that achievalbe?

9 Mar 2009, 3:20 AM
#5
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: scrolling bestseller sidebox wrapper

Glad you got it sorted

hardwiredtemplates:

Thank you Clyde, Your reply gave me the adea to recognize what was wrong. Since this was a contribution I figures something is wrong, and to narrow the problem I've turned on the languages sidebox and it's great, so my stylesheet is got to be doing the right thing. Since this is a contribution (probably should have mentioned that i guess) it needed tweeking.

Anyhow this is what I did:

Changed this line from:
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="rightsideBoxContent">' . "\n";

To this:
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';

I dont know much about php nor html but that solved the problem.

Would you happen to know why there is a little white space at the top?

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

9 Mar 2009, 5:27 AM
#6
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: scrolling bestseller sidebox wrapper

clydejones:

Glad you got it sorted

Sorry I forgot to answer your question about changing the background color.

You'd have to create a new graphic for that.

The sideboxes are made up of two graphics the sidebox header graphic and the sidebox content graphic.

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

9 Mar 2009, 11:38 AM
#7
hardwiredtemplates avatar

hardwiredtemplates

Zen Follower

Join Date:
Sep 2008
Posts:
211
Plugin Contributions:
0

Re: scrolling bestseller sidebox wrapper

clydejones:

Sorry I forgot to answer your question about changing the background color.

You'd have to create a new graphic for that.

The sideboxes are made up of two graphics the sidebox header graphic and the sidebox content graphic.

Oh I see what you mean, I will be traying that. Thank you so much

23 Mar 2009, 1:19 PM
#8
4thwave avatar

4thwave

Zen Follower

Join Date:
Sep 2007
Posts:
125
Plugin Contributions:
0

Re: scrolling bestseller sidebox wrapper

Hey all,

Hope this is the best place to post this.

I am using the scrolling "Featured" sidebox and want only 4 products to display. I have set Maximum featured display value to 4 but all 10 continue to load.

I believe I have read though all of the posts on this but most likely missed the one that cures this.

If anyone has the answer it would be great!!!

Stuck!