Forum Moderators: coopster

Message Too Old, No Replies

Help With Shop Display items

free shop script

         

shaunw

3:47 pm on Jun 22, 2008 (gmt 0)

10+ Year Member



Hi
Could anyone help me get this bit of code to display the ecommerce shop items in horizontal rows, maybe 3 in a row side by side, rather than the vertical 1 item on top of another that it currently does.?

Any help on how to do this would be appreciated.

I know next to nothing about php so please explain in a none tech way, or if possible post the code i need to do this..

The ad to cart part of the code, i do not need, so this can be removed..

{* product brief view (from a category or search) *}

{if $product_info ne NULL}

<p><table width=95% border=0 cellspacing=1 cellpadding=2>
<tr>
<td width=1% align=center valign=top>

{if $product_info[7]}<td><div style="margin:0px auto;BORDER: gainsboro 1px dotted;PADDING: 6px; TEXT-ALIGN: center">
<a href="index.php?productID={$product_info[11]}">
<img src="products_pictures/{$product_info[7]}" alt="{$product_info[1]¦replace:'"':'&quot;'}" border=0><br>
{$smarty.const.MORE_INFO_ON_PRODUCT}
</a>
{else}
{if $product_info[5]}
<a href="index.php?productID={$product_info[11]}">
<img src="products_pictures/{$product_info[5]}" alt="{$product_info[1]¦replace:'"':'&quot;'}" border=0>
{$smarty.const.MORE_INFO_ON_PRODUCT}
</a>
{/if}
{/if}

</td>

<td valign=top width=99%>

<table width=100% border=0 cellpadding=2>

<tr>
<td valign=top>

<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td>

<a class=cat href="index.php?productID={$product_info[11]}">{$product_info[1]}</a><br>

{if $product_info[8] > 0} {* rating *}

{section name=i loop=5}{if $smarty.section.i.index<$product_info[3]}<img src="images/redstar_big.gif">{else}<img src="images/blackstar_big.gif">{/if}{/section}

{/if}

</td>

</td>
</tr>
</table>

</td>
<td align=right valign=top> {* add to cart *}

{if $smarty.const.CONF_SHOW_ADD2CART eq 1}
{if $product_info[6] > 0 && $product_info[4] > 0}
<a href="index.php?shopping_cart=yes&add2cart={$product_info[11]}"><img src="images/cart_navy.gif" border=0 alt="{$smarty.const.ADD_TO_CART_STRING}"></a>
{else}&nbsp;
{/if}
{/if}

</td>
</tr>

<tr>
<td colspan=2>

{if $product_info[4] > 0}
{* show list price? *}
{if $product_info[10] > 0 && $product_info[10] > $product_info[4] && $product_info[4] > 0}
{$smarty.const.LIST_PRICE}: <font color=brown><strike>{$product_info[13]}</strike></font><br>
{/if}

<b>{$smarty.const.CURRENT_PRICE}: <font class="cat" color="red">{$product_info[12]}</font></b>

{* you save *}
{if $product_info[10] > 0 && $product_info[10] > $product_info[4] && $product_info[4] > 0}
<br>
{$smarty.const.YOU_SAVE}:
<font color=brown>{$product_info[14]} ({$product_info[15]}%)
</font><br>
{/if}
{/if}

</td>
</tr>

<tr>
<td colspan=2>

{$product_info[2]}
</td>
</tr>

</table>

</td>

</tr>

</table>

{/if}

PHP_Chimp

7:38 pm on Jun 23, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



From what you have posted this isnt a php script. As (picking on just a single line):
{if $product_info ne NULL}

may work if you turned it into:

<?php
if ($product_info != NULL) {
?>

I would suggest that you find what language the code is written in. As if it is supposed to be php then there is a huge amount of work to be done...like a complete rewrite.

shaunw

8:54 pm on Jun 23, 2008 (gmt 0)

10+ Year Member



what is it?

topr8

11:58 pm on Jun 23, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



given lots of code like this:

{$smarty.const.CURRENT_PRICE}

i would say it is code related to the smarty template engine, which is used with php, but needs to be installed on the server

[however i don't use smarty and never have so it is just an inspired guess]