Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Changing the look of central content

Changing the look of central content

Locked

Views: 681

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
6 Mar 2010, 2:32 PM
#1
goalsurfer avatar

goalsurfer

Banned

Join Date:
Jun 2008
Posts:
54
Plugin Contributions:
0

Changing the look of central content

If you want to change look of central content as e.g. "New products"
and you take a look at the source you see for each product:

<div class="centerBoxContentsNew centeredContent back" style="width:33%;">

('centerBoxContentsNew centeredContent back' doesn't work but
'centerBoxContentsNew' does.) The width of 33% doesn't change any what value you put in the stylesheet as style for width 33% is inline or whatever you call it.

So this must be controlled from elsewhere but I don't find where, in any case not in the .tpl file.

I want to display each new product with a border and without format of the central wrapper.

Anyone an idea please how I should do that? Thanks.

(version Zen Cart 1.3.8a)

6 Mar 2010, 5:36 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Changing the look of central content

Find/add/or seperate into it's own

.centerBoxContentsNew {
        your styling
        }

If you want less/more than 3(33%)
admin > config > Index Listing > New Products Columns per Row
Also
admin > config > maximum values > New Products Module

8 Mar 2010, 10:17 PM
#3
goalsurfer avatar

goalsurfer

Banned

Join Date:
Jun 2008
Posts:
54
Plugin Contributions:
0

Re: Changing the look of central content

No I want 3 but instead they are all together in one box I want each product with a border around it. That's why the 33% has to be diminuished to 32% or 31% or even less. Else there is no place to get 3 on a row. But maybe this is not so important. I can as well leave it as it was.

8 Mar 2010, 11:08 PM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Changing the look of central content

Not ideal, but you can add !important to a property value in the stylesheet to override inline styling:```
.centerBoxContentsNew {
width: 31% !important;
border: 1px solid #aabbcc;
}

You can also edit a file to change this to start, such as /includes/modules/your_template/featured_products.php:```php
/ show only when 1 or more
if ($num_products_count > 0) {
  if ($num_products_count < SHOW_PRODUCT_INFO_COLUMNS_FEATURED_PRODUCTS || SHOW_PRODUCT_INFO_COLUMNS_FEATURED_PRODUCTS == 0) {
    $col_width = floor(100/$num_products_count);
  } else {
    $col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_FEATURED_PRODUCTS);
  }
```Change
$col_width = floor(100/$num_products_count);
to
$col_width = floor(100/$num_products_count) - 1;
or whatever you want.