PHP Класс app\http\controllers\OrdersController

Наследование: extends Controller
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$order app\repositories\OrderRepository The order repository instance.

Открытые методы

Метод Описание
__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.

Приватные методы

Метод Описание
addToCartVirtualsProduct ( $product, $email, $orderId, $quantity ) : view

Описание методов

__construct() публичный метод

Create a new controller instance.
public __construct ( OrderRepository $order ) : void
$order app\repositories\OrderRepository
Результат void

addToOrder() публичный метод

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
Результат Response

addToOrderById() публичный метод

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() публичный метод

cancels one of the user orders.
public cancel ( $orderId, Illuminate\Http\Request $request ) : Response
$request Illuminate\Http\Request
Результат Response

checkOut() публичный метод

Starts the checkout process.
public checkOut ( ) : Response
Результат Response

checkOutResume() публичный метод

Starts the checkout process.
public checkOutResume ( integer $addressId ) : Response
$addressId integer The address id selected to be copied
Результат Response

closeOrder() публичный метод

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

commentOrder() публичный метод

@param $order_id int
public commentOrder ( $order_id ) : App\Http\Controllers\json
Результат App\Http\Controllers\json message error or message success

createWishList() публичный метод

Show the create wish list form.
public createWishList ( ) : view
Результат view for orders.cart

deliveryVirtualProduct() публичный метод

@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
Результат App\Http\Controllers\json

destroy() публичный метод

Remove the specified resource from storage.
public destroy ( integer $order_id, string $type ) : void
$order_id integer
$type string
Результат void

fromGuestToUser() публичный статический метод

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

mailtest() публичный метод

public mailtest ( )

modalDetailsProductCart() публичный метод

@return view
public modalDetailsProductCart ( ) : view
Результат view

moveFromOrder() публичный метод

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
Результат Redirects back to de cart

placeOrder() публичный метод

Starts the checkout process.
public placeOrder ( $type ) : Response
Результат Response

rateOrder() публичный метод

@param $order_id int
public rateOrder ( $order_id )

rateProduct() публичный метод

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

rateSeller() публичный метод

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

removeFromOrder() публичный метод

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
Результат Redirects back to de cart

reports() публичный метод

public reports ( $type, $filter )

sendOrder() публичный метод

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

showCart() публичный метод

Show the contents of the user Cart.
public showCart ( ) : view
Результат view for orders.cart

showDetailsProductCart() публичный метод

@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
Результат App\Http\Controllers\json

showOrder() публичный метод

public showOrder ( $id ) : view
Результат view

showSellerOrder() публичный метод

Display the specified resource.
public showSellerOrder ( integer $id ) : Response
$id integer
Результат Response

showWishList() публичный метод

Show the contents of a wish list.
public showWishList ( $id = '' ) : view
Результат view for orders.wish

startOrder() публичный метод

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

storeComment() публичный метод

@param $order_id int
public storeComment ( Illuminate\Http\Request $request ) : App\Http\Controllers\json
$request Illuminate\Http\Request
Результат App\Http\Controllers\json message error or message success

storeWishList() публичный метод

Create the new wishList with a description.
public storeWishList ( Illuminate\Http\Request $request ) : Response
$request Illuminate\Http\Request
Результат Response JSON

updateQuantity() публичный метод

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
Результат Response

usersOrders() публичный метод

Shows the seller wich orders he/she has pending.
public usersOrders ( Illuminate\Http\Request $request ) : view
$request Illuminate\Http\Request
Результат view

wishListDirectory() публичный метод

wish list directory.
public wishListDirectory ( ) : view
Результат view for orders.cart

Описание свойств

$order защищенное свойство

The order repository instance.
protected OrderRepository,App\Repositories $order
Результат app\repositories\OrderRepository