Skip to content

Instantly share code, notes, and snippets.

View lnoering's full-sized avatar

Leonardo Noering lnoering

View GitHub Profile
@lnoering
lnoering / magento-2-tips.md
Last active December 14, 2022 19:17
[ Magento 2 ] Tips

Find your not compatible custom modules in Magento.

  • Version - ( 2.4.4 ~ 2.4.5-p1) add code in vendor/magento/framework/Reflection/MethodsMap.php line 143
if($paramReflection->detectType() == NULL)
{
    var_dump($paramReflection->getDeclaringClass());
    die();
}
@lnoering
lnoering / cloud-new-environment.md
Created November 16, 2022 15:26
[Magento Cloud] - Creating new environment to test the upgrade

Creating new environment to test the upgrade

1 - Create new branch from master

git checkout -b cloud/upgrade-2.4.5

2 - Push that branch to cloud

git push -u cloud cloud/upgrade-2.4.5:upgrade-2.4.5
@lnoering
lnoering / productAttributes.md
Last active September 2, 2022 17:37
[Magento 2] - Get all attributes from product

Get all product attributes from entity

SELECT
	ea.attribute_code,
	ea.frontend_label,
	ea.entity_type_id 
FROM 
	eav_attribute AS ea
LEFT JOIN eav_entity_type as eat ON eat.entity_type_code = 'catalog_product'
@lnoering
lnoering / m2b-script.sh
Last active August 10, 2022 13:17
[Magento 2] - Backup of database or media folder in server
#!/bin/bash
#
# Magento 2 - Backup scripts (database | media)
#
# @author Leonardo <lnoering@gmail.com>
# @version 1.0.0
# UnComment it if bash is lower than 4.x version
shopt -s extglob
@lnoering
lnoering / productValues.md
Last active July 6, 2022 14:01
Magento 2 - Get All Attribute values from entity by id

Magento 2

Get all eav data from specific product

use magento;

SET @ENTITY_TABLE = 'catalog_product_entity';
SET @COLUMNID = 'sku';
@lnoering
lnoering / magento2-docker-cloud.md
Last active June 3, 2022 14:23
[Magento 2] - Docker from cloud running at local
@lnoering
lnoering / branch-flow-to-work.md
Created March 15, 2022 20:07
[ GIT - Flow ] - Deploy flow with git and magento.

Only on the commerce cloud projects, it goes like this: When branches are ready to deploy to production:

  • create a release/[yyyymmdd] branch (e.g. release/20220315) from git master
  • merge feature branches that are ready to deploy to this release branch (push release branch to git repo)
  • merge the release branch to git production (push git production up to repo)
  • merge git production to cloud production
  • merge git production to git master
  • optional: merge cloud production to cloud master

for all the other "on-premise" projects, we

@lnoering
lnoering / vendor-modules-zip.md
Last active July 26, 2023 21:21
Zip All modules from vendor

Zip all modules to install by artifact

Steps

Go to the vendor_name folder.

  • Ex.: cd vendor/amasty

Create the file at that folder.

  • Ex.: zip-all.sh
@lnoering
lnoering / work-with-remotes.md
Last active April 26, 2021 18:40
Add remotes to the same project.

Working with more than one remotes at the same project.

Remote

Add new remote

Command: bash git add remote <name> <url>