Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding month to infoBox


Silverado05

Recommended Posts

Posted

I usally take this out, but if you notice that on a stock OSC the box on the index page says " New Products For July". I need to know how I would go about adding the date like that. I thought it was %m when added to added to the text file but it didn't work. I am trying to added it to another box instead of the new products since like I said I normally take it out. So any help would be great.

 

 

-Thanks

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Posted
I usally take this out, but if you notice that on a stock OSC the box on the index page says " New Products For July". I need to know how I would go about adding the date like that. I thought it was %m when added to added to the text file but it didn't work. I am trying to added it to another box instead of the new products since like I said I normally take it out. So any help would be great.

-Thanks

 

If you edit the new_products.php file you will see that it use: strftime('%B') to show the month.

Posted

I tried:

 

 $info_box_contents[] = array('text' => sprintf(TABLE_HEADING_PRODUCT_SPECIALS
, strftime('%B')));

 

and it didn't work, just outputted the head with no date. Is thier something esle that needs to be done somewhere else?

 

 

-Thanks

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Posted
I tried:

 

 $info_box_contents[] = array('text' => sprintf(TABLE_HEADING_PRODUCT_SPECIALS
, strftime('%B')));

 

and it didn't work, just outputted the head with no date. Is thier something esle that needs to be done somewhere else?

-Thanks

 

In addition to what you've done, wherever you have the TABLE_HEADING_PRODUCT_SPECIALS text defined, use something like

 

define('TABLE_HEADING_PRODUCT_SPECIALS', 'Specials For %s');

 

I think that should work.

Posted

Ok thanks, I got it now. I had done that, just had it in the wrong lang file for that header. Amazing what a little sleep will do, see things a lot clearer.

 

-Thanks

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Archived

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

×
×
  • Create New...