First, Lets find out what version of PHP we're running (To find out if it's the default version).
To do that, Within the terminal, Fire this command:
which php
| function getBase64Image(img) { | |
| // Create an empty canvas element | |
| var canvas = document.createElement("canvas"); | |
| canvas.width = img.width; | |
| canvas.height = img.height; | |
| // Copy the image contents to the canvas | |
| var ctx = canvas.getContext("2d"); | |
| ctx.drawImage(img, 0, 0); |
| <?php | |
| define('MAGENTO_ROOT', "/var/www/web"); | |
| $mageFilename = MAGENTO_ROOT . '/app/Mage.php'; | |
| require_once $mageFilename; | |
| umask(0); | |
| Mage::app(); |
| <?php | |
| require_once 'app/Mage.php'; | |
| Mage::app(); | |
| $quote = Mage::getModel('sales/quote') | |
| ->setStoreId(Mage::app()->getStore('default')->getId()); | |
| $product = Mage::getModel('catalog/product')->load(6); /* 6 => Some product ID */ |
| delimiter ;; | |
| drop procedure if exists build_catalog;; | |
| create procedure build_catalog(IN categories INT, IN products INT) | |
| begin | |
| SET @category_count = 1; | |
| SET @CATNAMEPREFIX = "Category "; | |
| SET @CATURLKEYPREFIX = "cat-"; | |
| SET @CATURLPATHPREFIX = "catpath-"; | |
| SET @ROOTCATEGORY = 2; | |
| SET @INCLUDEINMENU = 1; |
| <?php | |
| if(php_sapi_name()!=="cli"){ | |
| echo "Must be run from the commend line."; | |
| }; | |
| /** | |
| * Setup a magento instance so we can run this export from the command line. | |
| */ | |
| require_once('app/Mage.php'); | |
| umask(0); | |
| if (!Mage::isInstalled()) { |
Testando
| #etc/nginx/sites-available | |
| map $http_host $MAGE_RUN_CODE { | |
| mystore.com mystore_en; | |
| mystore.de mystore_de; | |
| mystore.es mystore_es; | |
| } | |
| server { | |
| listen 80; | |
| server_name mystore.com mystore.de mystore.es; |
| { | |
| "continents": [ | |
| { | |
| "id": 1, | |
| "name": "América do Sul", | |
| "countries": [1, 2, 3, 4] | |
| }, | |
| { | |
| "id": 2, | |
| "name": "América do Norte", |