Skip to content

Instantly share code, notes, and snippets.

View rafaelpatro's full-sized avatar

Rafael Patro rafaelpatro

  • Lisbon, Portugal
View GitHub Profile
@rafaelpatro
rafaelpatro / magento-frontend-scripts.md
Last active July 20, 2018 16:07
Magento Frontend Scripts

Improve Magento frontend

The scripts below require nothing but itself.

  • No module installation
  • No FTP access
  • No third party integration
  • No plans
  • Only CMS > Blocks/Widgets
@rafaelpatro
rafaelpatro / magento-address-autocomplete.js
Last active September 23, 2024 12:44
Magento Address Auto Fill based on Postcode
/**
* Address Auto Fill based on Postcode
*
* Author:
* Rafael Patro <[email protected]>
*
* Intallation:
* Add a CMS Static Block applying the entire script below.
* Add a Widget to pages with address forms.
*
@rafaelpatro
rafaelpatro / correios-rastro.js
Last active April 9, 2017 00:19
Servidor Node.JS para consulta de CEP nos Correios
var soap = require('soap');
var fs = require('fs');
var app = require('express')();
var privateKey = fs.readFileSync('/etc/apache2/ssl.crt/mydomain.key');
var certificate = fs.readFileSync('/etc/apache2/ssl.crt/87g4d56efa87af4.crt');
var chainFile = fs.readFileSync('/etc/apache2/ssl.crt/gd_bundle-g2-g1.crt');
var credentials = {key: privateKey, cert: certificate, chain: chainFile};
var https = require('https').Server(credentials, app);
@rafaelpatro
rafaelpatro / magento-catalog-product-view-cc.js
Last active June 17, 2020 01:56
Magento Catalog Product View shows Credit Card Installments
/**
* Credit Card Installments to Product Page
*
* Author:
* Rafael Patro <[email protected]>
*
* Intallation:
* Configure the variables ccording to your credit card plan.
* maxInstallments (integer) Maximum number of installments the cc plan accept
* minPlotValue (number) Minimum installment value
@rafaelpatro
rafaelpatro / magento-scrolling-menu.js
Last active December 12, 2019 13:33
Magento Scrolling Menu (RWD)
/**
* Magento Scrolling Menu (RWD)
*
* Author:
* Rafael Patro <[email protected]>
*
* Source:
* https://gist.github.com/rafaelpatro/f3d62f82a6ae4c0f75465d99655dd791
*
* Intallation: