PHP code example of instant / instant-checkout

1. Go to this page and download the library: Download instant/instant-checkout library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

instant / instant-checkout example snippets


                    $instantCheckoutHtml = $this->getLayout()
                    ->createBlock('Instant\Checkout\Block\PdpBlock')
                    ->setProduct($product)
                    ->setTemplate('Instant_Checkout::ic-pdp-btn.phtml')
                    ->toHtml();
                    echo $instantCheckoutHtml;