PHP Class App\Http\Controllers\OrdersController

Inheritance: extends Controller
Afficher le fichier Open project: ant-vel/antVel Class Usage Examples

Protected Properties

Свойство Type Description
$order App\Repositories\OrderRepository The order repository instance.

Méthodes publiques

Méthode Description
__construct ( OrderRepository $order ) : void Create a new controller instance.
addToOrder ( string $destination, integer $productId, Illuminate\Http\Request $request ) : Response Adds the selected product to the BASE cart.
addToOrderById ( [type] $orderId, [type] $productId, Illuminate\Http\Request $request ) Allows adding products to a specific order and create new wish lists.
cancel ( $orderId, Illuminate\Http\Request $request ) : Response cancels one of the user orders.
checkOut ( ) : Response Starts the checkout process.
checkOutResume ( integer $addressId ) : Response Starts the checkout process.
closeOrder ( $order_id ) Changes the status of an order to close, so the user can now check if received.
commentOrder ( $order_id ) : App\Http\Controllers\json function to action to deliver virtual products.
createWishList ( ) : view Show the create wish list form.
deliveryVirtualProduct ( $orderId, $productId, Illuminate\Http\Request $request, $ajax = true ) : App\Http\Controllers\json function to action to deliver virtual products.
destroy ( integer $order_id, string $type ) : void Remove the specified resource from storage.
fromGuestToUser ( $ordersController ) fromGuestToUser This method is able to transfer all the guest shopping cart user to an user cart order.
mailtest ( )
modalDetailsProductCart ( ) : view function, to lift the Modal to display the details product in the card (Only this seller).
moveFromOrder ( integer $origin, integer $destination, integer $productId ) : Redirects Removes the selected item from the cart, and stores it back in the Later Cart.
placeOrder ( $type ) : Response Starts the checkout process.
rateOrder ( $order_id ) function to action to rate both the order and its content.
rateProduct ( Illuminate\Http\Request $request )
rateSeller ( Illuminate\Http\Request $request )
removeFromOrder ( string $orderName, integer $productId, $idOrder = '' ) : Redirects Removes the selected item from the cart.
reports ( $type, $filter )
sendOrder ( $order_id ) Changes the status of an order to pending, so the process can start.
showCart ( ) : view Show the contents of the user Cart.
showDetailsProductCart ( $id, Illuminate\Http\Request $request ) : App\Http\Controllers\json get keys registered (Only this seller).
showOrder ( $id ) : view
showSellerOrder ( integer $id ) : Response Display the specified resource.
showWishList ( $id = '' ) : view Show the contents of a wish list.
startOrder ( $order_id ) Changes the status of an order to pending, so the process can start.
storeComment ( Illuminate\Http\Request $request ) : App\Http\Controllers\json function to action to deliver virtual products.
storeWishList ( Illuminate\Http\Request $request ) : Response Create the new wishList with a description.
updateQuantity ( $orderId, $orderDetailId, $newValue ) : Response this method is able to update the quantities values in the shopping cart.
usersOrders ( Illuminate\Http\Request $request ) : view Shows the seller wich orders he/she has pending.
wishListDirectory ( ) : view wish list directory.

Private Methods

Méthode Description
addToCartVirtualsProduct ( $product, $email, $orderId, $quantity ) : view

Method Details

__construct() public méthode

Create a new controller instance.
public __construct ( OrderRepository $order ) : void
$order App\Repositories\OrderRepository
Résultat void

addToOrder() public méthode

Adds the selected product to the BASE cart.
public addToOrder ( string $destination, integer $productId, Illuminate\Http\Request $request ) : Response
$destination string type or order ('cart','later',etc)
$productId integer The id of the product to be added
$request Illuminate\Http\Request
Résultat Response

addToOrderById() public méthode

Allows adding products to a specific order and create new wish lists.
public addToOrderById ( [type] $orderId, [type] $productId, Illuminate\Http\Request $request )
$orderId [type]
$productId [type]
$request Illuminate\Http\Request [laravel object]

cancel() public méthode

cancels one of the user orders.
public cancel ( $orderId, Illuminate\Http\Request $request ) : Response
$request Illuminate\Http\Request
Résultat Response

checkOut() public méthode

Starts the checkout process.
public checkOut ( ) : Response
Résultat Response

checkOutResume() public méthode

Starts the checkout process.
public checkOutResume ( integer $addressId ) : Response
$addressId integer The address id selected to be copied
Résultat Response

