mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 14:56:13 -06:00
Merge pull request #731 from openclassify/vedatakd
added markdown and Update Date doping types
This commit is contained in:
commit
1dd36375c3
@ -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',
|
'site' => 'Site',
|
||||||
'subscription' => 'Subscription',
|
'subscription' => 'Subscription',
|
||||||
'created' => 'Created',
|
'created' => 'Created',
|
||||||
|
'old_price' => [
|
||||||
|
'name' => 'Old Price'
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -674,6 +674,12 @@ class AdvsController extends PublicController
|
|||||||
/* Update Adv */
|
/* Update Adv */
|
||||||
$adv = AdvsAdvsEntryModel::find($request->update_id);
|
$adv = AdvsAdvsEntryModel::find($request->update_id);
|
||||||
|
|
||||||
|
|
||||||
|
//Set Old Price
|
||||||
|
$old_price = ($adv->slug == "") ? $request->price : $adv->price;
|
||||||
|
$adv->old_price = $old_price;
|
||||||
|
|
||||||
|
|
||||||
$allowPendingAdCreation = false;
|
$allowPendingAdCreation = false;
|
||||||
if ($advModel->is_enabled('packages') and $adv->slug == "") {
|
if ($advModel->is_enabled('packages') and $adv->slug == "") {
|
||||||
$cat = app('Visiosoft\PackagesModule\Http\Controller\PackageFEController')->AdLimitForNewAd($request);
|
$cat = app('Visiosoft\PackagesModule\Http\Controller\PackageFEController')->AdLimitForNewAd($request);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user