mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
#1879 Ürün seçenekleri ve GET seçenekleri
This commit is contained in:
parent
c764f6f5ea
commit
047a21b2d4
@ -42,18 +42,20 @@ class OptionConfigurationController extends PublicController
|
|||||||
|
|
||||||
public function confAddCart()
|
public function confAddCart()
|
||||||
{
|
{
|
||||||
$conf = $this->optionConfigurationRepository->find($this->request->configuration);
|
|
||||||
|
|
||||||
$conf->name = $this->optionConfigurationRepository->getName($this->request->configuration);
|
if($conf = $this->optionConfigurationRepository->find($this->request->configuration))
|
||||||
|
{
|
||||||
|
$conf->name = $conf->getName();
|
||||||
|
|
||||||
$this->adv_model->authControl();
|
$this->adv_model->authControl();
|
||||||
|
|
||||||
if ($conf->stock < $this->request->quantity){
|
if ($conf->stock < $this->request->quantity){
|
||||||
return redirect()->back()->with('warning', [trans('visiosoft.module.carts::message.error1in2')]);
|
return redirect()->back()->with('warning', [trans('visiosoft.module.carts::message.error1in2')]);
|
||||||
}else{
|
}else{
|
||||||
$cart = $this->dispatch(new GetCart());
|
$cart = $this->dispatch(new GetCart());
|
||||||
$cart->add($conf, $this->request->quantity);
|
$cart->add($conf, $this->request->quantity);
|
||||||
return $this->redirect->to(route('visiosoft.module.carts::cart'));
|
return $this->redirect->to(route('visiosoft.module.carts::cart'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user