Return the purchase details view.

@return \Illuminate\View\View
171569
public function getDetails($purchaseId) {
        $purchase = Purchase::findOrFail($purchaseId);

        if (!in_array(Auth::user()->userId, [
            $purchase->item->seller->userId,
            $purchase->buyer->userId
        ])) {
            return redirect('/inventory')->withErrors([
                "You are not the buyer or seller of this item."
            ]);
        }

        return view('mustard::purchase.details', [
            'purchase' => $purchase,
        ]);
    }
267473
public function view()
    {
        if ($this->view !== null && ($this->view instanceof View)) {
            return $this->view;
        }
        $this->view = new View();
        return $this->view;
    }
475004
public function get()
	{
		$view = $this->getView();

		try
		{
			$total = 0;
			$params = $this->storeSearchParams( $view->param( 'cp', [] ), 'catalogproduct' );
			$listItems = $this->getListItems( $view->item, $params, $total );

			$view->productItems = $this->getProductItems( $listItems );
			$view->productData = $this->toArray( $listItems );
			$view->productListTypes = $this->getListTypes();
			$view->productTotal = $total;
			$view->productBody = '';

			foreach( $this->getSubClients() as $client ) {
				$view->productBody .= $client->get();
			}
		}
		catch( \Aimeos\MShop\Exception $e )
		{
			$error = array( 'catalog-product' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) );
			$view->errors = $view->get( 'errors', [] ) + $error;
			$this->logException( $e );
		}
		catch( \Exception $e )
		{
			$error = array( 'catalog-product' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
			$view->errors = $view->get( 'errors', [] ) + $error;
			$this->logException( $e );
		}

		return $this->render( $view );
	}
342654
public function indexAction()
    {
        $visibilityService = $this->getVisibilityService();
        $options = $visibilityService->getOptions();

        $widgetId = $options->getWidgetId();
        if (! $widgetId) {
            $this->flashMessenger()->addMessage(
                $this->scTranslate('The widget identifier was not specified.')
            );
            return $this->redirect()
                ->toRoute('sc-admin/layout')
                ->setStatusCode(303);
        }

        $widget = $this->deriveWidget($widgetId);
        if (empty($widget)) {
            return $this->getResponse();
        }
        if ($this->getRequest()->isPost()) {
            $event = $this->request->getPost('suboperation');
            if (! empty($event)) {
                $events = $this->getEventManager();
                $params = $this->getRequest()->getPost();
                $params['widget_id'] = $widget->getId();
                $result = $events->trigger($event, $this, $params);
                if ($result->last() instanceof Response) {
                    return $result->last();
                }
            }
        }

        $view = new ViewModel;
        $view->options = $options;
        $view->widget = $widget;

        $moduleOptions = $this->getModuleOptions();
        $view->config = $moduleOptions->getWidgetByName($widget->getName());

        $view->list = $visibilityService->getContentList();
        $visibilityService->saveOptions();

        return $view;
    }
265974
public function get()
	{
		$view = $this->getView();

		try
		{
			$total = 0;
			$params = $this->storeSearchParams( $view->param( 'oi', [] ), 'orderinvoice' );
			$orderItems = $this->getOrderItems( $view->item, $params, $total );

			$view->invoiceData = $this->toArray( $orderItems );
			$view->invoiceTotal = $total;
			$view->invoiceBody = '';

			foreach( $this->getSubClients() as $client ) {
				$view->invoiceBody .= $client->search();
			}
		}
		catch( \Aimeos\MShop\Exception $e )
		{
			$error = array( 'order-item-invoice' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) );
			$view->errors = $view->get( 'errors', [] ) + $error;
			$this->logException( $e );
		}
		catch( \Exception $e )
		{
			$error = array( 'order-item-invoice' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
			$view->errors = $view->get( 'errors', [] ) + $error;
			$this->logException( $e );
		}

		return $this->render( $view );
	}
1142626
protected function getView()
    {
        $ret = "";
        if (null !== $this->getRequest()) {
            $ret = $this->getRequest()->attributes->get("_view", "");
        }

        return $ret;
    }
144044
protected function _getQuery()
    {
        // looking for table/view
        $sCountryTable = $this->_getViewName('oxcountry');
        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $sCountryId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('oxid');
        $sSynchCountryId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('synchoxid');

        // category selected or not ?
        if (!$sCountryId) {
            // which fields to load ?
            $sQAdd = " from $sCountryTable where $sCountryTable.oxactive = '1' ";
        } else {
            $sQAdd = " from oxobject2payment left join $sCountryTable on $sCountryTable.oxid=oxobject2payment.oxobjectid ";
            $sQAdd .= "where $sCountryTable.oxactive = '1' and oxobject2payment.oxpaymentid = " . $oDb->quote($sCountryId) . " and oxobject2payment.oxtype = 'oxcountry' ";
        }

        if ($sSynchCountryId && $sSynchCountryId != $sCountryId) {
            $sQAdd .= "and $sCountryTable.oxid not in ( ";
            $sQAdd .= "select $sCountryTable.oxid from oxobject2payment left join $sCountryTable on $sCountryTable.oxid=oxobject2payment.oxobjectid ";
            $sQAdd .= "where oxobject2payment.oxpaymentid = " . $oDb->quote($sSynchCountryId) . " and oxobject2payment.oxtype = 'oxcountry' ) ";
        }

        return $sQAdd;
    }
646306
private function getBaseView()
    {
        $this->attempted($this->view);

        return view()->exists($this->view) ? $this->view : null;
    }
