How to show/hide template path hints of admin panel/backend in magento
How to show/hide template path hints of admin panel/backend in magento To show template path hints in admin panel of magento you need to login to your phpmyadmin then run the following sql command INSERT INTO core_config_data (scope, scope_id, path, value) VALUES ('default', 0, 'dev/debug/template_hints', 1), ('default', 0, 'dev/debug/template_hints_blocks', 1) To hide template path hints of admin panel or backed just run the top code by changing 1 to 0, then the template path hints will be hide. You also can run the following sql command to ......
How to get all products from a particular category id in magento
How to get all products from a particular category id in magento While i was working on magento ,I had one requirement that how to get all product under a particular category id.I got the id of that particular category.Now I wrote the following code to get all product under that category id. My category id is <?php $catid=10 ;?> I go all product by writing the below code <?php $category = new Mage_Catalog_Model_Category(); $category->load($catid); //My cat id is 10 $prodCollection = $category->getProductCollection(); foreach ($prodCollection as $product) { $prdI......
How to get all Sub-category list by a main category Id in magento
How to get all Sub-category list by a main category Id in magento How to see all category and subcategory menu in Magento By default there is a top.phtml file in magento which show all category and subcategory .To modify menu display style it needs to modify in core file whcih will create problem to Update magento in future,So without touching the core file we can access all category and subcategory in magento. For that we will write the code in top.phtml file <?php foreach ($this->getStoreCategories() as $_category): ?> <li> <a href="https://aniscart......
How to get access of magento core functions from outside the magento directory
This is the very important thing in magento while accessing data from outside of the magento, You also can use it to set cron job of any magento function, as cron job doen't work properly in magento. require_once 'app/Mage.php'; // if your are not root folder then write the proper path like publichtml/magento/app/Mage.php Mage::app('default'); Now you can create object of any classes and can access methods of those classes also. Like the Below example $obj = new Mage_Checkout_Model_Observer(); echo $obj->salesQuoteSaveAfter(); ......
How to get all cart items from cart session in magento
How to get all cart items from cart session in magento This is one of the most usefull features for all magento developers.As it's very necessary while anybody working on Magento cart or checkout page.To get all cart item from cart session write the below code $session= Mage::getSingleton('checkout/session'); foreach($session->getQuote()->getAllItems() as $item) { $productid = $item->getProductId(); $productsku = $item->getSku(); $productname = $item->getName(); $productqty = ......
How to Remove Product from cart on checkout page or by coding in magento
From magento cart you can delete product by clicking on delete button from cart page , but if you wish to delete any cart item in checkout page or by coding then you have write $session= Mage::getSingleton('checkout/session'); $quote = $session->getQuote(); $cart = Mage::getModel('checkout/cart'); $cartItems = $cart->getItems(); foreach ($cartItems as $item) { $quote->removeItem($item->getId())->save(); } By writing the above code your all cart item will be delete.If you wish to delete a particular product from the cart session then ......
How to send Email in magento
Any body can send mail using php mail() function.But in magento all the functionality has wriiten you need to just send argument inside those functions. See the following code to send mail using magento function <?php $mail = Mage::getModel('core/email'); $mail->setToName('Your Name'); $mail->setToEmail('Youe Email'); $mail->setBody('Mail Text / Mail Content'); $mail->setSubject('Mail Subject'); $mail->setFromEmail('Sender Mail Id'); $mail->setFromName("Msg to Show on Subject"); $mail->setType('htm......
get skin url, get js url, get media url, get store url ,get base url in magneto
These are the following methods to get Magento Base Url, Magento Skin Url, Magento Media Url, Magento Js Url.to get all write the following code Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK); or you can write $this->getUrl(); e.g:- http://yoursite.com/index.php/ Get Magento Media Url Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA); e.g:- http://yoursite.com/media/ Get Magento Skin Url Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN); or you can write $this->getSkinUrl(); e.g:- http://yoursite.com/skin/ Get Magento Store Ur......
JavaScript获取事件对象
IE中事件对象是window的一个属性,在标准DOM中,事件对象是处理函数的一个参数。 测试1: <button id="but">按钮</button> <script type="text/javascript"> var but = document.getElementById("but"); function func(){ var e = window.event || arguments[0]; alert(e.type); } if(window.attachEvent) but.attachEvent("onclick",......
- Page:47/145 1448 Blogs
周日 | 周一 | 周二 | 周三 | 周四 | 周五 | 周六 |
文章分类
- 默认(748)
- 日志(47)
- 感悟(15)
- testIT(4)
- PHP_XML(5)
- PHP(78)
- 明星(1)
- 笑话(31)
- 毕业论文(2)
- 生活(60)
- HTML(11)
- CSS(6)
- 考研(3)
- JS(21)
- 简历(6)
- svn(3)
- 音乐(1)
- 学习(7)
- jQuery(9)
- 英语口语(9)
- 书籍(2)
- magento(258)
- apache(12)
- 创意(4)
- 设计(4)
- 休闲(1)
- IT咨询(11)
- 工作(23)
- ubuntu(21)
- bysoft(1)
- zend(1)
- web(2)
- software(1)
- sql(5)
- 娱乐(5)
- photoshop(3)
- zend framework(2)
- nginx(3)
- 小说(1)
- 名言(1)
- 牛人(1)
- Mysql(6)
- vim(2)
- wordpress(8)
- drupal(1)