closeOrder() public méthode

Changes the status of an order to close, so the user can now check if received.
public closeOrder ( $order_id )

commentOrder() public méthode

@param $order_id int
public commentOrder ( $order_id ) : App\Http\Controllers\json
Résultat App\Http\Controllers\json message error or message success

createWishList() public méthode

Show the create wish list form.
public createWishList ( ) : view
Résultat view for orders.cart

deliveryVirtualProduct() public méthode

@param $orderId int|string id order
public deliveryVirtualProduct ( $orderId, $productId, Illuminate\Http\Request $request, $ajax = true ) : App\Http\Controllers\json
$productId int|string id product @param $request Request object to validate the type of request @return json message error or message success
$request Illuminate\Http\Request
Résultat App\Http\Controllers\json

destroy() public méthode

Remove the specified resource from storage.
public destroy ( integer $order_id, string $type ) : void
$order_id integer
$type string
Résultat void

fromGuestToUser() public static méthode

It happens when a guest user has a shopping cart and press in checkout button.
public static fromGuestToUser ( $ordersController )

mailtest() public méthode

public mailtest ( )

modalDetailsProductCart() public méthode

@return view
public modalDetailsProductCart ( ) : view
Résultat view

moveFromOrder() public méthode

Removes the selected item from the cart, and stores it back in the Later Cart.
public moveFromOrder ( integer $origin, integer $destination, integer $productId ) : Redirects
$origin integer type of the origin order ('cart','later',etc)
$destination integer type of the destination order ('cart','later',etc)
$productId integer of the product
Résultat Redirects back to de cart

placeOrder() public méthode

Starts the checkout process.
public placeOrder ( $type ) : Response
Résultat Response

rateOrder() public méthode

@param $order_id int
public rateOrder ( $order_id )

rateProduct() public méthode

public rateProduct ( Illuminate\Http\Request $request )
$request Illuminate\Http\Request

rateSeller() public méthode

public rateSeller ( Illuminate\Http\Request $request )
$request Illuminate\Http\Request

removeFromOrder() public méthode

Removes the selected item from the cart.
public removeFromOrder ( string $orderName, integer $productId, $idOrder = '' ) : Redirects
$orderName string type or order ('cart','later',etc)
$productId integer Product id to be removed from the order
Résultat Redirects back to de cart

reports() public méthode

public reports ( $type, $filter )

sendOrder() public méthode

Changes the status of an order to pending, so the process can start.
public sendOrder ( $order_id )

showCart() public méthode

Show the contents of the user Cart.
public showCart ( ) : view
Résultat view for orders.cart

showDetailsProductCart() public méthode

@param $id int|string id product
public showDetailsProductCart ( $id, Illuminate\Http\Request $request ) : App\Http\Controllers\json
$request Illuminate\Http\Request Request object to validate the type of request @return json
Résultat App\Http\Controllers\json

showOrder() public méthode

public showOrder ( $id ) : view
Résultat view

showSellerOrder() public méthode

Display the specified resource.
public showSellerOrder ( integer $id ) : Response
$id integer
Résultat Response

showWishList() public méthode

Show the contents of a wish list.
public showWishList ( $id = '' ) : view
Résultat view for orders.wish

startOrder() public méthode

Changes the status of an order to pending, so the process can start.
public startOrder ( $order_id )

storeComment() public méthode

@param $order_id int
public storeComment ( Illuminate\Http\Request $request ) : App\Http\Controllers\json
$request Illuminate\Http\Request
Résultat App\Http\Controllers\json message error or message success

storeWishList() public méthode

Create the new wishList with a description.
public storeWishList ( Illuminate\Http\Request $request ) : Response
$request Illuminate\Http\Request
Résultat Response JSON

updateQuantity() public méthode

this method is able to update the quantities values in the shopping cart.
public updateQuantity ( $orderId, $orderDetailId, $newValue ) : Response
$orderId is the shopping cart order id
$orderDetailId is the shopping cart order details
$newValue is new quantity to be used in the update
Résultat Response

usersOrders() public méthode

Shows the seller wich orders he/she has pending.
public usersOrders ( Illuminate\Http\Request $request ) : view
$request Illuminate\Http\Request
Résultat view

wishListDirectory() public méthode

wish list directory.
public wishListDirectory ( ) : view
Résultat view for orders.cart

Property Details

$order protected_oe property

The order repository instance.
protected OrderRepository,App\Repositories $order
Résultat App\Repositories\OrderRepository