I've been getting ready to move form 3.5.x to 3.6.7 and decided to start tweaking vbay from scratch - I've made a notes of the basic changes I needed to make to get vbay functioning well enough to use. As you can see, most of them are small changes - I have not included any aesthetic changes - but hopefully they will help!
This change the look of vbay a little, but I haven't dug into it much yet, and it doesn't really bother me. If anyone can spot any mistakes here - please let me/us know! Thanks
Create a New template called vbay_cat_closed_end
edit the vbay.php file and re-upload it to your server
find:
Code:
eval('$vbayleft .= "' . fetch_template('vbay_cat_closed_row') . '";');
}
}
replace with:
Code:
eval('$vbayleft .= "' . fetch_template('vbay_cat_closed_row') . '";');
}
}
eval('$vbayleft .= "' . fetch_template('vbay_cat_closed_end') . '";');
That should fix up the display of closed auctions
Edit "vbay_shop_row" template
find:
Code:
<td class='alt2' align='center'>{$days}D {$hours}H {$minutes}M {$rest}S</td>
replace with:
Code:
<if condition="$difference > 1">
<td class='alt2' align='center'>{$days}D {$hours}H {$minutes}M {$rest}S</td>
<else />
<td class='alt2' align='center'>Auction Complete</td>
</if>
That should show auctions as closed immediately
Edit "vbay_view_info" template
find:
Code:
<if condition="$item[completed]==1">
This auction has been completed!
</if>
<if condition="$item[completed]!==1">
{$days}D {$hours}H {$minutes}M {$rest}S
</if>
replace with:
Code:
<if condition="$difference < 1">
This auction has been completed!
<else />
{$days}D {$hours}H {$minutes}M {$rest}S
</if>
That should show auctions as closed immediately
edit "vbay_view_desc" template
find:
Code:
<if condition="$item[completed]!==1">
replace with:
Code:
<if condition="$difference > 1">
That should show auctions as closed immediately
edit "vbay_cat_closed_row" template
find:
Code:
<tr>
<td class='alt2' align='center'><b><a href='?do?=cat&showcat={$thecats['catid']}'>{$thecats['catname']}</a></b></td>
</tr>
replace with:
Code:
<tr>
<td class='alt2' align='center'><b><a href='?do=closed&showcat={$thecats['catid']}'>{$thecats['catname']}</a></b></td>
</tr>
Fixes a typo
Although the template mods above make the close auctions a little redundant when viewing the auctions, it is still required to move the auctions to the "Closed Auctions" section and the cron job also notifies sellers buyers via PM - you could change this to only happen every 15 or 20 minutes rather than 10 if you wanted. I had to manually add it as for some reason it wasn't added automatically:
In AdminCP, check the Scheduled Task Manager to see if the "closeauctions" cron job is there, if not manually add it - "Add New Scheduled Task"
varname:closeauctions
title: CLose vBay Auctions
Minute: 0, 10, 20, 30, 40, 50
Filename: ./includes/cron/closeauctions.php
Product: vbay
I've found I also need to make a few changes to the MySQL database to get the vbay to allow fractional dollar values. To do this I changed the price, inc and reserve fields in the vbay_items table from "int" to "decimal(11,2)"
the following SQL Query should do that for you:
Code:
ALTER TABLE `vbay_items` CHANGE `price` `price` DECIMAL( 11, 2 ) NOT NULL DEFAULT '0',
CHANGE `inc` `inc` DECIMAL( 11, 2 ) NOT NULL DEFAULT '1',
CHANGE `reserve` `reserve` DECIMAL( 11, 2 ) NOT NULL DEFAULT '0'