Skip to content

Instantly share code, notes, and snippets.

View CajuCLC's full-sized avatar
🌎
Anacardium occidentale

Eric Cavalcanti CajuCLC

🌎
Anacardium occidentale
View GitHub Profile

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
@CajuCLC
CajuCLC / debugging reindex locks mysql commands.md
Created October 18, 2017 15:02 — forked from tegansnyder/debugging reindex locks mysql commands.md
Useful Mysql Commands for Debugging Magento Reindex Locks

Sometimes you may have a run away reindex process that aborted due to a MySQL connection error of some sorts. It may be useful to use the following MySQL commands to aid in debugging.

Determining if a lock exists

Magento Enterprise labels the reindex lock via the constant REINDEX_FULL_LOCK in app/code/core/Enterprise/Index/Model/Observer.php

SELECT IS_FREE_LOCK('mydatabase_name.reindex_full')

Returns 1 is specified lock is free and can be acquired, 0 if it’s in use, NULL if an error occurs.

Determing the thread that is holding the lock

@CajuCLC
CajuCLC / Magento-Indexing-Locks.md
Last active August 23, 2018 17:35 — forked from tegansnyder/Magento-Indexing-Locks.md
Magento EE Indexer Locks

Here is how we can see if we have MySQL locks due to indexing:

Display locks:
SELECT IS_USED_LOCK('magento.reindex_full');
Releasing locks:
SELECT RELEASE_LOCK('magento.reindex_full');
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
ereg
@CajuCLC
CajuCLC / magento1_enterprise_index_diagnostics.sql
Created November 9, 2017 19:53 — forked from mttjohnson/magento1_enterprise_index_diagnostics.sql
Magento 1.x Enterprise Partial Indexing Diagnostics Toolset
-- When products are added/removed from a category this table stores all the relation data
select * from catalog_category_product where product_id = '24526';
-- The index that is used for presenting products in a category on the frontend
select * from catalog_category_product_index where product_id = '24526';
-- The change log table used for Magento EE partial index functionality
select * from catalog_category_product_index_cl where product_id = '24526' and version_id > (select version_id from enterprise_mview_metadata where changelog_name = 'catalog_category_product_index_cl');
php -f install.php -- --get_options
array (
'locale' =>
array (
0 =>
array (
'value' => 'af_ZA',
'label' => 'Afrikaans (South Africa)',
),
1 =>
AFN,MGA,THB,PAB,ETB,BOB,VEF,VEB,GHS,SVC,CRC,CZK,DKK,SKK,EEK,ISK,NOK,SEK,ZMK,AOA,GEK,NIC,GMD,DZD,BHD,KWD,IQD,JOD,LYD,MKD,RSD,TND,MAD,AED,STD,VND,AMD,AUD,BSD,BBD,CAD,NZD,BMD,KYD,SBD,SGD,HKD,TTD,BZD,BND,XCD,ZWD,FJD,GYD,JMD,LRD,NAD,USD,RHD,SRD,GQE,CVE,EUR,CHE,AWG,ANG,HUF,XOF,XPF,CHW,BIF,KMF,CDF,DJF,GNF,RWF,CHF,HTG,PYG,UAH,JPY,PGK,LAK,HRK,MWK,BUK,MMK,GEL,LVL,ALL,HNL,SLL,MDL,RON,ROL,BGN,GIP,SHP,EGP,GBP,LBP,FKP,SDG,SYP,SZL,TRY,TRL,LTL,LSL,AZM,AZN,TMM,BAM,MZN,NGN,ERN,BTN,TWD,PEN,MRO,MOP,TOP,ARS,CLP,COP,CUP,DOP,PHP,MXN,UYU,BWP,GTQ,ZAR,BRL,QAR,YER,IRR,OMR,SAR,KHR,MYR,BYR,RUB,LKR,INR,IDR,MVR,MUR,NPR,PKR,SCR,ILS,KGS,UZS,TJS,BDT,WST,KZT,MNT,VUV,KPW,KRW,TZS,KES,SOS,UGX,CNY,PLN
@CajuCLC
CajuCLC / tenda_header.txt
Created February 23, 2018 19:31
tenda_header
* Trying 104.25.181.16...
* TCP_NODELAY set
* Connected to tendagospel.com (104.25.181.16) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
@CajuCLC
CajuCLC / dev_tenda_header.txt
Created February 23, 2018 19:32
dev tenda header
* Trying 104.25.181.16...
* TCP_NODELAY set
* Connected to dev.tendagospel.com (104.25.181.16) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
@CajuCLC
CajuCLC / preco.html
Last active March 26, 2018 13:07
tenda atualizar preço produto
<html>
<body>
<form action="trocapreco.php" method="post">
Valor: <input type="text" name="preco"><br>
<input type="submit">
</form>
</body>
</html>