Skip to content

Instantly share code, notes, and snippets.

View mrtuvn's full-sized avatar
👨‍💻
Keep calm and enter your center

Tu Nguyen mrtuvn

👨‍💻
Keep calm and enter your center
View GitHub Profile
@mrtuvn
mrtuvn / template.phtml
Last active December 4, 2019 08:33
pdfpro template used in magento2
<?php
$mpdf = $block->getPdf();
?>
<?php $config = $block->getConfig(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
/app/design/frontend/Company/default/Magento_Checkout/js/view/shipping-address/list.js
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
define([
'underscore',
'ko',
@mrtuvn
mrtuvn / totals.html
Created December 11, 2019 01:46
html code custom totals block
<div class="pdf-section-totals1">
<div class="outer-pdf-totals-tbl pdf-totals-container">
<table class="custom-pdf-totals-tbl pdf-totals-tbl">
<tbody>
<tr>
<td class="pdf-totals-label">Subtotal</td>
<td class="pdf-totals-value">{{var order.subtotal}}</td>
</tr>
<tr>
<td class="pdf-totals-label">Tax</td>
@mrtuvn
mrtuvn / new-update-after2.3.2p2.txt
Last active December 13, 2019 02:15
this di added new in 2.3.2-p2 for security patch
<type name="Magento\Framework\View\Element\UiComponent\Argument\Interpreter\ConfigurableObject">
<arguments>
<argument name="classWhitelist" xsi:type="array">
<item name="0" xsi:type="string">Magento\Store\Ui\Component\Listing\Column\Store\Options</item>
</argument>
</arguments>
</type>
@mrtuvn
mrtuvn / generate_basic_data
Created January 22, 2020 00:51
Magento script generate basic data
#!/bin/bash
host_name="magento.test"
adminToken=$(curl -sb -X POST "http://${host_name}/rest/V1/integration/admin/token" \
-H "Content-Type:application/json" \
-d '{"username":"admin", "password":"123123q"}')
adminToken=$(echo ${adminToken} | sed -e 's/"//g')
category_creation_response=$(curl -sb -X POST "http://${host_name}/rest/V1/categories" \
@mrtuvn
mrtuvn / events_dispatch_m2.md
Last active February 22, 2020 05:06
use full events

CONTROLLER

controller_action_predispatch

controller_action_predispatch_[frontName][class][action]

controller_action_postdispatch

VIEW

@mrtuvn
mrtuvn / fight.gif
Last active February 24, 2020 02:00
fight.gif
@mrtuvn
mrtuvn / bootstrap5.css
Created June 23, 2020 07:03
Online code bootstrap 5
/*!
* Bootstrap v5.0.0-alpha1 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
:root {
--bs-blue: #0d6efd;
--bs-indigo: #6610f2;
--bs-purple: #6f42c1;
@mrtuvn
mrtuvn / magento-issues.txt
Last active April 14, 2021 15:20
Recent confirmed magento 2 issues for investigate, tracking, confirmd fixed issue will be remove later
*COMMON
https://github.com/magento/magento2/issues/27889 -CLOSED NOT VERIFY
https://github.com/magento/magento2/issues/29033 -CLOSED
https://github.com/magento/magento2/issues/16242 -OPEN
https://github.com/magento/magento2/issues/26492 -OPEN
https://github.com/magento/magento2/issues/29125 -OPEN
https://github.com/magento/magento2/issues/26565 -OPEN WITH CREATED PR
https://github.com/magento/magento2/issues/31973 -CLOSED
https://github.com/magento/magento2/issues/28387 -OPEN
@mrtuvn
mrtuvn / form.phtml
Last active August 2, 2020 18:30
contact form template magento 2 follow standard
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// phpcs:disable Magento2.Templates.ThisInTemplate
// phpcs:disable Generic.Files.LineLength.TooLong
/**