Skip to content

Instantly share code, notes, and snippets.

View centerax's full-sized avatar
✈️

Pablo S. Benitez centerax

✈️
View GitHub Profile
<?php
/**
* @see Ebizmarts_SagePaySuite_Block_Paypal_Express_Review
*/
?>
<div class="page-title">
<h1><?php echo $this->__('Review Order') ?></h1>
</div>
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
/**
* Sage50 compatible Basket.
*
* @param Mage_Sales_Model_Quote $quote
* @return string Basket as string.
*/
public function getSageBasket($quote) {
$basket = '';
@centerax
centerax / sagePaySuite_Checkout.js
Created August 5, 2013 20:02
PayPal Hosted PRO with Sage Pay Suite - OneStepCheckout
//Before 'if(!this.isSagePay()) {' add
if(this.getPaymentMethod() == "hosted_pro") {
submitOsc($('onestepcheckout-form'), location.href, 'Please wait, processing your order...', SuiteConfig.getConfig('global', 'osc_loading_image'));
window._sagepayprocessingorder = false;
return;
}
<?php
class Ebizmarts_SageOne_Block_Adminhtml_Sales_Order_Creditnote_Note extends Mage_Core_Block_Template {
public function getCreditMemo() {
return Mage::registry('current_creditmemo');
}
/**
@centerax
centerax / test-ccs.txt
Created June 15, 2014 16:52
Sage Payment Solutions TEST credit card numbers
Visa
4111111111111111
MasterCard
5499740000000057
Discover
6011000993026909
Amex
@centerax
centerax / url.txt
Created June 23, 2014 15:54
Alexa Top million Download URL
http://s3.amazonaws.com/alexa-static/top-1m.csv.zip
@centerax
centerax / create_user.php
Created June 26, 2014 14:50
Create New Magento admin User programmatically
<?php
// Create New admin User programmatically.
require_once('./app/Mage.php');
umask(0);
Mage::app();
try {
$user = Mage::getModel('admin/user')
->setData(array(
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Config Github Settings
github_username = "fideloper"
github_repo = "Vaprobash"
github_branch = "1.0.0"
github_url = "https://raw.githubusercontent.com/#{github_username}/#{github_repo}/#{github_branch}"
# Server Configuration

Keybase proof

I hereby claim:

  • I am centerax on github.
  • I am pablobenitez (https://keybase.io/pablobenitez) on keybase.
  • I have a public key whose fingerprint is 5EC2 3ED6 B194 066C 589B 7B4D 7941 1453 3D33 EF06

To claim this, I am signing this object:

<?php
$data = array(
array('warehouse'=>"wh_en",'sku'=>'ace000','sign'=>'+','stock'=>1),
array('warehouse'=>"1",'sku'=>'ace000','sign'=>'+','stock'=>1),
);
$jsonData = json_encode($data);