Skip to content

Instantly share code, notes, and snippets.

View jonathonbyrdziak's full-sized avatar
🔥
Scaling Businesses with Marketing Technology

Jonathon Byrdziak jonathonbyrdziak

🔥
Scaling Businesses with Marketing Technology
View GitHub Profile
@jonathonbyrdziak
jonathonbyrdziak / product_data_query.sql
Last active February 17, 2017 01:05
Common Magento SQL Queries
USE dgustore;
SELECT
`e`.`entity_id` as `id`,
`e`.`sku`,
IF(_table_status.value_id > 0, _table_status.value, _table_status_default.value) AS `status`,
IF(at_name.value_id > 0, at_name.value, at_name_default.value) AS `name`,
c2.value as category,
IF(at_description.value_id > 0, at_description.value, at_description_default.value) AS `description`
FROM
@jonathonbyrdziak
jonathonbyrdziak / recurring_orders_api.md
Created February 2, 2017 22:20
Submitting Recurring Order Data to RF

Introduction to API

Overview

What is REST API? To make it simple, REST API defines a set of functions to which the developers can perform requests and receive responses. The interaction is performed via the HTTP protocol. An advantage of such an approach is the wide usage of HTTP. That is why REST API can be used practically for any programming language.

Common characteristics of Magento REST API resources are as follows: (magentohost is your domain)

  • You access the resource by sending an HTTP request to the Magento API server. The server replies with a response that contains either the data you requested, or the status indicator, or even both.
  • All resources are located at https://magentohost/api/rest/.
@jonathonbyrdziak
jonathonbyrdziak / CONTRIBUTING.md
Created May 10, 2016 14:59
Contributing to Merchant Protocol Repositories

Contributing to Merchant Protocol Repsitories

Contributions to the Magento 2 codebase are done using the branch & pull model developed by github. This contribution model has contributors maintaining their own branch of the codebase (which can easily be synced with the main copy). The branch is then used to submit a request to the repository to “pull” a set of changes (hence the phrase “pull request”).

Bug fixes may be contributed directly to the Master Branch. Contributing branches can take the form of new components/features, changes to existing features, tests, documentation (such as developer guides, user guides, examples, or specifications), optimizations or just good suggestions. Branch names should start with the issue # describing the contribution, followed by a few keywords.

The Merchant Protocol Enterprise Architects Team will review all issues and requests submitted in the first in, first out order. During the review we migh

Merchant Protocol Contributor Agreement

Summary Clause

By making a contribution, you agree to the terms of the Merchant Protocol Contributor License Agreement, which includes your grant to Merchant Protocol of a royalty-free, perpetual and irrevocable license to use and relicense your contribution, and any copyrights and patent rights in your contribution. You may only contribute software and materials originally created by you or your company and you must have the right to make the contribute on behalf of yourself and/or your company.

Merchant Protocol, INC.

@jonathonbyrdziak
jonathonbyrdziak / sql_debug_magento.php
Created April 20, 2016 18:52
enhance the Magento sql debugging.
<?php // <-- this line is just to color the code for you. Do not include it
// comment out the current exception throw.
//throw new Zend_Db_Statement_Exception($e->getMessage(), (int) $e->getCode(), $e);
// Modified the next line and added the subequent lines to show the full SQL query and params:
$msg = "SQL ERROR: ". $e->getMessage() . "\n";
$msg .= "SQL QUERY: <span style='color: maroon;'>" . $this->_stmt->queryString."</span>\n";
if(!empty($params)) {
$msg .= "SQL PARAMS: ('". implode("','", $params) ."')\n";
@jonathonbyrdziak
jonathonbyrdziak / vsftpd.conf
Last active April 1, 2016 19:03
vsftpd configurations
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
## Custom setup of SFTP
ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=YES
@jonathonbyrdziak
jonathonbyrdziak / customers.sql
Created March 30, 2016 15:43 — forked from leek/_Magento1_DeleteTestData.md
Magento - Delete All Test Data
SET FOREIGN_KEY_CHECKS=0;
-- Customers
TRUNCATE `customer_address_entity`;
TRUNCATE `customer_address_entity_datetime`;
TRUNCATE `customer_address_entity_decimal`;
TRUNCATE `customer_address_entity_int`;
TRUNCATE `customer_address_entity_text`;
TRUNCATE `customer_address_entity_varchar`;
TRUNCATE `customer_entity`;
@jonathonbyrdziak
jonathonbyrdziak / .gitignore
Last active June 22, 2016 14:01
Magento and WordPress .gitignore
## General
!.gitignore
!.editorconfig
!readme.md
.DS_Store
~*
*.sublime-project
*.sublime-workspace
*.komodoproject
*.log
@jonathonbyrdziak
jonathonbyrdziak / helper_functions.php
Created October 30, 2015 18:38
Magento Helper Data Functions
<?php
/**
*
*
*
*
*
*/
/**
<?php
/*
To make the cleaning expired carts automatic, override cleanExpiredQuotes with the following
version which will also take care of the old active carts: app/code/core/Mage/Sales/Model/Observer.php
*/
public function cleanExpiredQuotes($schedule)
{
// extending limit