Quotation Process + Approval Process Feature Integration
  • 08 Sep 2020
  • 1 Minute To Read
  • Print
  • Share
  • Dark
    Light

Quotation Process + Approval Process Feature Integration

  • Print
  • Share
  • Dark
    Light

Install Feature Core

Prerequisites

To start feature integration, overview and install the necessary features:

Name Version
Quotation Process 202009.0
Approval Process 202009.0

1) Set up Behavior

Register the following plugins:

Plugin Specification Prerequisites Namespace
QuoteApprovalQuoteRequestQuoteCheckPlugin Checks if the "Request For Quote" button should be shown on the cart page or not. None Spryker\Client\QuoteApproval\Plugin\QuoteRequest
QuoteRequestQuoteApprovalUnlockPreCheckPlugin Prevents quote unlock by approval process when it is in quotation process. None Spryker\Zed\QuoteRequest\Communication\Plugin\QuoteApproval

src/Pyz/Client/QuoteRequest/QuoteRequestDependencyProvider.php

<?php
 
namespace Pyz\Client\QuoteRequest;
 
use Spryker\Client\QuoteApproval\Plugin\QuoteRequest\QuoteApprovalQuoteRequestQuoteCheckPlugin;
use Spryker\Client\QuoteRequest\QuoteRequestDependencyProvider as SprykerQuoteRequestDependencyProvider;
 
class QuoteRequestDependencyProvider extends SprykerQuoteRequestDependencyProvider
{
    /**
     * @return \Spryker\Client\QuoteRequestExtension\Dependency\Plugin\QuoteRequestQuoteCheckPluginInterface[]
     */
    protected function getQuoteRequestQuoteCheckPlugins(): array
    {
        return [
            new QuoteApprovalQuoteRequestQuoteCheckPlugin(),
        ];
    }
}

src/Pyz/Client/QuoteApproval/QuoteApprovalDependencyProvider.php

<?php
 
namespace Pyz\Zed\QuoteApproval;
 
use Spryker\Zed\QuoteApproval\QuoteApprovalDependencyProvider as SprykerQuoteApprovalDependencyProvider;
use Spryker\Zed\QuoteRequest\Communication\Plugin\QuoteApproval\QuoteRequestQuoteApprovalUnlockPreCheckPlugin;
 
class QuoteApprovalDependencyProvider extends SprykerQuoteApprovalDependencyProvider
{
    /**
     * @return \Spryker\Zed\QuoteApprovalExtension\Dependency\Plugin\QuoteApprovalUnlockPreCheckPluginInterface[]
     */
    protected function getQuoteApprovalUnlockPreCheckPlugins(): array
    {
        return [
            new QuoteRequestQuoteApprovalUnlockPreCheckPlugin(),
        ];
    }
}
Verification
Make sure that the Request For Quote button is not available on the cart page when the quote is in status "Waiting".
Verification
Make sure that when you have locked cart after quotation process and request approval for this cart, the cart should stay locked even if approver declined it.
Was This Article Helpful?