How to show stock status in shopping cart in Magento
-
zendnwar
-
February 13, 2015
-
Magento
-
225 Comments
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 disable product tag in Magento
-
zendnwar
-
February 12, 2015
-
Magento
-
0 Comments
Just follow below instruction. System > Configuration > Advanced > Advanced > Mage_Tag – Disable
Continue Reading
Magento review count of product
-
zendnwar
-
February 12, 2015
-
Magento
-
0 Comments
<?php echo $review_count = $_product->getRatingSummary()->getReviewsCount() ?>
Continue Reading
How to add review form in product details page custom tab in Magento
-
zendnwar
-
February 12, 2015
-
Magento
-
0 Comments
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
Product status check in Magento
-
zendnwar
-
February 10, 2015
-
Magento
-
0 Comments
$stock _status = $_product->getStockItem(); if ($stock_status->getIsInStock()) { echo ” in stock”; } else { echo “out of stock”; }
Continue Reading
Revolution of PHP 7: Usage of Return Types and Removal of Artifacts
-
zendnwar
-
January 29, 2015
-
PHP Basic
-
0 Comments
28 January 2015 Boston: As the date for PHP 7’s release is approaching rapidly, the group is working really hard to fix certain issues by removing the artifacts and adding some features. There are several RFCs on which we can discuss and study a lot more. But here, we are just concentrating on the three main points mentioned below. PHP 5.7 …
Continue Reading
Zend Certificate Sample Question
-
zendnwar
-
January 14, 2015
-
Zend basic
-
196 Comments
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
Get Category URL from Category ID in Magento
-
zendnwar
-
January 9, 2015
-
Magento
-
1 Comment
Very simple job, just follow below code $cat_id = 3; // predefined category ID echo cat_url = Mage::getModel(“catalog/category”)->load($cat_id)->getUrl();
Continue Reading
Magento Events List
-
zendnwar
-
January 7, 2015
-
Magento
-
0 Comments
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
-
zendnwar
-
December 24, 2014
-
Magento
-
0 Comments
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