Merge pull request #731 from openclassify/vedatakd

added markdown and Update Date doping types
This commit is contained in:
Ozcan Durak 2020-10-21 10:38:38 +03:00 committed by GitHub
commit 1dd36375c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);