Skip to content

Instantly share code, notes, and snippets.

View pauloharaujos's full-sized avatar

Paulo Henrique Silva pauloharaujos

View GitHub Profile
@pauloharaujos
pauloharaujos / gist:fad39e52a9551c693d7d3f0386b993e8
Created December 11, 2019 01:34
Cron job stuck - Try to run cron job manually
Magento 1 : n98-magerun.phar sys:cron:run
@pauloharaujos
pauloharaujos / gist:675786777263b73717bbceb9f4ed7f1a
Created November 21, 2019 21:31
dbModel read resource does not implement Zend_Adapter.....
use this local.xml file :
<?xml version="1.0"?>
<!--
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
@pauloharaujos
pauloharaujos / gist:e76c749b311f95a02b5e28a7567c43c2
Created November 1, 2019 14:40
M2.3 – Sodium crypto adapter errors on unexpected input
Modify this file : vendor/magento/framework/Encryption/Adapter/SodiumChachaIetf.php
$plainText = sodium_crypto_aead_chacha20poly1305_ietf_decrypt(
$payload,
$nonce,
$nonce,
$this->key
);
if ($plainText == false)
{
@pauloharaujos
pauloharaujos / gist:3d63529ec2978abbdff7cec664e34a9b
Created October 23, 2019 20:47
M1 Ajax Request - How to send parameters by $_POST
new Ajax.Request("<?php echo $this->getUrl('paypal/express/placeOrder') ?>",{
method: 'POST',
async: false,
parameters: "telephone="+document.getElementById('billing:telephone').value,
onSuccess: function (response) {
}
});
@pauloharaujos
pauloharaujos / gist:c6c99b3c7f158ba10b114a8808e200da
Created October 9, 2019 20:56
M1 - Add product to cart using AJAX on PDP
if ($('product_addtocart_form')) {
var data = $('product_addtocart_form').serialize();
data += '&isAjax=1';
var urlAddToCart = $('product_addtocart_form').action;
new Ajax.Request(urlAddToCart,{
method: 'POST',
async: false,
parameters: data,
onSuccess: function (response) {
@pauloharaujos
pauloharaujos / Row size too large (> 8126)
Last active November 21, 2019 19:42
Row size too large (> 8126)
1- Open Sequel Pro and run these query :
SET GLOBAL innodb_strict_mode = 0;
After that, try to import the database again :)
@pauloharaujos
pauloharaujos / gist:86f87cbc9913dfa231b05eb2799cbb9d
Created October 7, 2019 13:26
Not supported cipher version
update core_config_data set value = '' where value like '%0:3:%'
@pauloharaujos
pauloharaujos / adminerror
Last active September 24, 2019 14:44
Magento Admin Error - Fix /server.php error when try to access admin panel
php bin/magento config:set web/seo/use_rewrites 1
php bin/magento config:set web/secure/use_in_adminhtml 0
@pauloharaujos
pauloharaujos / gist:4343bb04ac5bce29236c27c9b6973870
Created June 18, 2019 18:02
Change elasticsearch to mysql search engine
bin/magento config:set catalog/search/engine 'mysql'
@pauloharaujos
pauloharaujos / capistrano
Created May 30, 2019 19:00
How to install capistrano
brew install ruby
gem install capistrano -n /usr/local/bin
gem install capistrano-magento2
gem install slackistrano