Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Want to style Cart Summary Sidebox contrib

Want to style Cart Summary Sidebox contrib

Locked

Views: 1,285

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
18 Mar 2007, 4:13 PM
#1
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Want to style Cart Summary Sidebox contrib

Hi folk,

In my site (link in sig below) you can see the Cart Summary Sidebox shows below the logo and above the Categories. But the background of its contents isn't styled like the background of the Categories. That's because there is nothing to attach the style to -- no div. Here's Categories as it shows in Page View in my browser...

<div class="leftBoxContainer" id="categories" style="width: 150px">
<h3 class="leftBoxHeading" id="categoriesHeading">Categories</h3>
<div id="categoriesContent" class="sideBoxContent">
... categories here ...</div></div>

And here's Cart Summary for comparison...

<div id="navColumnOneWrapper" style="width: 150px">
<div class="leftBoxContainer" id="cartsummary" style="width: 150px">
<h3 class="leftBoxHeading" id="cartsummaryHeading"><label>Your Cart:</label></h3>
Items: 0<br />Am’t: $0.00</div>

You can see there is an extra div in the categories layout (I marked it in red). I need to find where the code is that creates the Cart Summary tag structure so I can add a div with a class and make it possible to style the thing. Anybody know? (Yes I looked at the files that came with the contribution, but I saw nothing that looked like it was creating the actual HTML or CSS tags.)

TIA,

Rob

19 Mar 2007, 10:04 AM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Want to style Cart Summary Sidebox contrib

Go to includes/templates/template_default/sideboxes/tpl_cart_summary.php and replace the code that is there with > $content = '';

$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";
$content .= $totalsDisplay; /* this info comes from the module file */
$content .='</div>' . "\n";

19 Mar 2007, 12:42 PM
#3
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Want to style Cart Summary Sidebox contrib

Bingo!

Thanks very much.

Rob