Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Help with Some TM Code


Recommended Posts

Hello All!


Long time since I posted here!


I need some help with some code of a template I'm editing. Please find below the snippet:


$row = 80;
$manufacturers_query = tep_db_query("select manufacturers_name, manufacturers_id from " . TABLE_MANUFACTURERS . " order by manufacturers_name" );
while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
echo '<td align="center" valign="top" width="175" class="smallText">';
echo '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers['manufacturers_id'] . '=' . $manufacturers['manufacturers_name'], 'NONSSL') . '">'. $manufacturers['manufacturers_name'] . ' <br> ';
echo "</a><br><br>\n";
echo '</td>';
if ((($row / 4) == floor($row / 4))) {

//end column listing


This code works perfectly on a stock OSC install. But I'm moving it into a TM template. What would I have to change to make it into four columns? I know that it is the design of TM that is causing this.


The URL to see what I'm talking about it: http://savoircouture...ufacturers2.php

The template code on Template is: Item: #34685

With the code above, it shows the manufacturers in one column. Please also find attached the file.


Any help would be appreciated!


Edited by ecomqueen
Link to comment
Share on other sites



I suggest you contact TM for support, they do offer paid support plans. The code in TM templates is unpredictable and usually sub-standard, therefore we cannot offer suggestions to help you correct code errors.





Link to comment
Share on other sites

Quite definitely "sub-standard" code. Starting a new row (<tr>) without first ending the previous row (</tr>)? Completely jumping out of PHP to merely output a <tr>? Doing a convoluted divide/equal/floor rather than a modulo division? Sheesh! As King Arthur said, "Run away! Run away!"


I think it's supposed to be outputting 4 columns (I'm guessing that's what the row/4 business is). Are you saying that it doesn't work with the template? Is this nasty code from TM or stock osC? I looked at the attached file, and I can't make heads nor tails of it.

Edited by MrPhil
Link to comment
Share on other sites

I have contacted them, but was hoping the community would be able to help. I know that it is just a design issue, that with more eyes could get resolved in a twinkle. I trust 100 members from this community than that of the TM customization committee -.-

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.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...