Skip to content

Instantly share code, notes, and snippets.

View unicoder88's full-sized avatar

Roman unicoder88

View GitHub Profile

Using containerized Mailcatcher with default php mail()

docker network create mailcatcher-net
docker run -d -p 1080:1080 -p 1025:1025 --name mailcatcher --rm --network mailcatcher-net schickling/mailcatcher
sudo usermod -aG docker www-data
# php.ini
sendmail_path = /usr/bin/docker run --rm --network mailcatcher-net -i schickling/mailcatcher catchmail --smtp-ip mailcatcher --smtp-port 1025 -f some@from.address

# test in bash
(function() {
/**
* Video element
* @type {HTMLElement}
*/
var video = document.getElementById("my-video");
/**
* Check if video can play, and play it
*/
function captureEvent (event) {
select s.view_id,
s.version_id,
(SELECT `AUTO_INCREMENT` FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = database() AND TABLE_NAME = concat(s.view_id, '_cl')) as increment_id,
(select count(*) from catalog_product_price_cl cl where cl.version_id > s.version_id) as pending_updates
from mview_state s where s.view_id = 'catalog_product_price'
UNION
select s.view_id, s.version_id, (SELECT `AUTO_INCREMENT` FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = database() AND TABLE_NAME = concat(s.view_id, '_cl')) as increment_id, (select count(*) from catalog_product_flat_cl cl where cl.version_id > s.version_id) as pending_updates from mview_state s where s.view_id = 'catalog_product_flat'
UNION
select s.view_id, s.version_id, (SELECT `AUTO_INCREMENT` FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = database() AND TABLE_NAME = concat(s.view_id, '_cl')) as increment_id, (select count(*) from cataloginventory_stock_cl cl where cl.version_id > s.version_id) as pending_updates from mview_state s where s.

DEVELOPER PLUS

87 Multiple Choice items (85 scored, 2 unscored)
120 minutes to complete the exam
Based on Magento Community Edition 1.9 and Magento Enterprise Edition 1.14

Passing score

Magento Certified Developer Plus exam: For sections 11 & 12 combined a score of 7 or higher AND meet the overall passing score of 48 or higher

 5%  1-Basics (config, events, cron, translations, theme, locating template/layout file)

6% 2-Request Flow

<?php
/**
* Store detection taking into account scope inheritance
*/
public function getStoreByList($mcListId, $includeDefault = FALSE)
{
static $storeLists;
static $defaultCode;
if (null === $storeLists) {
$defaultCode = Mage::app()->getDefaultStoreView()->getCode();
<?php
/**
* Runs export via Import/Export module
*/
require __DIR__ . '/app/Mage.php';
// disable flat products collection
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
Mage::app()->getLayout()->setArea('adminhtml');
<?php
/**
* @author Convert Team
* @copyright Copyright (c) 2016 Convert (http://www.convert.no/)
*/
/**
* Runs Dataflow profile, works for export and import
*
* Usage: php run_dataflow_profile.php [profile_id] [import_filename]