如何从template.phtml文件中获取参数值到magento 2中的plugin.php文件?

  1. In magento 2.2.7 when AddToCart button is clicked i need to validate Delivery Postcode field.Only if the customer enter the correct post code the product should added to the cart.

    The Delivery Postcode is a separate extension. Inside the extension i wrote before plugin (using beforeAddProduct class)and try to get the postcode parameter but i am unable to do so, but i can able to get the product related parameter.For ex. product quantity i can able get. Can you please guide me how to get the postcode value inside the plugin?

    Extension Folder structure :https://www.screencast.com/t/AP1nr6cPkWvn

    My template code :https://www.screencast.com/t/sEFZ0rUM

    My plugin code

    /**
     * @var \Magento\Framework\App\Request\Http
     */
    protected $request;
    
    /**
     * @var \MagePrashant\CheckDelivery\Helper\Data
     */
    protected $helper;
    
    /**
     * @var \Magento\Framework\Message\ManagerInterface
     */
    protected $message;
    
    /**
     * Plugin constructor.
     *
     * @param \Magento\Checkout\Model\Session $checkoutSession
     * @param \Magento\Framework\App\Request\Http $request
     * @param \MagePrashant\CheckDelivery\Helper\Data $helper
     * @param \Magento\Framework\Message\ManagerInterface $message
     */
    public function __construct(
        \Magento\Checkout\Model\Session $checkoutSession,
        \Magento\Framework\App\Request\Http $request,
        \MagePrashant\CheckDelivery\Helper\Data $helper,
        \Magento\Framework\Message\ManagerInterface $message 
    
    ) {
        $this->quote = $checkoutSession->getQuote();
        $this->request = $request;
        $this->helper = $helper;
        $this->message = $message;       
    }
    
    /**
     * beforeAddProduct
     *
     * @param      $subject
     * @param      $productInfo
     * @param null $requestInfo
     *
     * @return array
     * @throws LocalizedException
     */
    public function beforeAddProduct($subject, $productInfo, $requestInfo = null)
    {       
       $postcode = $this->request->getParam('postcode');
       print_r($postcode); 
       //Null
       print_r($this->request->getParams()); 
       //Array ( [uenc] => aHR0cDovLzEyNy4wLjAuMS9QZXRzeS9wZWRpZ3JlZS1wdXBweS1taWxrLWFuZC12ZWdldGFibGUuaHRtbA,, [product] => 59 [selected_configurable_option] => [related_product] => [item] => 59 [form_key] => BIYNJmVlffX0A95H [super_attribute] => Array ( [140] => 10 ) [qty] => 1 )
    
    } 
    

    }