Skip to content

Instantly share code, notes, and snippets.

View collymore's full-sized avatar

Luke Collymore collymore

View GitHub Profile
<style>
.header-regular li.nav-item.level0.level-top.nav-item--parent.mega.parent:nth-child(9) { order: 100;}
.header-regular li.nav-item.level0.level-top.nav-item--parent.mega.parent:nth-of-type(9) a,
.header-mobile li.nav-item.level0.level-top.nav-item--parent.mega.parent:nth-child(6) a {color: #d62727}
.bottom-proceed li:nth-of-type(2) {display: none;}
.method-clearpay_onetouch { display: block; clear: both; text-align: right; padding-top: 10px;}
.method-clearpay_onetouch h3 {display: none;}
.method-clearpay_onetouch .button img { width: auto; height: 30px;}
.method-clearpay_onetouch .button { display: none; background: none; padding: 0; }
.method-clearpay_onetouch .button:hover { background: none !important }
@collymore
collymore / gist:44e57696580b668f1cf6e4a49d4ede66
Created October 2, 2022 21:21
Reindexes Algolia products that have been modified since a specific date
<?php
use Magento\Framework\App\Bootstrap;
/**
* Reindexes Algolia products that have been modified since a specific date
*/
require __DIR__ . '/../app/bootstrap.php';
$bootstrap = Bootstrap::create(BP, $_SERVER);
$objectManager = $bootstrap->getObjectManager();
$state = $objectManager->get('\Magento\Framework\App\State');
@collymore
collymore / magento-1-2-migration-update-urls
Last active November 10, 2023 08:30
Replace Magento 2 url_key with correct value from Magento 1
<?php
ini_set('max_execution_time', 0);
ini_set('display_errors', 1);
require __DIR__ . '/../app/bootstrap.php';
use \Magento\Framework\App\Bootstrap;
$bootstrap = Bootstrap::create(BP, $_SERVER);
$objectManager = $bootstrap->getObjectManager();
$state = $objectManager->get('\Magento\Framework\App\State');
@collymore
collymore / gist:3f2e69bdbd67f39727d5545a90a13800
Last active August 10, 2021 14:54
Magento 2 add Product Custom options to all enabled products
<?php
use Magento\Framework\App\Bootstrap;
require __DIR__ . '/app/bootstrap.php';
$bootstrap = Bootstrap::create(BP, $_SERVER);
$objectManager = $bootstrap->getObjectManager();
$state = $objectManager->get('\Magento\Framework\App\State');
$state->setAreaCode('adminhtml');
@collymore
collymore / EAVStoreLevelValueUpdates
Last active February 9, 2021 12:00
Updates Magento 2 EAV values by store Id, Insert or Update store level values
/*************************************************************************************/
/** Updates EAV tables for all products, inserting or updating specific store values **/
/*************************************************************************************/
/**** Update Vars ****/
$attribute_id = 129;
$store_ids = [0,1,2];
$value = 0;
$attribute_table = 'catalog_product_entity_int';
$checkExistingValues = true;
grep 'user\|dbname\|pass' local.xml | tr -d '\n' | sed 's/<username><\!\[CDATA\[\(.*\)\]\]><\/username>.*<password><\!\[CDATA\[\(.*\)\]\]><\/password>.*<dbname><\!\[CDATA\[\(.*\)\]\]><\/dbname>/ mysqldump -u\1 -p\2 \3 > \3.sql/g' | sh