PDA

View Full Version : Help help help = Category listing output



Anonymous
11-25-2002, 06:03 PM
I posted this at the official site and didn't get an answer. I've looked in every database and nearly every php file. I've read the documentation and searched both boards.

All I want to do is change the look of the output when you click on a category link. It has alternating color rows; it shouldn't be so hard to find. Why is it not a box file? If I were to create a box file for it, once I find the code, where would I include it on the index file?

It has to be on the index because it's querying through it. Please please, someone please tell me where to find the code for the output of the categories.

Anonymous
11-25-2002, 06:23 PM
The one file you missed - stylesheet.css

Anonymous
11-25-2002, 06:27 PM
Right right. I see all the pretty colors, the odd and even thing, but what is calling to that and from where exactly in the page?

I want to squish the boxes so that three products are displayed side by side with the words underneath them. I'll know what to do when I get there, but where is the code for that?

michael_s
11-25-2002, 08:07 PM
There is a mod for this already at oscommerce.com. You should check it out. Here is the link:

http://www.oscommerce.com/downloads.php/contributions,166/type,3

Anonymous
11-25-2002, 09:25 PM
Heck yeah! Wonderful. Thank you.

I'm not sure what version I have because it came from my host, but for future reference, I had to make hacks to it. I do have Buy Now enabled and Images on.

Line 29 - 35
Switched


$listing_values['products_name'] = $listing_values['products_name'];
$lc_text= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing_values['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing_values['products_image'], $listing_values['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing_values['products_id']) . '">' . $listing_values['products_name'] . '</a><br>';
if ($listing_values['specials_new_products_price'] ) {
$lc_text .= ' <s>' . $currencies->display_price($listing_values['products_price'], $listing_values['products_tax_class_id']) . '</s>  <span class="productSpecialPrice">' . $currencies->display_price($listing_values['specials_new_produc ts_price'], $listing_values['products_tax_class_id']) . '</span> ';
} else {
$lc_text .= ' ' . $currencies->display_price($listing_values['products_price'], $listing_values['products_tax_class_id']) . ' ';
}


TO



$listing_values['products_name'] = $listing_values['products_name'];
$lc_text= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing_values['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing_values['products_image'], $listing_values['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing_values['products_id']) . '">' . $listing_values['products_name'] . '</a><br>';
if ($listing_values['specials_new_products_price'] ) {
$lc_text .= ' <s>' . $currencies->display_price($listing_values['products_price'], $listing_values['products_tax_class_id']) . '</s>  <span class="productSpecialPrice">' . $currencies->display_price($listing_values['specials_new_produc ts_price'], $listing_values['products_tax_class_id']) . '</span> ';
} else {
$lc_text .= ' ' . $currencies->display_price($listing_values['products_price'], $listing_values['products_tax_class_id']) . ' ';
}

Anonymous
11-25-2002, 09:27 PM
Carp. Make that

FROM


$listing_values['products_name'] = tep_get_products_name($listing_values['products_id ']);
$lc_text= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing_values['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing_values['products_image'], $listing_values['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing_values['products_id']) . '">' . $listing_values['products_name'] . '</a><br>';
if ($listing_values['specials_new_products_price'] ) {
$lc_text .= ' <s>' . $currencies->display_price($listing_values['products_price'], tep_get_tax_rate($listing_values['products_tax_cla ss_id'])) . '</s>  <span class="productSpecialPrice">' . $currencies->display_price($listing_values['specials_new_produc ts_price'], tep_get_tax_rate($listing_values['products_tax_cla ss_id'])) . '</span> ';
} else {
$lc_text .= ' ' . $currencies->display_price($listing_values['products_price'], tep_get_tax_rate($listing_values['products_tax_cla ss_id'])) . ' ';
}

TO



$listing_values['products_name'] = $listing_values['products_name'];
$lc_text= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing_values['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing_values['products_image'], $listing_values['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing_values['products_id']) . '">' . $listing_values['products_name'] . '</a><br>';
if ($listing_values['specials_new_products_price'] ) {
$lc_text .= ' <s>' . $currencies->display_price($listing_values['products_price'], $listing_values['products_tax_class_id']) . '</s>  <span class="productSpecialPrice">' . $currencies->display_price($listing_values['specials_new_produc ts_price'], $listing_values['products_tax_class_id']) . '</span> ';
} else {
$lc_text .= ' ' . $currencies->display_price($listing_values['products_price'], $listing_values['products_tax_class_id']) . ' ';
}