PHP code example of memegento / module-mage

1. Go to this page and download the library: Download memegento/module-mage 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/ */

    

memegento / module-mage example snippets



$productModelLegacyWay = Mage::getModel('catalog/product');

$productModelNewWay = Mage::getModel(\Magento\Catalog\Model\Product::class);

$productUrl = Mage::getUrl('catalog/product/view', ['product_id' => $productId]);

Mage::log('Some message', ['context_field' => 'value'], Zend_Log::INFO);
Mage::throwException('Exception message');