Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Upcoming products and expected date value


Luchysoft

Recommended Posts

I'm looking for some info on the expected date value on the products table. It seems that somewhere there is a procedure that automatically blanks out the expected date value if the date has passed. Of course in 99% of the cases this makes perfect sense, but in my case, I have a few reasons that I want to leave it in there.

Can anyone tell me where it does that so I can make some mods?

Thanks

Link to comment
Share on other sites

I'm not sure exactly what you're referring to. There is an "upcoming products" box that lists products whose expected date is in the future. Is this the display you are referring to?

 

If so, what you want is a bit tricky because the only products selected for that box are those with an expected date in the future, determined by an SQL query.

 

The only other place I can think of that this appears is in the product_info page itself (which is not a table, so I didn't think you meant that.) So if you would elaborate, perhaps we can help.

Link to comment
Share on other sites

I apologize - I wasn't totally clear and I realize now that I may have used some incorrect terminology, so let me try again.

 

My goal is to have products continue to be listed in the upcoming products box. First, I should mention that I'm not using the standard OSC upcoming products module, but instead a contrib called Upcoming Products (#1528).

 

It seems there is some procedure somewhere that automatically blanks out the field products_date_available on the products table once that date has passed. For example, if today is May 20 and I enter a date in that field of May 21, as soon as it turns over to May 22, the date of May 21 that I entered in that field is now gone.

I am planning on replacing that procedure with something that removes the value about 14 days after the actual date, so again, with the example above, on say June 4 it would remove the May 21 date, but not before.

I want to do this for a few reasons - first, the products don't always come in on the day they are expected, so I don't want the items to drop off the upcoming products screen. Second, I'm planning on modifying the contrib a bit to continue to list items that are in stock (for roughly 14 days) and have them listed as newly arrived items. (Yes, I know there is the new products infobox, but that is for newly listed pre-order items, not items that just arrived).

 

I appreciate any help you can offer - if you need any more info from me, please let me know.

 

Thanks

Scott

Link to comment
Share on other sites

If you're using a contrribution for this, just search the code to find out where the date is displayed and what causes it to be blanked. Then disable the blanking code. I haven't looked at that contribution, so I can't tell you where to look, but this is general advice that applies to lots of situations.

 

It's all in the code - somewhere.

Link to comment
Share on other sites

The code I'm looking for has nothing to do with the contrib - as far as I can tell it is standard functionality for OSC to blank out this date when it has passed, as part of routine maintenance.

Maybe my question should be where do the routine maintenance operations happen?

Link to comment
Share on other sites

I'm still looking for an answer to this. I did a little more experimentation, and found on the Admin side that there is a bit of code when adding or editing a product that will insert the available date you put unless that date is less than today, in which case it will insert null into the products_date_available field. Unfortunately that doesn't completely help because there are other situations where the admin page that runs this code isn't called but the date still gets set to Null. Yesterday (5/31/2004) I set the date for a product to 6/1/2004. Today when I checked it, the product was not listed among Upcoming products, so between yesterday and today it somehow set it to null, right?

Even stranger however, I went into the tables to look further. When I query the product in question, in the row view it shows the products_date_available field as null, but when click the edit button on the row and view the record in edit mode, it shows a date of 6/1/2004! How could it show the same record with two different pieces of information? And I'm doing this today on a different computer than I used yesterday, so I can't see how I'm having a page caching problem.

Anyone have any clue what is going on here?

 

Thanks

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...