Jump to content

Setting Product Expiration Date


beanfan78

Recommended Posts

I am selling products that expire. They are good for 30 days or so depending on the type. I was trying to find a way to set an expiration date so it's automatically disabled or deleted. Even better if maybe at say 7 days from expiration I can put a sale on it.

 

Is there anything that exists out there for this or am I missing a setting for this in the cart?

  • Like 1
Link to comment
Share on other sites

Maybe you can create some cron job which checks the 'modified' date and then adds some days to it. Maybe use another product field that you don't use as amount of days until expired, like the shipping->depth field, or UPC field or so.

 

Then check in crob job script

if modified + days to expire > now, disable product

if modified + days to expire > now + 7, enable sale for product

 

Example of a cronjob script (in this case, one that closes a shop). (Dtabase name, password and user you can find in your own config/settings.inc.php)

Close_shop.php

 

 

More examples/explanations of cronjobs in PrestaShop:

http://www.prestashop.com/forums/topic/248621-solvedopen-and-close-store-at-set-times-each-day/

 

and some trigger code (with SQL code)  to activate/deactivate a product (in this case, when out of stock):

 

http://www.prestashop.com/forums/topic/258359-how-to-hide-out-of-stock-products-in-prestashop-1541/page-3?do=findComment&comment=1416238

 

 

My 2 cents,

pascal.

 

 

Link to comment
Share on other sites

Maybe you can create some cron job which checks the 'modified' date and then adds some days to it. Maybe use another product field that you don't use as amount of days until expired, like the shipping->depth field, or UPC field or so.

 

Then check in crob job script

if modified + days to expire > now, disable product

if modified + days to expire > now + 7, enable sale for product

 

Example of a cronjob script (in this case, one that closes a shop). (Dtabase name, password and user you can find in your own config/settings.inc.php)

attachicon.gifClose_shop.php

 

 

More examples/explanations of cronjobs in PrestaShop:

http://www.prestashop.com/forums/topic/248621-solvedopen-and-close-store-at-set-times-each-day/

 

and some trigger code (with SQL code)  to activate/deactivate a product (in this case, when out of stock):

 

http://www.prestashop.com/forums/topic/258359-how-to-hide-out-of-stock-products-in-prestashop-1541/page-3?do=findComment&comment=1416238

 

 

My 2 cents,

pascal.

Pascal, I appreciate the response. I am not a coder so this would be beyond my skills. I was hoping to just find a module that exists already. Perhaps no one sells products that expire and I need to hire someone to make it. 

Link to comment
Share on other sites

I figured I would take another shot at this. Maybe this image will help. I need a dedicated box to but an expiration date in and be able to control the products listing by it. I rotate half my inventory every month because I purchase time-sensitive products and resell them.

 

I just need to know if anything exists out there that can deal with expirations or if this is going to have to be a custom job. I think the cronjob solution that was presented is not appropriate for this, because of the way I want to use the expiration field. There are several employees that list products and I need this to be straightforward and easy to manage.

post-186030-0-79359100-1395307767_thumb.jpg

Edited by beanfan78 (see edit history)
Link to comment
Share on other sites

  • 1 month later...

Its unbelievable that this feature isn't default in prestashop. I really need this feature also. All other CMS tools I have used for products have this feature. To be able to set an "in" date and an "out" date for products is a very inportant feature when you have many products from many suppliers and you are only selling their products for a limited period of time.

 

This is also a necessity when you want to work ahead, put a large number of products into the system and have them ready and appear bright and early the next day!! I can't believe that nobody has the need for this other than us...

 

:) 

Link to comment
Share on other sites

To implement this correctly, you would want to add new stock (maybe with available from - date in future) while still selling the old stock. You would want to still be able to sell part of your product stock that isn't expired yet, although the other part is expired already. So you don't want the full product be activated/deactivated, but maybe only parts of it...

 

You would actually want to have something similar to 'attributes/combinations' where you can add an amount of the same product, but with different expiration date.

 

Interesting project, but will take time...

 

pascal.

Link to comment
Share on other sites

  • 1 year later...

I know this is an old topic and hopefully you fund a solution at the time, but for anybody who is looking for the same and comes across this post, here's a link to an add-on that seems to have this functionality. Haven't tried it out myself but was just having a quick browse because we're possibly looking for something like it. http://addons.prestashop.com/en/administration-tools-prestashop-modules/17506-scheduled-products-publishing-actions.html

 

And by the way, I completely agree that "enable/disable" dates should be an integral part of PS, the same way publishing/unpublishing dates are core to any leading CMS. 

Edited by intandem (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...