Skip to content

Instantly share code, notes, and snippets.

@alepane21
alepane21 / SendMailWithoutTemplate.php
Last active October 6, 2023 09:59
Example to send email without template on Magento 2
<?php
namespace Hevelop\Example\Console\Command;
use Symfony\Component\Console\Command\Command;
use Magento\Framework\Mail\TransportInterfaceFactory;
/**
* Class SendMailWithoutTemplate
*/
class SendMailWithoutTemplate extends Command
{
@alepane21
alepane21 / magento2_customer.patch
Last active January 10, 2018 16:05
magento 2 better ux with guest checkout disabled
diff --git a/Configuration/settings.csv b/Configuration/settings.csv
index 9417446..a404630 100644
--- a/Configuration/settings.csv
+++ b/Configuration/settings.csv
@@ -189,6 +189,7 @@ Magento\CoreConfigData,default,0,customer/address/dob_show,,opt,,,
Magento\CoreConfigData,default,0,customer/address/gender_show,,opt,,,
Magento\CoreConfigData,default,0,customer/password/minimum_password_length,,5,,,
Magento\CoreConfigData,default,0,customer/password/required_character_classes_number,,1,,,
+Magento\CoreConfigData,default,0,customer/startup/redirect_dashboard,,0,,,
,,,,,,,,
<?php
$data='<data>
<seg id="A1"/>
<seg id="A2"/>
<seg id="A3"/>
<seg id="A4"/>
<seg id="A5"/>
</data>';
$doc=new SimpleXMLElement($data);