Order States and Statuses
The only state to hold more than one status by default is payment_review
, it seems a little odd to me that PayPal creates a state of pending_paypal
- that seems like it should be a child of pending_payment
.
- new
- pending
- pending_payment
- pending_payment
- payment_review
- payment_review
- fraud
- processing
- processing
- complete
- complete
- closed
- closed
- canceled
- canceled
- holded
- holded
Related cards:
Associating An Orphan Sage Pay Suite Transaction With An Order
We had a situation whereby a client placed an order and went through Sage Pay
succesfully, however the order was not able to be created on Magento, so we had
an error stating "WARNING - There are approved Sage Pay transactions that have
no associa...
Set Next Increment ID For Orders, Quotes, Invoices, Shipments or Credit Memos
BIG NOTE! I'm not totally sure that all these entity types increment ID's are stored here any more. Check
The last order increment ID issued for all these entity types is stored in eav_entity_store
, in the increment_last_id
column. Note that ...
Product EAV Attribute Set, Group and Attribute List
To see a list of all attribute sets, groups, and associated attributes for products, use this SQL. BONUS! Also shows the sort ordering, useful for determining which sort_order
you need to place an attribute in a certain position:
SELECT...
Stock Availability on Credit Note, Cancellation and Payment Deny
In summary - making a credit memo can increase the stock quantity but will never set the "Stock Availability" of the product to "In Stock", whereas a config option can control whether an order cancellation sets "In Stock" automatically. Denying a ...
Layout Loading and Misc Notes
Layout XML files are loaded here via this stack - here we are loading the layout update for the rwd/default design package, for the CMS home page. I've put a dashed line on the demarcation between layout code and other code:
Mage_Core_Model_A...
Import Resetting visibility and stock attributes
If you are updating an existing product you need to include the stock and visibility attributes, otherwise the stock for the product will get set to 0 and out of stock, and the visibility will be reset to Catalog, Search.
![](http://mikewhitby.co...
Cache Clearing And General Information
Clean everything (use either):
Mage::app()->getCacheInstance()->flush();
Mage::app()->getCache()->clean();
Clean specific types:
Mage::app()->getCacheInstance()->cleanType('config');
Mage::app()->getCacheInstance()->cleanType('l...
startSetup() and endSetup()
Ever wondered what they do? Basically they disable and then enable foreign key checks, and set the SQL mode to NO_AUTO_VALUE_ON_ZERO, then back to the old SQL mode. Below is the code taken from Varien_Db_Adapter_Pdo_Mysql
:
/**
* Run ad...
Boilerplate Resource Model Class (CE 1.6 / EE 1.11 And After)
/**
* Yourcompany.com
*
* PHP Version 5
*
* @category Namespace
* @package Namespace_Module
* @author Your Name <your.name@yourcompany.com>
* @copyright 2012 yourcompany.com
* @license http:...
Messages and Global Messages Blocks
Both use the same block, as we can see in page.xml
:
<block type="core/messages" name="global_messages" as="global_messages"/>
<block type="core/messages" name="messages" as="messages"/>
When you add a message, you add it to the session...