How to Select Option Value in javascript Via?

Hi Below Code useful for yours Enjoy.
<script language=”javascript” type=”text/javascript”>
// For Option Value Selected in javascript Via

var myselect=document.getElementById(“myList”)
for (var i=0; i<myselect.options.length; i++){
myselect.options[i].selected=false;
//alert(“Selected Option’s index: “+i);
/* if (myselect.options[i].selected==true){
alert(“Selected Option’s index: “+i)
break
}*/
}
myselect.options[1].selected=true;
</script>

this is one of my method in javascript via options selection.

How to View Single Product URL Product ID via in Magento?

Hi below code for single product url. When you pass the query string in your url. You can use below code for single product url. Or you can put product id also here working fine.
<?php
$_productCollection=$this->getLoadedProductCollection();
$_helper = $this->helper(‘catalog/output’);

//Jai Write Below Code for Product id via getting Product URL Start

//redirect to old Product
if(isset($_GET[‘product_id’])){
$product_id = $_GET[‘product_id’];

$cProduct = Mage::getModel(“catalog/product”);
$cProduct->load($product_id);
//echo $cProduct->getImageUrl().”<br />”;
$currentProductURL = $cProduct->getProductUrl();
//echo $currentProductURL.”<br />”;

echo “<script type=’text/javascript’ language=’javascript’>window. location='”.$currentProductURL.”‘;</script>”;

}
//Jai Write Below Code for Product id via getting Product URL Start
?>

I have small knowledge in magento. So, I more then 3 hours spent for this code getting. If anyone find this post. This is useful for you.

thanks.

How to Add Advanced Search in Magento?

First You go Admin Side.

1. Select your catalog ==> Manage Attributes ==> Edit Attributes
2. Then Frontend Properties Use in Advanced Search is YES or NO

now you can see the frontend advanced search tab.

And one more update you can use below link for categories added in advanced search.
http://www.magentocommerce.com/wiki/5_-_modules_and_development/search_and_advanced_search/how_to_add_search_by_category_to_advanced_search

that is all.

How to javascript hide and show option in via checkbox ?

You just put below code in your template style :

// Checked for Display Div Start
function fnchecked(blnchecked){
if(blnchecked){
document.getElementById(“webAddress”).style.display = “block”;
document.getElementById(“wwebAddress”).style.display = “block”;
document.getElementById(“wwebAddress”).style.height = “20px”;
//document.getElementById(“customers_wwebaddress”).value = “”;
}
else{
document.getElementById(“webAddress”).style.display = “none”;
document.getElementById(“wwebAddress”).value = “”;
document.getElementById(“wwebAddress”).style.display = “none”;
document.getElementById(“wwebAddress”).style.height = “0.1em”;
}
}

Finally call that function below textbox inside :

<input type=”text” onclick=”fnchecked(this.checked);” />

How to replace text in sql query via?

UPDATE subscribers SET email_format = replace(email_format,”TEXT”,”HTML”)

How to Add New Page in Zencart?

Hi this is take some more steps. You follow  very carefully.

1.  C:your_folderincludestemplatesyour_templatetemplatesyour_file.php
2.  C:your_folderincludesfilenames.php –>(Here mention your file name)
3.  C:your_folderincludesmodulespagesyour_page_folder –>(This Your Page Folder, You create here you header and script file also)
4.  C:your_folderincludeslanguagesenglishbusiness_edit.php

This is for the stapes in your page creation. If i found more information i can inform you.

How to Solve Error in Magento – The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later?

“The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later”

You find above error. You Have two Problem.

1. First you check server Side. And ask him.

2. Next you check your root folder any “maintenance.flag” file is there. If you find that file. Kindly remove or rename. Your server will work good. This is when set your server maintenance mode. This file automatically create in root folder. Then this redirect all files in 503 error page in side.

How to view Page Expert only in WP?

Hi People this is used for wp page excerpt only view.
<?php
$page_name = array(134,4754,4750); // 123 should be replaced with a specific Page’s id from your site, which you can find by mousing over the link to edit that Page on the Manage Pages admin page. The id will be embedded in the query string of the URL, e.g. page.php?action=edit&post=123.

$content_data1 = get_page( $page_name[0] );
$content_data2 = get_page( $page_name[1] );
$content_data3 = get_page( $page_name[2] ); // You must pass in a variable to the get_page function. If you pass in a value (e.g. get_page ( 123 ); ), WordPress will generate an error.

//Content Expert only view
echo $content_data1->post_excerpt;
?>

It is worked for me. Try your side.

<?php
$page_name = array(134,4754,4750); // 123 should be replaced with a specific Page’s id from your site, which you can find by mousing over the link to edit that Page on the Manage Pages admin page. The id will be embedded in the query string of the URL, e.g. page.php?action=edit&post=123.

$privateCoaching_data = get_page( $page_name[0] );
$facebook_data = get_page( $page_name[1] );
$newsletter_data = get_page( $page_name[2] ); // You must pass in a variable to the get_page function. If you pass in a value (e.g. get_page ( 123 ); ), WordPress will generate an error.
?>

How to avoid li bottom extra space in IE7?

You Just Avoid Space for li.

This is rank for IE 7 :
<ul>
<li>First</li>
<li>Second</li>
</ul>


You can use this code solve your problem :
<ul>
 <li>First</li><!--
--><li>Second</li><!--
--><li>Three</li>
</ul>

(OR)
<ul>
<li>First</li
><li>Second</li
><li>Three</li>
</ul>

(OR)
<ul><li>First</li><li>Second</li><li>Three</li></ul>

This is solved unwanted bottom space.

How to View Magneto SKU Number in Cart & Page View?

1. You Want cart page to view the SKU number :
You can use below code in your : app/design/frontend/youtheme/yourtheme/template/checkout/cart.phtml
<?php echo $this->__(‘SKU Number’) ?>

And add item section this : app/design/frontend/youtheme/yourtheme/template/checkout/cart/item/default.phtml
<?php echo $_item->getSku() ?>

2. You want to view the Page View :

app/design/frontend/youtheme/yourtheme/template/catalog/product/view.phtml
<!– Write SKU –>
<?php echo $this->__(‘SKU Number :’); ?> <?php
$sku = Mage::getModel(‘catalog/product’)->load($_product->getId())->getSku();
echo $sku; ?>
<!– Sku End –>

its is working for my side.

© 2020 Spirituality