Skip to content

Instantly share code, notes, and snippets.

@xcommerce-gists
xcommerce-gists / error.json
Created February 26, 2014 22:49
Temporary Magento gist
error: {
code: 3100,
message: Invalid Quantity,
parameters: [product, email]
}
@xcommerce-gists
xcommerce-gists / soap-error.xml
Created February 26, 2014 22:48
Temporary Magento gist
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:m="http://magento.com">
<env:Body>
<env:Fault>
<env:Code>
<env:Value>env:Sender</env:Value>
</env:Code>
<env:Reason>
<env:Text xml:lang="en">Invalid Quantity</env:Text>
@xcommerce-gists
xcommerce-gists / setup.php
Last active August 29, 2015 13:56
Temporary Magento gist
/**
* Process integration resource permissions after the integration is created
*
* @param string[] $integrationNames Name of integrations passed as array from the invocation chain
* @return string[]
*/
public function afterInitIntegrationProcessing($integrationNames)
@xcommerce-gists
xcommerce-gists / setup.php
Created February 25, 2014 15:19
Temporary Magento gist
/**
* Initiate integration processing
*
* @param array $integrationNames
* @return array of integration names sent to the next invocation
*/
public function initIntegrationProcessing(array $integrationNames)
@xcommerce-gists
xcommerce-gists / di.xml
Created February 25, 2014 15:18
Temporary Magento gist
<type name="Magento\Module\Updater\SetupFactory">
<arguments>
<argument name="resourceTypes" xsi:type="array">
<item name="testmodule1_setup" xsi:type="string">Magento\Integration\Model\Resource\Setup</item>
</argument>
</arguments>
</type>
@xcommerce-gists
xcommerce-gists / api.xml
Last active August 29, 2015 13:56
Temporary Magento gist
<integrations>
<integration name="testIntegrationModule1">
<!-- List of API resources required by the integration. These are resource ids defined
in etc/acl.xml of modules and subsequently mapped to web APIs in webapi.xml. -->
<resources>
<resource name="Magento_Reward::reward_spend" />
<resource name="Magento_Customer::online" />
<!-- Undefined resources will not be created-->
<resource name="Magento_Customer::undefined" />
<resource name="Magento_Sales::reorder" />
@xcommerce-gists
xcommerce-gists / config.xml
Last active August 29, 2015 13:56
Temporary Magento gist
<integrations>
<integration name="testIntegrationModule1">
<email>test-integration1@magento.com</email>
<endpoint_url></endpoint_url>
</integration>
<integration name="testIntegrationModule2">
<email>test-integration2@magento.com</email>
<endpoint_url></endpoint_url>
</integration>
</integrations>
@xcommerce-gists
xcommerce-gists / webapi.xml
Last active August 29, 2015 13:56
Temporary Magento gist
<?xml version="1.0"?>
<!--
/**
* {license_notice}
*
* @copyright {copyright}
* @license {license_link}
*/
-->
<config>
@xcommerce-gists
xcommerce-gists / Admin.php
Created January 25, 2014 15:56
Sample Magento administrative helper class
<?php
/**
* News Admin helper
*
* @author Magento
*/
class Magentostudy_News_Helper_Admin extends Mage_Core_Helper_Abstract
{
/**
* Check permission for passed action
@xcommerce-gists
xcommerce-gists / Main.php
Created January 25, 2014 15:51
Sample Magento administrative main edit tab page
<?php
/**
* News List admin edit form main tab
*
* @author Magento
*/
class Magentostudy_News_Block_Adminhtml_News_Edit_Tab_Main
extends Mage_Adminhtml_Block_Widget_Form
implements Mage_Adminhtml_Block_Widget_Tab_Interface
{