Check home page URL in magento

Magento
Check current page is home page in magento If you want to check current page is home page or not in magneto below code is helpful to you. [php] <?php if( Mage::getSingleton('cms/page')->getIdentifier() == 'home' && Mage::app()->getFrontController()->getRequest()->getRouteName() == 'cms' ) : ?> [/php] The other way you can check current page is home page or not in magento [php] <?php if($this->getUrl('') == $this->getUrl('*/*/*', array('_current'=>true, '_use_rewrite'=>true))): echo "Homepage"; else: echo "Not in Homepage"; endif; ?> [/php] [JWD-Magento-Development]
Read More

Call to undefined method Mage_Adminhtml_Block_Widget::getrowurl

Magento
If you install new magento or upgrade your magento with latest version or you got the error like below: Fatal error: Call to undefined method Mage_Adminhtml_Block_Widget::getrowurl() in C:\xampp\htdocs\magento\app\code\core\Mage\Adminhtml\Block\Widget\Grid.php on line 1622 Read this for the solution that workes for me: Go To app/code/core/Mage/Adminhtml/Block/Widget/Grid.php Look at on line no 1620 on magento 1.5.01 public function getRowUrl($item) { $res = parent::getRowUrl($item); return ($res ? $res : '#'); } And replace this line $res = parent::getRowUrl($item); to $res = parent::getUrl($item); So your new function look like this: public function getRowUrl($item) { $res = parent::getUrl($item); return ($res ? $res : '#'); } [JWD-Magento-Development]
Read More

How to Use PHP to Obtain Stock Quotes from Yahoo Finance

PHP
Yahoo! Finance is a very useful resource for both analysts and programmers alike. A PHP library is created by saving the function into a text file - in this example the library is going to be called yahoo_finance.php and this will contain a single function: [php] <?php function show_stock_quotes ($stock_list) { //The function will, by default, return the details of some of the stock markets: if (! $stock_list) { $stock_list = "^IXIC,^DJA,^NIN,^FTSE"; } //The function will then use either an input list or the default list to create the correct url: $url = "http://quote.yahoo.com/d/quotes.csv?s=". $stock_list . "&f=nl1c1&e=.csv"; //and then read in the data stream from the Yahoo! Finance web site: $filesize = 2000; $handle = fopen($url, "r"); $raw_quote_data = fread($handle, $filesize); fclose($handle); //The data will be in the format: "BSE-100",4.37,0.47…
Read More

Install wordpress in blog name subdirectory

Wordpress
Wordpress not allow installing wordpress into subdirectory name with blog. Here are some step to remove this restrictions. WordPress hook directory : subdirectory_reserved_names Wp-admin/ms-edit.php line no:154 //$subdirectory_reserved_names = apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'blog', 'files', 'feed' ) ); $subdirectory_reserved_names = apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'files', 'feed' ) ); Wp-includes/ms-functions.php line no:516 //$subdirectory_reserved_names = apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'blog', 'files', 'feed' ) ); $subdirectory_reserved_names = apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'files', 'feed' ) ); OR Wp-includes/ms-functions.php on line 559 if (! is_subdomain_install() ) //$illegal_names = array_merge($illegal_names, apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'blog', 'files', 'feed' ) ) ); $illegal_names = array_merge($illegal_names, apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'files', 'feed' ) ) );   Wp-includes/ms-settings.php Line no: 73 //$reserved_blognames = array( 'page', 'comments', 'blog', 'wp-admin', 'wp-includes', 'wp-content', 'files', 'feed' ); $reserved_blognames =…
Read More

Magento Bug Call to a member function loadPriceData

Magento
Magento 1.5.0.1 Bug: Call to a member function loadPriceData() on a non-object Please do follow steup for solve this error: Open app\code\core\Mage\Catalog\Model\Product\Attribute\Backend\Tierprice.php Comment out lines from 202 to 219 Error:Fatal error: Call to a member function loadPriceData() on a non-object in E:\wamp\www\magento\app\code\core\Mage\Catalog\Model\Product\Attribute\Backend\Tierprice.php on line 202 [htmlscript] <?php /* $data = $this->_getResource()->loadPriceData($object->getId(), $websiteId); foreach ($data as $k => $v) { $data[$k]['website_price'] = $v['price']; if ($v['all_groups']) { $data[$k]['cust_group'] = Mage_Customer_Model_Group::CUST_GROUP_ALL; } } if (!$object->getData('_edit_mode') && $websiteId) { $rates = $this->_getWebsiteRates(); $full = $data; $data = array(); foreach ($full as $v) { $key = join('-', array($v['cust_group'], $v['price_qty'])); if ($v['website_id'] == $websiteId) { $data[$key] = $v; $data[$key]['website_price'] = $v['price']; } else if ($v['website_id'] == 0 && !isset($data[$key])) { $data[$key] = $v; $data[$key]['website_id'] = $websiteId; if ($object->getPriceModel()->isTierPriceFixed()) { $data[$key]['price'] = $v['price'] * $rates[$websiteId]['rate']; $data[$key]['website_price'] =…
Read More

iDeal Payment Integration

PHP
What is iDEAL? iDEAL Payment Integration is a standardized payment method for making secure online payments directly between bank accounts. To offer iDEAL as a payment method in an online store, a direct link is established with the systems of participating banks. In other words, this one connection to iDEAL enables each webshop’s visitor with access to online banking of ABN AMRO, ASN Bank, Friesland Bank, ING, Rabobank, RegioBank, SNS Bank, Triodos Bank or Van Lanschot Bankiers to make payments in this way. No other payment product offers this facility. iDEAL is steadily gaining a reputation as a trusted online payment method. Already more than half of all Dutch online shoppers use iDEAL. How does iDEAL work? iDEAL Payment Integration is easy to use and requires just a few simple…
Read More

Easily manage or publish multisite using worpress

Wordpress
Please look at below step for create multi site mode: Install WordPress and install as a normal WordPress. Add define('WP_ALLOW_MULTISITE', true); near the top of wp-config.php Log into the admin go to the tools/Network menu. If it asks you to deactivate all plug-ins do so otherwise go straight ahead and set up multi sites as sub-domains and fill in the other details as needed as needed. Make a note of the changes needed to wp-config.php and .htaccess and make the changes. You should now be in multi-site mode. [JWD-Wordpress-Development]
Read More