Blog: Extra-ordinary

How to show stock status in shopping cart in Magento

It is very simple. Please add a <th> Stock Status </th> filed in default\template\checkout\cart.phtml and go to \default\template\checkout\cart\item\default.phtml <?php $_product= Mage::getSingleton(‘catalog/product’)->load($_item->getProductId()); ?> <td class=”a-center”> <span calss=”stock-cart”>  <?php $qty = $_product->getStockItem()->getQty(); if($qty > 0){ echo “In stock”; }else{ echo “Out of stock”; } ?></span> </td> Hope so it will work.

Continue Reading

How to add review form in product details page custom tab in Magento

Please add below code in your local.xml .  This file system for Magento EE. <catalog_product_view> <!–Product Information Block–> <reference name=”root”> <reference name=”product.info”> <block type=”review/product_view_list” name=”product.info.product_additional_data” as=”product_additional_data_review” template=”review/product/view/list.phtml” /> <block type=”review/form” name=”product.review.form” as=”review_form” /> </reference> </catalog_product_view>   call below code in your product view file. <?php echo $this->getChildHtml(‘review_form’) ?> <?php echo $this->getChildHtml(‘product_additional_data_review’) ?>  

Continue Reading

Zend Certificate Sample Question

Question No : 1 Fill in the blank with the appropriate PHP function. The_____________ function is used to replace the current session id with the new session id, and to keep information of the current session. A. session_regenerate_id() Question No : 2 Celina works as a Database Administrator for Tech Mart Inc. The company uses an Oracle database. The database …

Continue Reading

Magento Events List

Magento uses a fantastic event hooking system, following the Observer Design Pattern, allowing additional functionality to be plugged in and out without modifying the core code. Core File Line Event /app/code/core/Mage/Admin/Model/Session.php 104 admin_session_user_login_success /app/code/core/Mage/Admin/Model/Session.php 112 admin_session_user_login_failed /app/code/core/Mage/Admin/Model/User.php 337 admin_user_authenticate_before /app/code/core/Mage/Admin/Model/User.php 354 admin_user_authenticate_after /app/code/core/Mage/Adminhtml/Block/Api/User.php 52 api_user_html_before /app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Attributes.php 160 adminhtml_catalog_category_edit_prepare_form /app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tabs.php 157 adminhtml_catalog_category_tabs /app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tree.php 291 adminhtml_catalog_category_tree_is_moveable /app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tree.php 328 adminhtml_catalog_category_tree_can_add_root_category /app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tree.php 348 adminhtml_catalog_category_tree_can_add_sub_category …

Continue Reading

How to Disable All Community Extensions in Magento Quickly

If you want to disable all community extension very quickly please follow below instruction. please go to app/etc/local.xml and add below code hope it will work nicely don’t forget clear the var cache after add below code. If you face any problem please comments I will answer shortly. <disable_local_modules>true</disable_local_modules>  

Continue Reading