Return Store Variables (Phone Number, Address, E-Mail etc)
Name:
Mage::getStoreConfig('general/store_information/name')
Phone number:
Mage::getStoreConfig('general/store_information/phone')
Address:
Mage::getStoreConfig('general/store_information/address')
E-Mail:
Mage::getStoreConfig('trans_email/ident_general/email')
Related cards:
Fetching Store Contact E-Mail Addresses
// General Contact
$name = Mage::getStoreConfig('trans_email/ident_general/name');
$email = Mage::getStoreConfig('trans_email/ident_general/email');
// Sales Representative
$name = Mage::getStoreConfig('trans_email/ident_sa...
Creating an EAV Entity
Overview
A overview for those familiar with making flat models:
- Your config is standard, your table name takes the form of the base (entity) table
- You name your resource models as normal (so by class name, you can't tell the difference b...
Nginx Virtual Store Subdirectories
Note - this article only applies to nginx and PHP-FPM!
If you want to have stores which are accessed via subdirectories as opposed to domain names, the standard method I've found is to make a directory with a copy of index.php
in it, using ...
Collection Manipulation (Filtering, Limiting, etc)
A list of collection methods, similar to this
Where
OR:
You have to first specify an array of attributes in the filter, then a two dimensi...
Fetching All Attributes For An Entity From The DB In One Query
Using the database to inspect EAV-based entity types can be a real pain in the ass, so here are a bunch of queries that let you inspect some popular EAV entity types easily. This practice can be applied to any EAV entity type, however as there are...
Paypal Express Flow
The PayPal Express Checkout Integration Guide is a great
source of well-written information for anything relating to the Express
checkout, including information regarding all of the API calls. Also, the PayPal
Express Checko...
Adding Attributes To Other Entities With getDefaultEntities()
Don't do it!! I did the below:
public function getDefaultEntities()
{
return array(
'catalog_product' => array(
'attributes' => array(
'size_guide_id' => array(
...
Setting Data Per-Store On Entites
Certain entities (Products and Categories, for example) have the concept of a
store scope, whereby you can set the default value for all stores, or you can
set a value on a per-store basis.
You could do it this way, and this is probably how most ...
EAV Tables
A list of EAV tables and their purpose.
|----------------------------+-------------------------------------------------------------------------------------|
| Table | Contains ...
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 ...