http://magento2.inchoo4u.net/swagger
http://magento2.inchoo4u.net/rest/V1/
/products?searchCriteria[page_size]=20
GET
<?php | |
class Inchoo_Edu_Block_Template extends Mage_Core_Block_Template | |
{ | |
/* | |
* Block caching | |
* | |
*/ | |
protected function _construct() | |
{ |
<?php | |
class Inchoo_Edu_Model_Resource_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract | |
{ | |
/* | |
* Collection that always caches all its queries | |
* | |
*/ | |
protected function _construct() | |
{ | |
$this->_init('inchoo_edu/dummy'); |
<?php | |
class Inchoo_Edu_Model_Example | |
{ | |
/* | |
* Custom cache example | |
* | |
* @see: Directory, Adminhtml_Block, etc. | |
* | |
*/ |
{ | |
"require": { | |
"magento/magento-composer-installer": "*", | |
"magento/product-community-edition": "0.1.0-alpha97" | |
}, | |
"repositories": [ | |
{ | |
"type": "composer", | |
"url": "http://packages.magento.com/" | |
} |
/** | |
* Mage_Checkout_Block_Onepage_Billing::getAddress() should be something like this | |
* | |
* Similar for Mage_Checkout_Block_Onepage_Shipping | |
*/ | |
public function getAddress() | |
{ | |
if (is_null($this->_address)) { | |
$this->_address = $this->getQuote()->getBillingAddress(); //always take address from quote |
php -d xdebug.remote_autostart=1 bin/magento | |
xdebug.ini | |
xdebug.remote_enable = 1 | |
xdebug.remote_autostart = 0 | |
xdebug.max_nesting_level = 500 | |
#default formating | |
xdebug.overload_var_dump = 0 |
\Magento\Framework\App\ObjectManager::getInstance() | |
->get('\Psr\Log\LoggerInterface') | |
->debug(print_r($a, true)); | |
//var/log/debug.log |
<?xml version="1.0"?> | |
<!-- | |
/** | |
* Log Db Queries | |
* Copy to /app/etc/local.di.xml (di.xml glob follows {*di.xml, */*di.xml} pattern) | |
*/ | |
--> | |
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> | |
<preference for="Magento\Framework\DB\LoggerInterface" type="Magento\Framework\DB\Logger\File"/> | |
<type name="Magento\Framework\DB\Logger\File"> |
<VirtualHost *:80> # Or whatever VHost you're using | |
# Your other rules | |
RewriteEngine on | |
RewriteCond %{REQUEST_METHOD} OPTIONS | |
RewriteRule ^(.*)$ "index.html" [R=200,E=API:1,PT] | |
# This rewrite rule forces any OPTIONS request to return as a valid response. | |
# It sets the API environment variable for use below. | |
# | |
# You can try to put a placeholder file here for the response (index.html) | |
# Otherwise it'll look like an error page, but it'll return with a 200 response code. |
http://magento2.inchoo4u.net/swagger
http://magento2.inchoo4u.net/rest/V1/
/products?searchCriteria[page_size]=20
GET