/var/www/vhosts/ihelp.ro/httpdocs/src/Controller
NameSizeModeActions
Admin/-0755rm
Api/-0755rm
Async/-0755rm
Component/-0755rm
Dashboard/-0755rm
AjaxController.php9040644editdlrm
AppController.php60900644editdlrm
CartsController.bk.php302280644editdlrm
CartsController.php182420644editdlrm
CategoriesController.php48970644editdlrm
CausesController.php110500644editdlrm
DonationsController.php29690644editdlrm
ErrorController.php17710644editdlrm
OrdersController.php203170644editdlrm
PagesController.php23170644editdlrm
PaymentsController.php90470644editdlrm
ProductFavoritesController.php65950644editdlrm
ProductsController.php71350644editdlrm
ProposedCausesController.php11920644editdlrm
SearchController.php30430644editdlrm
ShowcaseController.php6690644editdlrm
UserAddressesController.php14820644editdlrm
UsersController.php228460644editdlrm
Edit: /var/www/vhosts/ihelp.ro/httpdocs/src/Controller/UserAddressesController.php (1482B)
Authentication->addUnauthenticatedActions(['removeAddress']); } /** * removeAddress */ public function removeAddress($cartUuid = null) { if ($cartUuid) { //$this->request->allowMethod(['post', 'delete']); $this->loadModel('Carts'); $cart = $this->Carts->find() ->contain(['UserAddresses']) ->where(['Carts.uuid' => $cartUuid]) ->first(); if ($cart) { if ($this->UserAddresses->delete($cart->user_address)) { $this->Carts->id = $cart->id; $this->Carts->saveField('user_address_id', NULL); $this->Flash->success(__('The user address has been deleted.')); } else { $this->Flash->error(__('The user address could not be deleted. Please, try again.')); } } } return $this->redirect(['prefix' => false, 'controller' => 'Orders', 'action' => 'checkout']); } }