Jump to content

Latest product images all over the place


Guest Steve Wilson

Recommended Posts

Guest Steve Wilson

Hi

I'm nearly there with my first cube cart. What a great product and the help here has been first class.

Now I've got all my products in I'm showing them on the homepage in Latest Products but I can't get them to line up correctly.

cubecart.jpg

I haven't touched any code this is how they look by default. Is there anyway of them all having the same space so they line up 'hor' and 'vert'? My images are different sizes is this causing this issue?

Steve

Link to comment
Share on other sites

Guest valencia

This was covered in a topic at http://www.cubecart.com/site/forums/index....topic=15347&hl=

It requires editing one of your files or getting a simple mod and it shows your products in individual boxes. My latest products are enclosed in their own box and it makes it much neater in my estimation.

There is a second post on simply realigning your boxes with the codes provided, see http://www.cubecart.com/site/forums/index....showtopic=10101

Have Fun :unsure:

Link to comment
Share on other sites

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

CODE

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

Replace with this code

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

CODE

<!-- 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&amp;productId={VAL_PRODUCT_ID}"><img src="{VAL_IMG_SRC}" alt="{VAL_PRODUCT_NAME}" border="0" /></a>

<br />

<a href="index.php?act=viewProd&amp;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 Steve Wilson

Thanks Roban and Valencia for your help.

I'll get on to it straight away.

All the best

Steve

PS: Tried your code Roban and it's spot on. I believe that's twice in two days you've helped me out. I owe you one. Thanks.

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...