News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Auto-reduce customfield value by 1 every day?

Started by mailblade, February 11, 2018, 09:09:43 AM

Previous topic - Next topic

mailblade

Solved; Will use STUDIO 42's suggestion.

I've got a small issue I am not sure on how to approach.

Let's say I've got a customfield "Days until Release", with each product having a different "Days until Release" customfield value (5, 10 etc).

How would I go about automatically reducing this value in the database by 1 every day until it reaches zero and then stops reducing?

I'm not really sure how to go about this, so any advice/tips would be kindly appreciated.

Thanks

AH

Maybe you should set a date rather than days and do the calculation based on that
Regards
A

Joomla 4.4.5
php 8.1

Studio 42

This need to do a customfield plugin, or use a standard customfield using a date and compare with current date.
In all case this need to have some PHP knowledge to do the plugin or to check the customfield ID, compare and display the countdown.

mailblade

Yes thanks guys will try that. For now, I'll just run an SQL query myself everyday to reduce by 1 every morning.

Studio 42

You complicate your live for nothing, but it's your choice

mailblade

I mean until I figure out how to do a custom plugin this will have to do.