Hi Digitalsense,
By default in Bender, the ads become inactive after expiring but then change to blocked in the admin Manage Listings section.
Only the admin can see the listings when this happens.
I need users to see their expired ads when they login.
Otherwise they cannot renew the ads.
Where does this code go?
function make_item_inactive_expired()
{
$todayDate = date('Y-m-j');
Item::newInstance()->dao->query(sprintf("UPDATE %st_item SET b_active = 0 WHERE dt_expiration < '$todayDate' && b_premium = 0", DB_TABLE_PREFIX));
}
Where does this code go?
osc_add_hook('cron_daily', 'make_item_inactive_expired'); //to run it daily
osc_add_hook('cron_hourly', 'make_item_inactive_expired'); //to run it hourly
Not being a coder, I need some direction.
Thanks for taking the time to reply.
Regards.