This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Some\Module\Plugin; | |
use Magento\Catalog\Api\ProductRepositoryInterface; | |
use Magento\Framework\View\Result\Page; | |
class ProductLayout | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Using an expression as a join: new Zend_Db_Expr | |
$query = 'SELECT author_id, SUM(amount) AS author_debit_amount FROM author_debits GROUP BY author_debits.author_id'; | |
$collection->getSelect()->joinLeft( | |
new Zend_Db_Expr('('.$query.')'), | |
'main_table.author_id = t.author_id', | |
array('author_debit_amount') | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We should take a look `\Magento\Framework\App\RouterList` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#vendor/magento/module-vault/Model/PaymentTokenManagement.php::getListByCustomerId() | |
/** | |
* Lists payment tokens that match specified search criteria. | |
* | |
* @param int $customerId Customer ID. | |
* @return \Magento\Vault\Api\Data\PaymentTokenSearchResultsInterface[] Payment tokens search result interface. | |
*/ | |
public function getListByCustomerId($customerId) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Date: March 28 2017 | |
##On Mac: | |
Simple use brew: | |
Firstly install Brew on your MAC | |
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
$ brew update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Compilation enforces coupling to parent class Context contents: https://github.com/magento/magento2/issues/6114 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Magento\Framework\Translate::loadData() | |
#Load Cache first | |
$this->_loadModuleTranslation(); | |
$this->_loadThemeTranslation(); | |
$this->_loadPackTranslation(); | |
$this->_loadDbTranslation(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Magento 2 - change the form fields sort order in checkout | |
#app/code/Vendor/Checkout/view/layout/checkout_index_index.xml | |
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> | |
<body> | |
<referenceBlock name="checkout.root"> | |
<arguments> | |
<argument name="jsLayout" xsi:type="array"> | |
<item name="components" xsi:type="array"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h2>APACHE Server<h2> | |
To start httpd: | |
`sudo /usr/sbin/apachectl start` | |
To stop httpd: | |
`sudo /usr/sbin/apachectl stop` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PHP topic: | |
- http://nikic.github.io/ | |
Magento topic: | |
- https://community.magento.com/t5/Magento-DevBlog/Magento-2-2-Deployment-Improvements/ba-p/73119 | |
- https://12factor.net/ | |
- https://community.magento.com/t5/Magento-DevBlog/Introducing-Magento-PWA-Studio/ba-p/74636 |