PDA

View Full Version : Renew from admin panel



Aleksandar Apostolovski
March 24, 2019, 05:35 PM
Hi,
I tried to renew a listing through admin panel, I select the listing then from "Select action" I select "Renew" and after I click "Go" I get this message:
You’ve successfully applied the bulk action.
The listing gets new payment date but it's not shown (published) as latest listing. If I open the listing it still has the previous date when it was published.
This "Renew" option is for something else or?

Pete Young
March 24, 2019, 09:29 PM
When you update a listing there are 2 options. 1 to keep current date and 2. to renew with the new date which will place the listing back at the top.

See Admin > Basic Settings > Listings > Update posting date of listings after upgrading > Enable (if not set)

Aleksandar Apostolovski
March 24, 2019, 09:38 PM
Hi, I've checked it and it's already enabled. When I renew a listing manualy from the user's panel it works fine. It doesn't renew it only from the admin panel

Viktor
March 25, 2019, 06:30 AM
You need to change some code. Open file: ftp://includes>>classes>>admin>>rlListingsAdmin.class.php

find code at line ~211:


elseif ($action == 'renew') {
$sql = "UPDATE `{db_prefix}listings` SET `Pay_date` = NOW(), `Status` = 'active' WHERE FIND_IN_SET(`ID`, '" . implode(',', $ids) . "')";


and replace to:


elseif ($action == 'renew') {
$sql = "UPDATE `{db_prefix}listings` SET `Date` = NOW(), `Pay_date` = NOW(), `Status` = 'active' WHERE FIND_IN_SET(`ID`, '" . implode(',', $ids) . "')";


save and check again.