mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
added markdown and Update Date doping types
This commit is contained in:
parent
3bc60dec09
commit
3c0c978706
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
use Anomaly\Streams\Platform\Database\Migration\Migration;
|
||||
|
||||
class VisiosoftModuleAdvsCreateOldPriceField extends Migration
|
||||
{
|
||||
protected $delete = false;
|
||||
|
||||
protected $stream = [
|
||||
'slug' => 'advs',
|
||||
];
|
||||
|
||||
protected $fields = [
|
||||
'old_price' => [
|
||||
'type' => 'visiosoft.field_type.decimal',
|
||||
'config' => [
|
||||
'decimal' => 2,
|
||||
'separator' => '.',
|
||||
'point' => ','
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
protected $assignments = [
|
||||
'old_price'
|
||||
];
|
||||
}
|
||||
@ -313,4 +313,7 @@ return [
|
||||
'site' => 'Site',
|
||||
'subscription' => 'Subscription',
|
||||
'created' => 'Created',
|
||||
'old_price' => [
|
||||
'name' => 'Old Price'
|
||||
],
|
||||
];
|
||||
|
||||
@ -674,6 +674,12 @@ class AdvsController extends PublicController
|
||||
/* Update Adv */
|
||||
$adv = AdvsAdvsEntryModel::find($request->update_id);
|
||||
|
||||
|
||||
//Set Old Price
|
||||
$old_price = ($adv->slug == "") ? $request->price : $adv->price;
|
||||
$adv->old_price = $old_price;
|
||||
|
||||
|
||||
$allowPendingAdCreation = false;
|
||||
if ($advModel->is_enabled('packages') and $adv->slug == "") {
|
||||
$cat = app('Visiosoft\PackagesModule\Http\Controller\PackageFEController')->AdLimitForNewAd($request);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user