Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Customizing the products_new.php page


  • You cannot reply to this topic
No replies to this topic

#1 royalfunk

  • Community Member
  • 291 posts
  • Real Name:Aaron

Posted 24 October 2003, 19:43

The main block of code that makes up the defualt configuration of the new products table is a little tricky for us novice PHP guys. I'v come along way recently with PHP & MySQL but this one page escapes me. I am simply trying to eliminate the Manufacturer field and add the Product Description under the model #. I also would like to scoot the Add to Cart button over to the left. I don't mind doing all this on my own, but I cannot figure out this string and how it is compiling the structure of the HTML table. Any help is GREATLY appreciated. Thanks!

------------------------------------------------------------

<?php
$products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' order by p.products_date_added DESC, pd.products_name";

$products_new_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_PRODUCTS_NEW, $products_new_query_raw, $products_new_numrows);

$products_new_query = tep_db_query($products_new_query_raw);
while ($products_new = tep_db_fetch_array($products_new_query)) {
$products_new_array[] = array('id' => $products_new['products_id'],
'name' => $products_new['products_name'],
'image' => $products_new['products_image'],
'price' => $products_new['products_price'],
'specials_price' => $products_new['specials_new_products_price'],
'tax_class_id' => $products_new['products_tax_class_id'],
'date_added' => tep_date_long($products_new['products_date_added']),
'manufacturer' => $products_new['manufacturers_name']);
}

require(DIR_WS_MODULES . 'products_new.php');
?>