Skip to content

Instantly share code, notes, and snippets.

View Vildulv's full-sized avatar
🎯
Focusing

Alex Havrylov Vildulv

🎯
Focusing
View GitHub Profile
@mitchuman
mitchuman / gist:68bf46a6e79e8b0287198e4780cf0ba0
Created July 22, 2023 00:42
Shopify Foundations Certification
In which circumstance should a merchant use a multi-store setup instead of Shopify Markets?
When a merchant needs completely unique online store experiences for different markets, controlled by different entities in different regions
Shopify Markets allows merchants to localize which feature for different regions?
Domains
Shopify Markets Pro enables which merchant functionality?
Handling tax remittance and regulatory compliance in each new market
With Shopify Markets Pro, Shopify becomes the merchant of record and is the legal entity responsible for which aspects of a merchant's business?
@hostep
hostep / composer-v2-support-older-magento2-versions.md
Last active July 2, 2025 00:06
Add composer v2 support to older Magento2 versions

Add composer v2 support to older Magento2 versions

Magento 2.3.7 and 2.4.2 ship with composer v2 support out of the box but as far as I can see the only thing that needs to happen is to use some more modern versions of certain composer plugins which are used by certain dependencies of Magento.

This means we should be able to add composer v2 support to older Magento2 versions as well if we get a bit creative.

See below for diffs of the composer.json files you can apply to your projects, be sure to keep a mental note of these things, they will need to maintained by yourself in case newer versions of these modules are released. And if one day you update to Magento 2.3.7 or 2.4.2 or higher, you can remove these changes again.

⚠️ Disclaimer: use these tricks at your own risk!

Step 1:
File to changed should be added to the git
git add -f vendor/dotmailer/dotmailer-magento2-extension/Api/Data/CouponAttributeInterface.php
Step 2:
Then make the changes to the core file
Step 3:
After making the changes run
git diff vendor/dotmailer/dotmailer-magento2-extension/Api/Data/CouponAttributeInterface.php > m2-hotfixes/webapi-fix.patch
@undergroundwires
undergroundwires / rename-all-tags.sh
Created May 23, 2020 20:35
Rename all tags in GIT repository from "v.." (e.g. "v1.0.0" to without "v" e.g. "1.0.0")
#!/usr/bin/env bash
push_tag() {
local tag="$1"
echo "Pushing $tag"
git push origin "$tag"
}
delete_tag() {
local tag="$1"
defination of uicomponents
module-ui/view/base/requirejs-config.js
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
var config = {
paths: {
'ui/template': 'Magento_Ui/templates'
package main
import (
"encoding/json"
"fmt"
)
func main() {
b := []byte(`{"key":"value"}`)
@rafaelstz
rafaelstz / 1step-Install-Deployer-Magento2-BitbucketPipelines.md
Last active June 24, 2025 23:28
Automated deploy using Magento 2 + Bitbucket Pipelines + Deployer

Use both files in your root folder and run:

curl -LO https://deployer.org/deployer.phar && sudo mv deployer.phar /usr/local/bin/dep && sudo chmod +x /usr/local/bin/dep
composer require deployer/recipes --dev
composer require rafaelstz/deployer-magento2 dev-master --dev

If .DS_Store was never added to your git repository, simply add it to your .gitignore file.

If you don't have one, create a file called

.gitignore

In your the root directory of your app and simply write

@harshvardhanmalpani
harshvardhanmalpani / createCat.php
Created October 27, 2017 08:02
How to create Magento 2 category programmatically
<?php
//creating categories in magento 2
//last verified Magento 2.2.0 27 Oct 2017
use \Magento\Framework\App\Bootstrap;
echo 'code by harshvardhanmalpani';
include('./app/bootstrap.php');
$bootstrap = Bootstrap::create(BP, $_SERVER);
$objectManager = $bootstrap->getObjectManager();
function createCategory($a='',$b=2,$c=true,$d='',$e='',$f='',$g='') {
global $objectManager;
define([
'jquery',
'mage/translate',
'jquery/ui',
'mage/url' // Adiciona url builder
], function($, $t, ui, url) {
"use strict";
// Cria url
var url = url.build('vendor/controler/action');