mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
#5216 hali.ocify requests
This commit is contained in:
parent
b485e08175
commit
a4aee59a7f
@ -67,7 +67,10 @@ class OptionConfigurationController extends PublicController
|
||||
public function confAddCart()
|
||||
{
|
||||
if ($conf = $this->optionConfigurationRepository->find($this->request->configuration)) {
|
||||
if ($conf->parent_adv->getStatus() == "approved") {
|
||||
|
||||
$parent_adv = $conf->parent_adv;
|
||||
|
||||
if ($parent_adv->getStatus() == "approved") {
|
||||
$conf->name = $conf->getName();
|
||||
|
||||
if ($conf->stock < $this->request->quantity) {
|
||||
@ -75,7 +78,8 @@ class OptionConfigurationController extends PublicController
|
||||
} else {
|
||||
$cart = $this->dispatch(new GetCart());
|
||||
$cart->add($conf, $this->request->quantity);
|
||||
return $this->redirect->to(route('visiosoft.module.carts::cart'));
|
||||
$this->messages->success(trans('visiosoft.module.carts::message.success'));
|
||||
return $this->redirect->to($parent_adv->detail_url);
|
||||
}
|
||||
}
|
||||
$this->messages->info(trans('visiosoft.module.advs::message.error_added_cart'));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user