873955
public function actionView()
    {
        $model = $this->model;
        $id = $model->name;
        $model = $this->findModel($id);
        $authManager = Yii::$app->getAuthManager();
        $avaliable = $assigned = [
            'Permission' => [],
            'Routes' => [],
        ];
        $children = array_keys($authManager->getChildren($id));
        $children[] = $id;
        foreach ($authManager->getPermissions() as $name => $role) {
            if (in_array($name, $children)) {
                continue;
            }
            if (isset($name[0])) {
                $avaliable[$name[0] === '/' ? 'Routes' : 'Permission'][$name] = $name . ' — ' . $role->description;
            }
        }
        foreach ($authManager->getChildren($id) as $name => $child) {
            $assigned[$name[0] === '/' ? 'Routes' : 'Permission'][$name] = $name . ' — ' . $child->description;;
        }
        $avaliable = array_filter($avaliable);
        $assigned = array_filter($assigned);
        return $this->render('view', ['model' => $model, 'avaliable' => $avaliable, 'assigned' => $assigned]);
    }
1026708
public function deliverView()
    {
        $this->checkAuth();
        $this->checkCartNotEmpty();

        // check if the cart contains only virtual products
        $cart = $this->getSession()->getSessionCart($this->getDispatcher());

        $deliveryAddress = $this->getCustomerAddress();

        if ($cart->isVirtual()) {
            if (null !== $deliveryAddress) {
                $deliveryModule = ModuleQuery::create()->retrieveVirtualProductDelivery($this->container);

                if (false === $deliveryModule) {
                    Tlog::getInstance()->error(
                        $this->getTranslator()->trans(
                            "To enable the virtual product feature, the VirtualProductDelivery module should be activated",
                            [],
                            Front::MESSAGE_DOMAIN
                        )
                    );
                } elseif (count($deliveryModule) == 1) {
                    return $this->registerVirtualProductDelivery($deliveryModule[0], $deliveryAddress);
                }
            }
        }

        return $this->render(
            'order-delivery',
            [
                'delivery_address_id' => (null !== $deliveryAddress) ? $deliveryAddress->getId() : null
            ]
        );
    }
61534
public function renderToolProspectsHeaderRefreshAction()
    {
        $melisKey = $this->params()->fromRoute('melisKey', '');
        
        $view = new ViewModel();
        $view->melisKey = $melisKey;
        
        return $view;
    }
186393
public function getUnsold()
    {
        $items = Auth::user()->items()
            ->with('purchases')
            ->where(function ($query) {
                $query->has('purchases', 0)
                    ->where('end_date', '<', time())
                    ->where('auction', false)
                    ->orWhere(function ($query) {
                        $query->where('auction', true)
                            ->where('end_date', '<', time())
                            ->where('winning_bid_id', 0);
                    });
            });

        $table = new InventoryUnsold($items);

        return view('mustard::inventory.unsold', [
            'table' => $table,
            'items' => $table->paginate(),
        ]);
    }
423535
public function getView()
    {
        if (view()->exists($this->view)) {
            return $this->view;
        }

        if (view()->exists('admin.'.$this->urlPrefix().'.index')) {
            return 'admin.'.$this->urlPrefix().'.index';
        }

        if (view()->exists('admin.'.$this->urlPrefix())) {
            return 'admin.'.$this->urlPrefix();
        }

        if (view()->exists('flare::'.$this->view)) {
            return 'flare::'.$this->view;
        }

        return parent::getView();
    }
792649
public function getView()
    {
        if (view()->exists(static::$view)) {
            return static::$view;
        }

        if (view()->exists('admin.widgets.'.static::safeTitle().'.widget')) {
            return 'admin.widgets.'.static::safeTitle().'.widget';
        }

        if (view()->exists('admin.widgets.'.static::safeTitle())) {
            return 'admin.widgets.'.static::safeTitle();
        }

        if (view()->exists('admin.'.static::safeTitle())) {
            return 'admin.'.static::safeTitle();
        }

        if (view()->exists('flare::'.self::$view)) {
            return 'flare::'.self::$view;
        }
    }
1001379
public function getProduct()
    {
        if (is_null($this->_oArticle)) {
            if ($this->getViewParameter('_object')) {
                $oArticle = $this->getViewParameter('_object');
            } else {
                $sAddDynParams = \OxidEsales\Eshop\Core\Registry::getConfig()->getTopActiveView()->getAddUrlParams();

                $sAddDynParams = $this->updateDynamicParameters($sAddDynParams);

                $oArticle = $this->_getArticleById($this->getViewParameter('anid'));
                $this->_addDynParamsToLink($sAddDynParams, $oArticle);
            }

            $this->setProduct($oArticle);
        }

        return $this->_oArticle;
    }
621541
protected function _getView()
	{
		if ($viewInstance = Registry::get('view')) {
			return $viewInstance;
		}

		$request = Agl::getRequest();
		$module  = $request->getModule();
		$view    = $request->getView();

		$viewPath = APP_PATH
                    . Agl::APP_PHP_DIR
                    . ViewInterface::APP_PHP_DIR
                    . DS
                    . $module
                    . DS
                    . $view
                    . Agl::PHP_EXT;

        if (file_exists($viewPath)) {
            $className    = $module . ucfirst($view) . ViewInterface::APP_VIEW_SUFFIX;
            $viewInstance = Agl::getInstance($className);
        } else {
            $viewInstance = new View();
        }

        $viewInstance->setFile($module . DS . $view);

        Registry::set('view', $viewInstance);

        return $viewInstance;
	}
534158
public function index()
    {
        $propertyGrid = new PropertyDataGrid(
            $this->repository->query()->orderBy('id', 'desc')
        );

        return view('avored-framework::product.property.index')
            ->with('dataGrid', $propertyGrid->dataGrid);
    }