Skip to content

Instantly share code, notes, and snippets.

View MageryThemes's full-sized avatar

MageryThemes MageryThemes

View GitHub Profile
@MageryThemes
MageryThemes / magento-international-telephone-input.md
Last active May 1, 2020 20:40
Magento 2 International Telephone Input
@MageryThemes
MageryThemes / catalog_product_view.xml
Created February 12, 2018 13:28
Remove reviews tab in Magento 2 - conditional block removal by alias https://magery-themes.com/disable-reviews-magento2.html
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="product.info.details">
<action method="unsetChild" ifconfig="catalog/review/is_disabled">
<!-- remove "reviews.tab" block by alias -->
<argument name="block" xsi:type="string">reviews</argument>
</action>
</referenceBlock>
</body>

In order to see generated email content you can check this method: Zend_Mail_Transport_Abstract::send() Find this line:

$this->body = $message->generateMessage($this->EOL);

body property contains quoted printable encoded HTML, you can decode it:

$plainEmailHtml = quoted_printable_decode($this->body);

@MageryThemes
MageryThemes / customer-details-soap-m2.php
Created December 11, 2017 08:11
How to get customer details in Magento 2 using SOAP API
<?php
$baseUrl = '<YOUR_DOMAIN>/';
$request = new SoapClient(
"{$baseUrl}soap/?wsdl&services=integrationAdminTokenServiceV1",
['soap_version' => SOAP_1_2]
);
// Get authorization token
$token = $request->integrationAdminTokenServiceV1CreateAdminAccessToken([
'username' => '<YOUR_ADMIN_USER>',
<template id="customer_create_account_email_confirmation_template" label="New Account Confirmation Key" file="account_new_confirmation.html" type="html" module="Magento_Customer" area="frontend"/>
@MageryThemes
MageryThemes / confirm_m2_customer.sql
Created October 25, 2017 16:43
How to confirm customer account in Magento 2 via database
UPDATE customer_entity SET confirmation = NULL where email='some.email@example.com';
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="customer-account-navigation-billing-agreements-link" remove="true"/>
</body>
</page>