Tag: CSS

30
Sep

Active Menu

Active Menu Java Script <script> function selected(obj){ var lilist = document.getElementById(‘menu’); var alist = lilist.getElementsByTagName(‘a’); for (i=0; i<alist.length; i++ ) { alist[i].className=””; } obj.className=”red”; } </script> Style <style> .red { color:red; background:#F39; width:150px; } HTML <ul id=”menu”> <li><a href=”#” onClick=”selected(this)”>Home</a></li> <li><a href=”#”  onClick=”selected(this)”>About Us</a></li> <li><a href=”#”  onClick=”selected(this)”>Our Products</a></li> <li><a href=”#” onClick=”selected(this)”>Trade Offers</a></li> <li><a href=”#”  onClick=”selected(this)”>Contact Us</a></li> </ul>

12
Jul

How to change shipping rate in Percent

How to change shipping rate in Percent app/code/core/Mage/Shipping/Model/Carrier/Flatrate.php find line $method->setPrice($shippingPrice); and put following code above that line      $session        = Mage::getSingleton(‘checkout/session’);             $quote_id       = $session->getQuoteId();             $item_quote     = Mage::getModel(‘sales/quote’)->load($quote_id);             $shippingPrice  = $item_quote->getSubtotal()*($this->getConfigData(‘price’)/100);  

12
Jul

To Show Custom Option , configuration option , quantity in list page.

To Show Custom Option , configuration option , quantity in list page. Put the code in place of where add to cart is now: <?php echo $this->helper(‘checkout’)->formatPrice($_product->getFinalPrice()) ?> <form action=”<?php echo Mage::getBaseUrl(); ?>checkout/cart/add/” method=”post” style=”display:block; clear:both;”> <?php $product = Mage::getModel(‘catalog/product’); $product->load($_product->getId()); //print_r($product); //exit(); $xml = “”; $hasAtts = 0; // configurable products $productType = $product->getTypeId(); if($productType == “configurable”) { //

Read more

11
Jul

Custom Menu In Magento

Custom Menu In Magento <?php         $root_category = Mage::getModel(‘catalog/category’)->load(3); // Put your root category ID here.         $subcategories = $root_category->getChildren();   foreach(explode(‘,’,$subcategories) as $subcategory) {         $category = Mage::getModel(‘catalog/category’)->load($subcategory);         echo ‘<a href=”‘.$category->getURL() .’” />’.$category->getName().'</a><br/>’;   }   ?>

11
Jul

Add Page In Navigation Menu

Add Page In Navigation Menu 1 Go To CatalogèManage Categories=> Add Sub Categories====note the categories ID 2 Go to CMS èPage => add New Page=====note the the url  key 3 Got To CatalogèURL Rewrite Management=> find Category Id and open store ==note the Request Path and delete this category 4Go toè add url Rewrite => select custom=>ID path– categories ID(1

Read more

22
May

PHP Interview Quesition & Answer

1.Explain how to submit form without a submit button in PHP? A form can be submitted in various ways without using submit button. Submitting a form by selecting an option from drop down box with the invocation of onChange event Using java script : document.form.submit(); Using header(“location:page.php”); 2.How can we increase the execution time of a php script? Default time

Read more