Hi Anton-
When you visit the page you want to modify in your browser, I'm assuming it is the toplistings.php page?
If so, you'll need the developer edition to apply the change as it'll require modifying the query to pull the company name from the database then assigning the value so that value can be passed to the template.
Open toplistings.php
Around line 73. You should see:
Code:
$sSQL="SELECT p.id, p.owner, p.title, p.display, p.featured, p.section, p.shortDescription, p.description, p.price, p.dateadded, p.expiration, p.pHighlighted, p.pBold, u.state, u.city, u.country".$select." FROM ".PREFIX."products AS p LEFT JOIN ".PREFIX."users AS u ON p.owner = u.id WHERE p.expiration > NOW() AND p.display = 'Y' ". $wherehook . $where;
Between u.country and the double quote next to it, enter:
(Assuming, of course, that you're not using that extra field for something already)
Then, down around line 124:
Code:
$row['image']=htmlspecialchars($irs['image']);
$row['title']=$pre.safeStripSlashes($row['title']).$post;
add a new line:
Code:
$row['image']=htmlspecialchars($irs['image']);
$row['extra']=$pre.safeStripSlashes($row['extra']).$post;
$row['title']=$pre.safeStripSlashes($row['title']).$post;
Save and close toplistings.php
Open templates/<your template name>/showlistings.tpl.php (or showlistings2.tpl.php - if you're using it) and look around line 52:
Code:
{if $sDisPhoto == "Y"}
<th>{$smarty.const.LANG_PHOTO}</th>
{/if}
<th>Company Name</th>
{if $sDisTitle == "Y"}
<th>{$smarty.const.LANG_TITLE}</th>
{/if}
Around line 80. Change it to:
Code:
{if $sDisPhoto == "Y"}
<td{if $entry.class<>""} class="{$entry.class}"{/if}><a href="{$entry.link}">{if $entry.image != ""}<img src="thumbs/small_{$entry.image|escape:"url"}" border="0" />{else}<img src="images/nophotosmall.gif" border='0' />{/if}</a></td>
{/if}
{if $entry.extra<>""}
<td{if $entry.class<>""} class="{$entry.class}"{/if}>{$entry.extra}</td>
{else}
<td{if $entry.class<>""} class="{$entry.class}"{/if}> </td>
{/if}
{if $sDisTitle == "Y"}
<td{if $entry.class<>""} class="{$entry.class}"{/if}>{$entry.title}</td>
{/if}
Change the colspan attribute to 10 in line 110.
Uh... that should be it. I think I've just rebuilt the engine when it was only the tank that was out of gas
Now, you need to ask the customer for their company name and get it inserted in the 'extra' cell of the user's table.