Advertisement

08.08.2008 at 10:15AM PDT, ID: 23633387
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.1

osCommerce - Listing Products - Help with Array

Asked by dannywareham in PHP Scripting Language, WebApplications

Tags: , ,

Hi All

I have an osCommerce store that I'm setting up.
I want the product listing to look like http://www.booksatrillion.com/Example1.jpg
Each row is a seperate product, with a "buy now" button at the end.

However, it currently looks like: http://www.booksatrillion.com

The array and output that I have concatenates all product info into one "block", then moves to the next block - which makes it list all products across the page. Not good.

Can anyone help with where I am going wrong, please?

For info, the box concerned is just a box - not a whole page. Code is attached below:Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
<table width="823" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="17" height="16"><img src="page_layout/content_TL.gif" width="17" height="16"></td>
    <td height="16" background="page_layout/content_Texpander.gif"></td>
    <td width="24" height="16"><img src="page_layout/content_TR.gif" width="24" height="16"></td>
  </tr>
  <tr>
    <td width="17" background="page_layout/content_Lexpander.gif"></td>
    <td>
	<table width="500" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><h1><img src="images/head_latestbooks.png" alt="Latest Books" width="200" height="40"></h1></td>
        </tr>
      </table>
	  <table width="823" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="300" valign="top"><p>Title</p></td>
          <td width="150" valign="top"><p>Author</p></td>
          <td width="150" valign="top"><p>Price</p></td>
          <td width="150" valign="top"><p>ISBN</p></td>
        </tr>
        <tr>
<?php
  $products_new_array = array();
 
  $products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name";
  $products_new_split = new splitPageResults($products_new_query_raw, 28);
?>
 
<?php
  if ($products_new_split->number_of_rows > 0) {
    $products_new_query = tep_db_query($products_new_split->sql_query);
    while ($products_new = tep_db_fetch_array($products_new_query)) {
      if ($new_price = tep_get_products_special_price($products_new['products_id'])) {
        $products_price = '<s>' . $currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($products_new['products_tax_class_id'])) . '</span>';
      } else {
        $products_price = $currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_tax_class_id']));
      }
?>
          <td colspan="5"><div align="left"><?php echo '<b><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new['products_id']) . '">' . $products_new['products_name'] . '</a></b>';?><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new['products_id']) . '">' . $products_new['manufacturers_name'] . '</a>';?><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new['products_id']) . '">' . $products_new['products_price'] . '</a>';?><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new['products_id']) . '">' . $products_new['products_model'] . '</a>';?><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products_new['products_id']) . '">' . tep_image_button('../../../../../images/button_buynow.png', IMAGE_BUTTON_IN_CART) . '</a><br/>'; ?></div>            
		  <div align="left"></div>            
		  <div align="left"></div>            
		  <div align="left"></div>
		  </td>
          <?php
    }
  } else {
?>
          <?php
    }
?>
        </tr>
        <tr>
          <td height="300" colspan="5">&nbsp;</td>
        </tr>
        <tr>
          <td colspan="3"><?php echo $products_new_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS_NEW); ?></td>
          <td colspan="2" align="right" valign="middle" class="main"><?php echo TEXT_RESULT_PAGE . ' ' . $products_new_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>
        </tr>
      </table></td>
    <td width="24" background="page_layout/content_Rexpander.gif"></td>
  </tr>
  <tr>
    <td width="17"><img src="page_layout/content_BL.gif" width="17" height="17"></td>
    <td background="page_layout/content_Bexpander.gif"></td>
    <td width="24"><img src="page_layout/content_BR.gif" width="24" height="17"></td>
  </tr>
</table>
[+][-]08.10.2008 at 03:51AM PDT, ID: 22199269

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.10.2008 at 03:57AM PDT, ID: 22199276

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.10.2008 at 10:28AM PDT, ID: 22200177

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.10.2008 at 10:42AM PDT, ID: 22200205

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.12.2008 at 11:51AM PDT, ID: 22215861

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.12.2008 at 04:28PM PDT, ID: 22217941

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: PHP Scripting Language, WebApplications
Tags: OpenSource, osCommerce, RC2.2
Sign Up Now!
Solution Provided By: fibo
Participating Experts: 1
Solution Grade: A
 
 
[+][-]08.14.2008 at 01:59AM PDT, ID: 22228631

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.14.2008 at 12:58PM PDT, ID: 22233722

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-42 / EE_QW_2_20070628