Jump to content

Sub catogaries not displaying correctly


Guest Stephen Lilly

Recommended Posts

Guest Stephen Lilly

Hello

For some reason my sub catagories are not being displayed correctly...I belive this only seems to happen with using explorer 6 ?

Please see attached example

Can anyone help with possible reasons

Thank you

Stephen

Link to comment
Share on other sites

Stephen this has been answered many many times. But here it is again:

Try this:

In the includes/content/index.inc.php find this line:

for($i=0;$i<count($latestProducts);$i++){

Replace with this code

$across=4;

$index->assign("TW",100/$across);

for($i=0;$i<count($latestProducts);$i++){

if (!(($i+1) % $across)) {

$index->assign("TXT_TR","</tr><tr>");

} else {

$index->assign("TXT_TR","");

}

in skins/{insert skin name}/styleTemplates/content/index.tpl replace all code

between

<!-- BEGIN: repeat_prods -->

and

CODE

<!-- END: repeat_prods -->

including those two lines above with this code

CODE

<table width="100%" border="0"><tr>

<!-- BEGIN: repeat_prods -->

<td width="{TW}%">

<div style="float: center; text-align: center;">

<a href="index.php?act=viewProd&productId={VAL_PRODUCT_ID}"><img src="{VAL_IMG_SRC}" alt="{VAL_PRODUCT_NAME}" border="0" /></a>

<br />

<a href="index.php?act=viewProd&productId={VAL_PRODUCT_ID}" class="txtDefault">{VAL_PRODUCT_NAME}</a>

<br />

{TXT_PRICE} <span class="txtSale">{TXT_SALE_PRICE}</span>

</div>

</td>

{TXT_TR}

<!-- END: repeat_prods -->

</tr></table>

The $across variable is used to specify number products across.

Link to comment
Share on other sites

Guest systekuk

Stephen this has been answered many many times. But here it is again:

Try this:

In the includes/content/index.inc.php find this line:

for($i=0;$i<count($latestProducts);$i++){

Replace with this code

$across=4;

$index->assign("TW",100/$across);

for($i=0;$i<count($latestProducts);$i++){

if (!(($i+1) % $across)) {

$index->assign("TXT_TR","</tr><tr>");

} else {

$index->assign("TXT_TR","");

}

in skins/{insert skin name}/styleTemplates/content/index.tpl replace all code

between

<!-- BEGIN: repeat_prods -->

and

CODE

<!-- END: repeat_prods -->

including those two lines above with this code

CODE

<table width="100%" border="0"><tr>

<!-- BEGIN: repeat_prods -->

<td width="{TW}%">

<div style="float: center; text-align: center;">

<a href="index.php?act=viewProd&productId={VAL_PRODUCT_ID}"><img src="{VAL_IMG_SRC}" alt="{VAL_PRODUCT_NAME}" border="0" /></a>

<br />

<a href="index.php?act=viewProd&productId={VAL_PRODUCT_ID}" class="txtDefault">{VAL_PRODUCT_NAME}</a>

<br />

{TXT_PRICE} <span class="txtSale">{TXT_SALE_PRICE}</span>

</div>

</td>

{TXT_TR}

<!-- END: repeat_prods -->

</tr></table>

The $across variable is used to specify number products across.

I had the same problem, except i was given a different answer!? ..i was just told to change/play with the padding size for the category page for subcat & subcats which worked, but in the end ive decided to remove all images from category pages & just use plain text that links to them as eventually alot of images on the subcat pages would look untidy :)

Link to comment
Share on other sites

Guest Stephen Lilly

Thank you for the replies, however am i missing something :) ...This code change seems to relate to latest products, rather than sub catogaries (which is my problem)........or......does the same code effect both areas ?

Link to comment
Share on other sites

You arre entirely correct, he gave you one way to fix the similar issue in latest products.

To repair your problem, all that is necessary to do is look in layout.css and increase the height setting on .subcat class (not .subcats, but .subcat)

Depending on CubeCart version, there may not be a height setting there yet and you will have to add it. Something like this:

.subCat {

text-align: center;

padding: 8px;

float: left;

width: 110px;

height: 50px;

}

50 pixels is RARELY enough height here. If your images are greater height than 32 pix and you have long titles, the subcats will overflow their containers and "hang up" on each other wile trying to float left. Add height there and experiment with that setting until it looks perfect.

By the way, the same exact fix applies to the latest products problem.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...