Skip to content

Instantly share code, notes, and snippets.

Avatar

xcommerce-gists

View GitHub Profile
@xcommerce-gists
xcommerce-gists / error.json
Created Feb 26, 2014
Temporary Magento gist
View error.json
error: {
code: 3100,
message: Invalid Quantity,
parameters: [product, email]
}
@xcommerce-gists
xcommerce-gists / soap-error.xml
Created Feb 26, 2014
Temporary Magento gist
View soap-error.xml
<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 Aug 29, 2015
Temporary Magento gist
View setup.php
/**
* 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 Feb 25, 2014
Temporary Magento gist
View setup.php
/**
* 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 Feb 25, 2014
Temporary Magento gist
View di.xml
<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 Aug 29, 2015
Temporary Magento gist
View api.xml
<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 Aug 29, 2015
Temporary Magento gist
View config.xml
<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 Aug 29, 2015
Temporary Magento gist
View webapi.xml
<?xml version="1.0"?>
<!--
/**
* {license_notice}
*
* @copyright {copyright}
* @license {license_link}
*/
-->
<config>
@xcommerce-gists
xcommerce-gists / Admin.php
Created Jan 25, 2014
Sample Magento administrative helper class
View Admin.php
<?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 Jan 25, 2014
Sample Magento administrative main edit tab page
View Main.php
<?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
{
You can’t perform that action at this time.