Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

new products infobox


Vingss

Recommended Posts

Posted

Im sure this one is really simple. but im trying to find the file to amend the infobox header for the new products infobox, the one which appears in the centre of the screen, under the introduction. I've looked in my catalog/includes/boxes folder, but cant find it. I'd appreciate a pointer!

 

many thanks

Posted

The file handling that info box is /includes/modules/new_products.php. In there you'll find TABLE_HEADING_NEW_PRODUCTS which specifies the header for the box - this is defined in /includes/languages/english/default.php (for example).

Regards, Wizzud

"It is better to remain silent and be thought a fool, than to open your mouth and remove all doubt."

Posted

sorry . reading back on my initial post, I didnt really make myself clear! what Im actually trying to do is change the corner graphics of the new products for {month} info box. Could you point me in th eringht direction. It doesnt appear to be in the same area as the other info boxes.

 

thanks very much

Posted

Aloha,

I found directions to change left and right columns, but cannot locate which file to // "out" the new products box on index page.

Can ya' clue me in?

Posted

If you look at catalog/default.php, you will find this around line 308:

 

<td><br><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS);  ?></td>

 

i have used a comment to comment it out, so the new products vanished :)

 

<td><br><?php /* include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); */ ?></td>

 

Marian

Posted

Im still trying to alter the corner graphics (left and right) of the "new products for {month} info box. Any ideas?

Posted

The New Products box is built in /includes/modules/new_products.php. If you look for line 19 (approx.) you'll see that it uses the contentBox(Heading) classes rather than the infoBox(Heading) classes that are used by the side column boxes.

In /includes/classes/boxes.php you will find the definitions for these classes, as extensions to tableBox.

Search down for class contentBoxHeading.

You should be able to see the corner_left.gif and corner_right_left.gif images that are used for the New Products box heading.

If you search up for class infoBoxHeading you will notice that the same images are also used for all the info box headings!

 

You therefore have a couple of choices:

  • Change the contentBoxHeading class to use different/new images, which will be used for any other content boxes in the application (off hand I don't know whether there are any, or what they might be)

[*]Create a new couple of classes, based on contentBox(Heading), that you then use specifically from new_products.php (in place of contentBox and contentBoxHeading)

I suggest you try the first option first!

Good Luck!

Regards, Wizzud

"It is better to remain silent and be thought a fool, than to open your mouth and remove all doubt."

Posted

New products box is gone from initial index page, but still shows up on espanol/default.php and german/default.php

Can you help me get rid of that box?

 

This is kind of related, too...I made all new infoBox buttons, for each of the languages, too. I followed instructions from Wiki Docs for changing images on infoBoxes, but same problem with foreign languages. The initial (English) ones come up. Where do I alter code to change for Spanish & German?

 

For instance new bestsellers info box. Where would spanish bestsellers.php be located?

Currently that code reads for the English button:

<?php

   $info_box_contents = array();

   $info_box_contents[] = array('text' => BOX_HEADING_BESTSELLERS);



   new infoBoxHeadingBest($info_box_contents, true, false);



   $rows = 0;

   $bestsellers_list = '<table border="0" width="100%" cellspacing="0" cellpadding="1">';

   while ($best_sellers = tep_db_fetch_array($best_sellers_query)) {

     $rows++;

     $bestsellers_list .= '<tr><td class="infoBoxContents" valign="top">' . tep_row_number_format($rows) . '.</td><td class="infoBoxContents"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $best_sellers['products_id']) . '">' . $best_sellers['products_name'] . '</a></td></tr>';

   }

   $bestsellers_list .= '</table>';



   $info_box_contents = array();

   $info_box_contents[] = array('text' => $bestsellers_list);



   new infoBox($info_box_contents);

?>

I tried adding

new infoBoxHeadingBestEsp($info_box_contents, true, false);

and it put both buttons rather than choosing one

any suggestions?

  • 1 year later...
Posted
If you look at catalog/default.php, you will find this around line 308:

 

<td><br><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ??></td>

 

i have used a comment to comment it out, so the new products vanished :)

 

<td><br><?php /* include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); */ ?></td>

 

Marian

Um... I too am trying to remove the "New Products for [June]" from the main/home page.

 

But.. I don't have a default.php file?

 

Help?

  • 1 year later...
Posted
Um... I too am trying to remove the "New Products for [June]" from the main/home page.

 

But.. I don't have a default.php file?

 

Help?

 

I also have the same problem..... Please help us

Posted

Do you have index.php? Older versions of OSC used defalt.php whereas it now uses index.php.

Posted

Got it - but I was unable to comment the line out - I had to actually remove the lines, including the <tr> on the line before and </tr> on the line after - hopefully someone else will get help from this - it's been a long day working on it!

  • 3 weeks later...
Posted
Got it - but I was unable to comment the line out - I had to actually remove the lines, including the <tr> on the line before and </tr> on the line after - hopefully someone else will get help from this - it's been a long day working on it!

 

I wound up taking the whole line out too...got a parse error when I just tried to comment out the line otherwise :'(

Archived

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

×
×
  • Create New...