mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
Merge pull request #1266 from openclassify/dia
#5088 Sistem durumu silinmemeli
This commit is contained in:
commit
667cfbd645
@ -36,4 +36,6 @@ return [
|
||||
'currency_converter_not_available' => 'The currency converter is not available.',
|
||||
'option_saved' => 'Option Saved',
|
||||
'do_you_want_to_save_the_option' => 'Do you want to save the option?',
|
||||
'you_can_not_delete_a_system_status' => 'You can not delete a system status!',
|
||||
'product_added_to_cart' => 'Product added to cart!',
|
||||
];
|
||||
|
||||
@ -1163,6 +1163,7 @@ class AdvsController extends PublicController
|
||||
if ($adv and $adv->getStatus() == "approved") {
|
||||
$cart = $thisModel->addCart($adv, $quantity, $name);
|
||||
$response['status'] = "success";
|
||||
$response['msg'] = trans('visiosoft.module.advs::message.product_added_to_cart');
|
||||
$count = $cart->getItems()->count;
|
||||
$response['count'] = $count;
|
||||
$response['item'] = [
|
||||
|
||||
@ -1,8 +1,16 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Status;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\Contract\EntryInterface;
|
||||
use Anomaly\Streams\Platform\Entry\EntryObserver;
|
||||
|
||||
class StatusObserver extends EntryObserver
|
||||
{
|
||||
public function deleting(EntryInterface $entry)
|
||||
{
|
||||
if ($entry->is_system) {
|
||||
abort(403, trans('visiosoft.module.advs::message.you_can_not_delete_a_system_status'));
|
||||
}
|
||||
|
||||
parent::deleting($entry);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user