Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can I to create Product with [b]LIMITED TIME AVAILABILIY?


Guest

Recommended Posts

Does anyone know if there is a contribution or a tip/trick to do this? I have searched the forums to no avail. In particular, we often get limited time specials from our distributors, and it is a pain in the kiester to have to remember to go back in and remove them as they expire. If there were a way for this to happen automatically, it would rock.

Link to comment
Share on other sites

Thank you Terri, that is just what I needed. Can't believe I missed that...the older my kids get, the slower I think. You think there is a correlation? :oops:

Link to comment
Share on other sites

In yet another brain f*rt, I realized that this won't QUITE do what I need. I need the products to actually be completely removed from availability once the special expires, like we have a limited number of laptops available on a one-day special price and after today they are no longer available at all.

Link to comment
Share on other sites

Sorry it wasn't exactly what you need. I didn't realize it left the products there. I'd be intersted in this sort of "removing once gone" too as some of my products (handmade soap and toiletries) are made as one time only batches for special customers. Sometimes I have few left over and usually offer them on eBay, but I want to get away from the auction scene because I'm never happy with the money I make there and the eBay market is swapped with handmade soaps.

Terri

Help me I'm lost in PHP and I don't have a map!

Link to comment
Share on other sites

if you go to includes/functions/specials.php

 

do something like this

 

function tep_expire_specials() {

   $specials_query = tep_db_query("select specials_id from " . TABLE_SPECIALS . " where status = '1' and now() >= expires_date and expires_date > 0");

   if (tep_db_num_rows($specials_query)) {

     while ($specials = tep_db_fetch_array($specials_query)) {

       tep_set_specials_status($specials['specials_id'], '0');

 tep_db_query("update " . TABLE_PRODUCTS . " set products_status = '0' where products_id = '" . $specials['specials_id'] . "'");

     }

   }

 }

 

which will change the products status to off when the date runs out

 

I haven't tested this BTW

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...