Study Guide Site Flashcards

(45 cards)

1
Q

What is the DDL class in Magento?

A

The only DDL class in Magento is Varien_Db_Ddl_Table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which block is responsible for rendering javascript in Magento?

A
Mage_Page_Block_Html_Head
addJs(),
addJsIe(),
addItem(),
getCssJsHtml()
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which product types exist in Magento?

A
Magento has 6 standard product types,
Configurable
Simple
Grouped
Bundle
Virtual
Downloadable
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which product types are implemented as part of the Mage_Catalog module, and which are not?

A

Mage_Catalog - simple, grouped, configurable, virtual
Mage_Bundle - bundle
Mage_Downloadable - downloadable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which classes and files should be checked if a link to a custom javascript file isn’t being rendered on a page?

A
Mage_Page_Block_Html_Head
addJs(),
addJsIe(),
addItem(),
getCssJsHtml()
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which product types implement a parent-child relationship between product entities?

A

configurable, bundle and grouped

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which database tables are shared between product types, and which ones are specific to one product type?

A

Specific to one product type:
configurable - catalog_product_super_link:table
For configurable, grouped and bundle - catalog_product_relation table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What steps need to be taken in order to implement a custom product type?

A

Add product types config entry

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do the different product types handle price calculation?

A

catalog/product_type_configurable_price

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which indexing processes does the product type influence?

A

Product Price

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which product types implement a parent-child relationship between product entities?

A

configurable product type - configurable(parent) - simple(child)
may be grouped and bundle as well
prepareForCartAdvanced() - initialize product for add to cart process..
calls to prepareProduct() - process product and prepare options
calls to prepareOptions() - Process custom defined options

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are total models responsible for in Magento?

A
quote, invoice, creditmemo
discount
- grand total
- shipping
- subtotal
- tax
- nominal
- custbalance
- freeshipping
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How and when is the include path set up and the auto loader registered?

A

in Mage.php (Varien_Autoload::register();)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How and when does Magento load the base configuration, the module configuration, and the database configuration?

A

