Magento Image Uploading not working in admin side?

Hi,

Just one small change file permission for catalog directory “777”.

its working. First you can do this file permission in ftp. Then you can think another way.

thanks.
www.srinesiga.com

How to find Magento Database name after installation?

Hi guys,

1. you go to ftp
2. Login your Domain
3. Go to app–>etc–>local.xml

There you can see below code there your database details stored.

<connection>
<host><![CDATA[yourhost]]></host>
<username><![CDATA[username]]></username>
<password><![CDATA[password]]></password>
<dbname><![CDATA[dbname]]></dbname>

</connection>

that’s all.

Simple coment hide script for WordPress Site?

<script type=”text/javascript” language=”javascript”>

//alert(document.getElementById(‘comments’));

var comLength = document.getElementById(“comments”).innerHTML;

/*alert(comLength);

alert(comLength.length);*/

if(comLength.length == “0”){

//alert(‘test’);

document.write(‘<style type=”text/css”>#comments{display:none;}</style>’);

}

else{

document.write(‘<style type=”text/css”>#comments{display:block;}</style>’);

//alert(“Test Else”+comLength.length);

}

</script>

How to find URL Path via php?

$url = $_SERVER[“SERVER_NAME”].”:”.$_SERVER[“SERVER_PORT”].$_SERVER[“REQUEST_URI”];
$URLpath = parse_url($url, PHP_URL_PATH);
$catPathAraay = explode(“-“, $URLpath);
$catPath = $catPathAraay[2];
//echo $catPath;

the above code find particular url path.

how to create zencart page?

You can Add Just Below Instruction.

Add Header.php

And Add
includestemplatesnew_templatetemplatestpl_hereYourFile.php

And more Details Here : http://www.zen-cart.com/wiki/index.php/Creating_new_pages

http://lifefeed.net/zencart/static_page.php

http://tutorials.zen-cart.com/index.php?article=142

http://tutorials.zen-cart.com/

http://www.radebatz.net/mano/2007/07/17/howto-creating-static-pages/

http://tutorials.zen-cart.com/index.php?article=117

http://www.zen-cart.com/forum/showthread.php?t=128705

enjoy.

How to create 3 column or Row Latest Post Via WP?

Hi,

Below code useful for all this is very nice one in WordPress.
<div>
<h2>Latest News</h2>
<?php
//$args = array(‘orderby’ => ‘date’, ‘numberposts’ => 3, ‘category’ => 6, ‘order’=> ‘DESC’); //This Categories wise latest post display
$args = array(‘orderby’ => ‘date’, ‘numberposts’ => 3, ‘order’=> ‘DESC’); // This all post display
$postslist = get_posts( $args );
$i; //This is counting the iteam purpose using
foreach ($postslist as $post) :  setup_postdata($post);
$i++; // This is increasing howmany foreach going that is purpose using.
?>
<div>
<h2><a href=”<?php echo get_permalink($page->ID); ?>”><?php the_title(); ?></a></h2>
<?php //the_date(); ?>
<?php //echo get_the_post_thumbnail($page->ID, ‘thumbnail’);?>
<?php echo get_the_post_thumbnail($page->ID, ‘full’); ?>
<?php the_excerpt(); ?>
</div>
<?php endforeach; ?>
</div><!– Latest News Container End –>

How to solve this WordPress not Loading OR Server not found?

1. You can go your network settings.

2. There you can set you IP Address And

3. Your Default Gateway settings.

4. Then you come and refresh you browser work well in your domain tools.

Now your wordpress.org view and other wordpress.org related site view very good.

How to solve this : You don’t have permission to access /phpmyadmin/ on this server

Just go to your Wamp Directory insder “c:/wamp/alias/phpmyadmin.conf” — This path.

Here you can check this <Directory “c:/wamp/apps/phpmyadmin3.4.5/”> the phpmyadmin version is same in your c:/wamp/apps/

Then you see this file
1. AllowOverride All
2. “Deny from all” to “Allow from all”
3. “Order Deny,Allow” to “Order Allow,Deny”

that is all. Now its working. If this is not working then you go to check your ISS part.

How to get Current Page URL in via PHP?

<?php
function curPageURL() {
$pageURL = ‘http’;
if ($_SERVER[“HTTPS”] == “on”) {$pageURL .= “s”;}
$pageURL .= “://”;
if ($_SERVER[“SERVER_PORT”] != “80”) {
$pageURL .= $_SERVER[“SERVER_NAME”].”:”.$_SERVER[“SERVER_PORT”].$_SERVER[“REQUEST_URI”];
} else {
$pageURL .= $_SERVER[“SERVER_NAME”].$_SERVER[“REQUEST_URI”];
}
return $pageURL;
}

$url =  curPageURL();

//print_r(parse_url($url));

$URLpath = parse_url($url, PHP_URL_PATH);

$langPathAraay = explode(“/”, $URLpath);
$langPath = $langPathAraay[1];
//echo $langPath;

if($langPath == ‘agd_nl’){
//echo “here”;
echo $this->getLayout()->createBlock(‘catalog/product_list’)->setRowCount(1)->setCategoryId(108)->setTemplate(‘catalog/product/list.phtml’)->toHtml();
}
else if($langPath==”agd_be”){
echo $this->getLayout()->createBlock(‘catalog/product_list’)->setRowCount(1)->setCategoryId(98)->setTemplate(‘catalog/product/list.phtml’)->toHtml();
}
else if($langPath==”agd_befr”){
echo $this->getLayout()->createBlock(‘catalog/product_list’)->setRowCount(1)->setCategoryId(98)->setTemplate(‘catalog/product/list.phtml’)->toHtml();
}
else if($langPath==”agb_de”){
echo $this->getLayout()->createBlock(‘catalog/product_list’)->setRowCount(1)->setCategoryId(105)->setTemplate(‘catalog/product/list.phtml’)->toHtml();
}
else if($langPath==”agb_fr”){
echo $this->getLayout()->createBlock(‘catalog/product_list’)->setRowCount(1)->setCategoryId(106)->setTemplate(‘catalog/product/list.phtml’)->toHtml();
}
else if($langPath==”agb_gb”){
echo $this->getLayout()->createBlock(‘catalog/product_list’)->setRowCount(1)->setCategoryId(107)->setTemplate(‘catalog/product/list.phtml’)->toHtml();
}
else{
echo $this->getLayout()->createBlock(‘catalog/product_list’)->setRowCount(1)->setCategoryId(108)->setTemplate(‘catalog/product/list.phtml’)->toHtml();
}
?>

How to view Sub Categories only in Parent Categories from Magento?

<?php
$obj = new Mage_Catalog_Block_Navigation();
$current_cat     = $obj->getCurrentCategory();

$currentCatId    = (is_object($current_cat) ? $current_cat->getId() : ”);

$currentPage = (int) $this->getRequest()->getParam(‘p’, 1);
//$currentPage = $_GET[‘p’];

$pageSize = 3;

$collection = Mage::getModel(‘catalog/category’)->getCollection()
->addAttributeToFilter(‘parent_id’, $currentCatId)
->addAttributeToSelect(‘name’)
->addAttributeToSelect(‘url’)
->setLoadProductCount(1)
->setOrder(‘name’, ‘asc’)
->setPage($currentPage, $pageSize);

$totCat = $collection->getSize();
$store_cats = $collection->load();

$pageTot = ceil( $totCat / $pageSize );

?>
<div>
<ul class=’navigation’>
<?php foreach ($store_cats as $cat) : ?>
<li><a href=”<? echo $cat->getUrl() ?>”><?php echo $cat->getName() . ” (” . $cat->getProductCount() . “)” ?></a>
<?php echo $cat->getImageUrl(); ?>
</li>
<?php endforeach; ?>
</ul>

</div>

<ul>
<?php for ( $i=1; $i<=$pageTot; $i++ ) : ?>
<?php if ( $i == $currentPage ) : ?><li><?php echo $i ?></li><?php else : ?><li><a href=”<?php echo $current_cat->getUrl() ?>?p=<?php echo $i ?>”><?php echo $i ?></a></li><?php endif; ?>
<?php endfor; ?>
</ul>

And Just Put below code in your CMS (or) Static Block page inside.
{{block type=”catalog/navigation” name=”catalog.categories” alias=”all_categories_homepage” template=”catalog/navigation/category_listing.phtml”}}

© 2020 Spirituality