SearchRecent posts
The Random ToolboxDrupal 7 Setting up variables for use in a template (preprocess and process functions) Rendering Drupal 7 fields (the right way) Linux Secure Copy (scp) command Restrict Free Shipping in Magento Quickbooks Text Connection Ticket Cross-Site Request Forgery (CSRF) jQuery Events: MouseOver / MouseOut vs. MouseEnter / MouseLeave Monthly archive
|
MagentoHow to Uninstall a Module in Magento - Reinstall Magento Module and Run Install ScriptIf you want Magento to reinstall the module and re-run any database setup, take a look at the core_resource table. Delete your module from this table and DROP any tables that the module had created. Clear Magento’s cache and the module will re-install. The mysql4-install-X.X.X.php files will only be run once by Magento. By changing the version value in your XML config (Namespace/Module/etc/config.xml), you’re telling Magento which install file it should use: Add a Link to Admin Menu or Sub-menu in Magento Module<?xml version="1.0"?> <config> <menu> <tutorial_menu translate="title" module="custompricing"> <title>Custom Pricing Reports</title> <sort_order>9999</sort_order> <children> <first_page module="custompricing"> <title>Our First Page</title> <action>custompricing/index/index</action> </first_page> </children> </tutorial_menu> <system> <children> <another_menu_from_us> <title>Here Too!</title> <sort_order>9999</sort_order> <action>custompricing/index/ind Custom Add to Cart button on CMS Page in MagentoMagento provides an easy way of adding products to shopping cart via query string. To create a simple add to cart button on any magento’s CMS page open it in WYSIWYG editor and the following HTML to its contents: <button onclick=”location.href =’{{config path=”web/unsecure/base_url”}}/checkout/cart/add?product=1&qty=1′”> Buy It Now</button> Save the page and refresh the cache. Now if you open the page in you should be able to see “Buy It Now” button. When clicked it adds 1 product with ID=1 to your shopping cart. Magento Checkout Success Page - Order Details, Product Price, SKU retrival<?php $_customerId = Mage::getSingleton('customer/session')->getCustomerId(); $lastOrderId = Mage::getSingleton('checkout/session')->getLastOrderId(); $order = Mage::getSingleton('sales/order'); $order->load($lastOrderId); $_totalData =$order->getData(); $_sub = $_totalData['subtotal']; //USD ==> global_currency_code,base_currency_code order_currency_code //print_r($order); print_r($_totalData); $_order = $this->getOrder(); $allitems = $order->getAllItems(); $index = 1; $data = "";//Needed format ==> &ITEM1=3 |