added markdown and Update Date doping types

This commit is contained in:
vedatakd 2020-10-21 10:13:50 +03:00
parent 3bc60dec09
commit 3c0c978706
3 changed files with 36 additions and 0 deletions

View File

@ -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'
];
}

View File

@ -313,4 +313,7 @@ return [
'site' => 'Site',
'subscription' => 'Subscription',
'created' => 'Created',
'old_price' => [
'name' => 'Old Price'
],
];

View File

@ -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);