Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

code needed to display....


gscreations

Recommended Posts

What code do i need to display the following different results:

 

All items within a category

All items within a subcategory

log into admin click on Catalog/which takes you to Categories / Products from here you create new Categories / Products.

PS when entering a new product click on folder icon for catagory not the text this is where I was first stuck.

( WARNING )

I think I know what Im talking about.

BACK UP BACK UP BACK UP BACK UP

Link to comment
Share on other sites

Nobody is going to hold your hand, but we will help you learn. Most everyone on here has learned the hard way, and when people dont show an intrest in learning just wanting free code, it tends to turn people off in helping you.

 

Matti has suggested the best place to start. Just try some things see what happens. Live and learn ;)

 

-Dennis

Link to comment
Share on other sites

true, but looking at the product listing page that mat says is not helping me yet, i know the code is there somewhere, i come from an asp background and dont yet fully understand php, so if i had a start with one bit of coding that shows me how to call results from a database, and just that, then i could figure out how the rest works. Im sure its not hard to for someone to write code that calls for all products within a subcategory, with that i would learn how everything else works.

Link to comment
Share on other sites

Take a look at the code that begins around here in index.php - study its relationship to product_listing.php which, along with classes/boxes.php and classes/split_page_results.php is used to format it:

 

  } elseif ($category_depth == 'products'

 

The final query that fetches the products is found in product_listing.php:

 

  if ($listing_split->number_of_rows > 0) {
   $rows = 0;
   $listing_query = tep_db_query($listing_split->sql_query);
   while ($listing = tep_db_fetch_array($listing_query)) {
     $rows++;

 

This makes use of the splitPageResults class - step through it all and study all the $variables and classes - there are a number of db queries for the final result, including a conditional manufacturer's filter - it will slowly begin to gel :P

 

Matti

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...