PHP code example of integer-net / magento2-shippingpreselection

1. Go to this page and download the library: Download integer-net/magento2-shippingpreselection 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/ */

    

integer-net / magento2-shippingpreselection example snippets


     <?= $block->getChildHtml('shipping_country') 

     updateCartDataDependencies() {
         [...]
         this.selectedShippingCountry = this.cartData && this.cartData.shipping_addresses && this.cartData.shipping_addresses[0] && this.cartData.shipping_addresses[0].country && this.cartData.shipping_addresses[0].country.code || null
     },
     <?= $block->getChildHtml('shipping_country_js')