Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New products for... box??


warrenerjm

Recommended Posts

Posted

Hi everyone

 

I'm still searching for the elusive "New products for (month)" box. All I want to do is set the right corner to round. I can't find it in the boxes folder. I have searched the forum, which has 1000's of references to "new", "box" & "products", but none so far with all three! Please help me so I can complete one of my many tasks left list.

 

Thank you all

Julie

Posted

The new products for box is taken care of by:

 

catalog/includes/modules/new_products.php

 

But I believe that all boxes are derived from a box class, all these files do is create an instance of the basic box class and alter some of its attributes, i.e. title of the top bar and the main contents... So if you were to make the right hand corner rounded, it would be rounded on every other box....

 

I could be wrong and Im sure someone will set me straight if I am.

 

 

The file with the class definition for the boxes is at:

 

catalog/store/includes/classes/boxes.php

 

but it looks a bit scary in there!

 

The image shown in the top right of that box is (I think..)

 

catalog/images/infobox/corner_right_left.gif

 

if you had a play about with that you may get what you wish, but that may affect other boxes too.

 

Not sure if this helps much, but it may get you started in the right direction...

 

 

 

 

 

Hi everyone

 

I'm still searching for the elusive "New products for (month)" box. All I want to do is set the right corner to round. I can't find it in the boxes folder. I have searched the forum, which has 1000's of references to "new", "box" & "products", but none so far with all three! Please help me so I can complete one of my many tasks left list.

 

Thank you all

Julie

Posted
create a rounded corner gif and overwrite this file with it:

 

/catalog/images/infobox/corner_right_left.gif

Hi Jason

 

Thanks. It is different than the other boxes then? I have managed to change the other right hand corners by amending the code to true, true. I was hoping I could do the same for this one. Where would I get a rounded corner gif as I do not know how to make one? I got my transparent ones from a contribution.

 

Thanks again

Julie

Posted

Thanks Gareth

 

Very similar to Jasons answer. I have changed the other boxes right corner by amending the code in each box to true, true. This gives whichever box you choose a rounded left & right corner. This is the last box (as far as I can see) to change & it would be different, wouldn't it!

 

Julie

Posted

np Julie,

 

I've had a look at the Boxes.php file, and its true some boxes are constructed with yes/no options for the corners, but this one is not. However the images are hard coded into the box class, this is the code that does it...(below) the bits I highlighted in red are where the corner images are set.... so your best bet is just to change the actual gif files to suit...

 

class contentBoxHeading extends tableBox {

function contentBoxHeading($contents) {

$this->table_width = '100%';

$this->table_cellpadding = '0';

 

$info_box_contents = array();

$info_box_contents[] = array(array('params' => 'height="14" class="infoBoxHeading"',

'text' => tep_image(DIR_WS_IMAGES . 'infobox/corner_left.gif')),

array('params' => 'height="14" class="infoBoxHeading" width="100%"',

'text' => $contents[0]['text']),

array('params' => 'height="14" class="infoBoxHeading"',

'text' => tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif')));

 

$this->tableBox($info_box_contents, true);

}

 

 

 

Thanks Gareth

 

Very similar to Jasons answer. I have changed the other boxes right corner by amending the code in each box to true, true. This gives whichever box you choose a rounded left & right corner. This is the last box (as far as I can see) to change & it would be different, wouldn't it!

 

Julie

Posted
np Julie,

 

I've had a look at the Boxes.php file, and its true some boxes are constructed with yes/no options for the corners, but this one is not. However the images are hard coded into the box class, this is the code that does it...(below) the bits I highlighted in red are where the corner images are set.... so your best bet is just to change the actual gif files to suit...

 

class contentBoxHeading extends tableBox {

function contentBoxHeading($contents) {

$this->table_width = '100%';

$this->table_cellpadding = '0';

 

$info_box_contents = array();

$info_box_contents[] = array(array('params' => 'height="14" class="infoBoxHeading"',

'text' => tep_image(DIR_WS_IMAGES . 'infobox/corner_left.gif')),

array('params' => 'height="14" class="infoBoxHeading" width="100%"',

'text' => $contents[0]['text']),

array('params' => 'height="14" class="infoBoxHeading"',

'text' => tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif')));

 

$this->tableBox($info_box_contents, true);

}

Hi Gareth

That helps me see it in the code. Thanks. All i need now is a rounded right corner! I don't have the knowledge, experience or probably software to do this. Does anyone else have a rounded corner they could lend me please? My box colour is #6699ff.

 

Thanks

Julie :D

Posted
I've had a look at the Boxes.php file, and its true some boxes are constructed with yes/no options for the corners, but this one is not. However the images are hard coded into the box class,

 

Just thought about this Gareth. If the other boxes are yes/no, do they have a .gif of a rounded/square .gif?

If so can I find that, copy it, & paste it over the "new products..." .gif as previously suggested? Or am I being really dumb & there is no .gif for the other boxes, just complicated codes?

 

Thanks for any help on this

Julie

Posted

Your right of course, the two files used for rounded corners in the Yes/No optin boxes are...

 

corner_right.gif

 

and

 

corner_left.gif

 

 

I would not copy over the corner_right_left.gif file with a corner_right.gif file as the corner_right_left.gif - which is a square - may be used elsewhere where it needs to be square. I would go to the code I pasted from the boxes.php file and alter the line that says

 

 

'text' => tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif')));

 

to

 

'text' => tep_image(DIR_WS_IMAGES . 'infobox/corner_right.gif')));

 

 

 

 

 

 

Just thought about this Gareth. If the other boxes are yes/no, do they have a .gif of a rounded/square .gif?

If so can I find that, copy it, & paste it over the "new products..." .gif as previously suggested? Or am I being really dumb & there is no .gif for the other boxes, just complicated codes?

 

Thanks for any help on this

Julie

Posted
Your right of course, the two files used for rounded corners in the Yes/No optin boxes are...

 

corner_right.gif

 

and

 

corner_left.gif

I would not copy over the corner_right_left.gif file with a corner_right.gif file as the corner_right_left.gif - which is a square - may be used elsewhere where it needs to be square. I would go to the code I pasted from the boxes.php file and alter the line that says

'text' => tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif')));

 

to

 

'text' => tep_image(DIR_WS_IMAGES . 'infobox/corner_right.gif')));

YES :D At last I have a right rounded corner on my "New products for..." box. Thank you so much Gareth. It has been bugging me for ages.

 

Julie :thumbsup:

Archived

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

×
×
  • Create New...