Skip to content

Instantly share code, notes, and snippets.

View jwohlfeil's full-sized avatar

Jan Wohlfeil jwohlfeil

View GitHub Profile
@fooman
fooman / table.md
Last active January 15, 2021 16:47
Magento 2 / PHP versions Matrix
@froemken
froemken / docker-compose.override.yaml
Last active August 8, 2022 15:00
How to exclude typo3temp directory from ddev to get more performance
# Move typo3temp into RAM-Disk. Do not sync vendor and TYPO3-Directory.
# For MAC: 'nocopy' will only work correct, if nfs_mount_enabled is true
version: '3.6'
services:
web:
volumes:
- type: tmpfs
tmpfs:
size: 268435456
# TYPO3 8
$emailView = $this->objectManager->get('TYPO3\\CMS\\Fluid\\View\\StandaloneView');
$extbaseFrameworkConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
$emailView->setTemplateRootPaths($extbaseFrameworkConfiguration['view']['templateRootPaths']);
$emailView->setLayoutRootPaths($extbaseFrameworkConfiguration['view']['layoutRootPaths']);
$emailView->setPartialRootPaths($extbaseFrameworkConfiguration['view']['layoutRootPaths']);
$emailView->setTemplate('Email/MailShop.html');
$emailBody = $emailView->render();
$mail = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Mail\\MailMessage');
$mail->setSubject('Some subject');
@erikhansen
erikhansen / 1_product_queries.sql
Last active April 2, 2024 01:48
Magento 2 - Remove duplicate store view-specific product and category data
/*
* IMPORTANT: The queries below are written for Magento Enterprise. If you're going to run them on Magento Community, you need
* to replace all instances of ".row_id" with ".entity_id". See this for context: http://magento.stackexchange.com/questions/139740/magento-2-schema-changes-for-ee-catalog-staging
*
* When importing products in Magento 2, if you specify store view codes in the store_view_code column, product data will be set at
* both the global scope as well as the specific store view scope. This is not ideal because now you have duplicate
* data at two different scopes that shouldn't actually be duplicated. The scripts below clean up this data by finding
* data set at specific store view scopes and if it's an exact match to the data set at the global store view, then it
* deletes the data set at the specific store view scope.
*