Using class Mage_Core_Model_Config:
Magento calls loadBase() to load config file
Next, calls Method: loadModules() to load modules,
then calls loadDb(() to load the database configuration

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How does Magento process requests that cannot be mapped?

A

It will send user to a 4 O 4 page using cms/index/noRoute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

After a matching action controller is found, what steps occur before the action method is executed?

A
The controller class is instantiated
Then sets module name,
controller name,
action name,
controller module name & parameters.
Then calls:
setDispatched(true);
Then dispatch($action) to dispatch the request
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is the difference regarding module loading between Mage::run() and Mage::app()?

A
Mage::app() :: initializes the application object with all variables and objects which are required to access magento 
Mage::run() :: is the Frontend entry point which means it loads the configuration files, module configuration, load Database and handles request processing.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is the difference regarding module loading between Mage::run() and Mage::app()?

A

Mage::app() - Initialize application without request processing.
Mage::run() - Run application. Run process responsible for request processing and sending response.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Which classes are responsible for the layout being loaded?

A
Class Mage_Core_Controller_Varien_Action:
Method loadLayout() - processes the request to load layout
Class Mage_Core_Model_Layout
Method \_\_construct() - loads layout xml
Class Mage_Core_Model_Layout_Update
Method load() - load layout updates by handles
20
Q

Which ways exist to specify the layout update handles that will be processed during a request?

A

jquery/jquery-1.8.1.min.js

<!- or

jquery/jquery-1.8.1.min.js

->

21
Q

Which class is responsible for sending output?

A

The Mage_Core_Controller_Response_Http class

Magento uses a response object to send all output.

All output is added to this object, and then its sendResponse method is called.

22
Q

What is the responsibility of Front Controller?

A

Directly receive the request from browser.
All requests call the function Mage_Core_Controller_Varien_Front::dispatch()
- URL rewriting process.
- Load the module and action controller corresponding with the requests through routers to process the requirements which are sent from clients.

23
Q

How to pass variables from layout to block?

A

category_id3
In the block, this can be retrieved by..
$categoryId = $this->getCategoryId();
$categoryId = $this->getData(‘category_id’);

24
Q

Add and customize Javascript

A

in js folder,

in skin js folder,
skin_jsjs/test.js

25
Which events are associated with sending output?
http_response_send_before controller_front_send_response_before controller_front_send_response_after
26
How and when are the two main types of setup script executed?
In Mage_Core_Model_App::_initModules(), calls Mage_Core_Model_Resource_Setup::applyAllUpdates(), and it then calls applyUpdates() to check version number from config.xml.. The config.xml version number is checked against core_resource table's version of the module.
27
Which is the base setup class for flat table entities, and which one the base for EAV entities?
Flat table: Mage_Core_Model_Resource_Setup | EAV table: Mage_Eav_Model_Entity_Setup
28
When does Magento decide which store view to use, and when is the current locale set?
Class . Mage_Core_Model_App:: Method: run() which includes _initCurrentStore() :: Loads all websites, group and stores into website, group and store object using _initStores() this function checks whether the site is website or store group or store, currentStore = $store; Current locale set in Mage_Core_Model_App init() is called init() calls $this->_initEnvironment(); which has a setting of locale
29
When are the request and response objects initialized?
``` Class Mage_Core_Model_App Method getRequest() Method getResponse() ```
30
Which ways exist in Magento to add router classes?
1) Add router section to the config file. The declare a module router and use your router instead of standard 2) Use an event observer to add a router
31
Which routers exist in a native Magento implementation?
Admin, Standard, CMS and Default
32
How does the framework discover active modules and their configuration?
Class Mage_Core_Model_Config | Method: _loadDeclaredModules()
33
Explain how Magento loads and manipulates configuration information?
$this->loadBase(); //config.xml and local.xml $this->loadModules(); //load all modules xml from app/etc/modules/ directory $this->_loadDeclaredModules(); //load each modules xml file $this->loadDb(); //load configuration from db load data from core_config_data into our configuration: 1. We add data about websites (see core_website table) 2. We add data about stores for the existing websites (see core_store table) 3. We add data from core_config_data according to the scope a. Create block first b. Then create block c. And, finally - d. Each iteration replaces data from more general area of the scope with more specific one
34
What are the common methods with which the framework accesses its configuration values and areas?
getStoreConfig() getStoreConfigFlag(), getStore()-> getConfig(); getConfig()-> getNode();
35
Which class runs total models processing?
``` Class Mage_SalesRule_Model_Validator Method process() applies and processes rules for each item of total models. Basically, rules are sorted by the priority and Magento applies rule by rule for each item ```
36
What configuration parameters are available for event observers?
``` type (model, object, none, singleton), class (class name of observer), method (method to invoke) ```
37
What is the structure of event observers, and how are properties accessed therein?
- for checkout/cart after adding product, Mage::dispatchEvent('checkout_cart_product_add_after', array('quote_item'=>$result, 'product'=>$product)); to call, $observer->getEvent()->getQuoteItem() and $observer->getEvent()->getProduct()
38
What configuration parameters are available for cron jobs?
cron_expr to schedule | and model to run, with method name
39
Explain lifecycle of a Block?
prepareLayout() called when after layout added to block _beforeToHtml() called before block rendered HTML _afterToHtml() called after a block's HTML content is generated. _beforeChildToHtml() called when a parent renders one of its children (through getChildHtml().
40
What is the difference between payment method and payment classes (such as order_payment, quote_payment, etc.)?
Payment model is an abstract of an instance of payment method and it works with database. Payment model can be: Mage_Sales_Model_Order_Payment or Mage_Sales_Model_Quote_Payment - tables sales_flat_order_payment and sales_flat_quote_payment. Quote_Payment doesn't have any method to process an order.
41
Which method is used for translating strings, and on which types of objects is it generally available?
Class Mage_Core_Helper_Abstract Method : underscore, underscore __() Translation is done in helper objects
42
What is the difference between "pay" and "capture" operations?
pay() - Registers payment and update self totals from the invoice capture() - Requires an invoice. If none is specified, will automatically prepare an invoice for order Updates transactions hierarchy, if required Updates payment totals, updates order status and adds proper comments
43
Which classes and methods are responsible for credit card operations (for example authorization or capturing)?
``` Class Mage_Payment_Model_Method_Cc Class Mage_Payment_Model_Method_Abstract: Methods authorize() and capture() ```
44
Which classes are involved, and which tables are used to store refund information?
Class: Mage_Sales_Model_Order_Creditmemo* Table: sales_flat_creditmemo*
45
How does Magento process taxes when refunding an order?
tax get refunded with order