Magento

  • warning: Creating default object from empty value in /home1/nate01/public_html/modules/taxonomy/taxonomy.pages.inc on line 33.
  • strict warning: Non-static method view::load() should not be called statically in /home1/nate01/public_html/sites/all/modules/views/views.module on line 1113.
  • strict warning: Declaration of views_handler_field::query() should be compatible with views_handler::query($group_by = false) in /home1/nate01/public_html/sites/all/modules/views/handlers/views_handler_field.inc on line 1147.
  • strict warning: Declaration of views_handler_argument::options_validate() should be compatible with views_handler::options_validate($form, &$form_state) in /home1/nate01/public_html/sites/all/modules/views/handlers/views_handler_argument.inc on line 917.
  • strict warning: Declaration of views_handler_argument::query() should be compatible with views_handler::query($group_by = false) in /home1/nate01/public_html/sites/all/modules/views/handlers/views_handler_argument.inc on line 917.
  • strict warning: Declaration of views_handler_sort::options_validate() should be compatible with views_handler::options_validate($form, &$form_state) in /home1/nate01/public_html/sites/all/modules/views/handlers/views_handler_sort.inc on line 165.
  • strict warning: Declaration of views_handler_sort::options_submit() should be compatible with views_handler::options_submit($form, &$form_state) in /home1/nate01/public_html/sites/all/modules/views/handlers/views_handler_sort.inc on line 165.
  • strict warning: Declaration of views_handler_sort::query() should be compatible with views_handler::query($group_by = false) in /home1/nate01/public_html/sites/all/modules/views/handlers/views_handler_sort.inc on line 165.
  • strict warning: Declaration of views_handler_filter::options_validate() should be compatible with views_handler::options_validate($form, &$form_state) in /home1/nate01/public_html/sites/all/modules/views/handlers/views_handler_filter.inc on line 587.
  • strict warning: Declaration of views_handler_filter::query() should be compatible with views_handler::query($group_by = false) in /home1/nate01/public_html/sites/all/modules/views/handlers/views_handler_filter.inc on line 587.
  • strict warning: Declaration of views_plugin_query::options_submit() should be compatible with views_plugin::options_submit($form, &$form_state) in /home1/nate01/public_html/sites/all/modules/views/plugins/views_plugin_query.inc on line 169.
  • strict warning: Declaration of views_plugin_row::options_validate() should be compatible with views_plugin::options_validate(&$form, &$form_state) in /home1/nate01/public_html/sites/all/modules/views/plugins/views_plugin_row.inc on line 136.
  • strict warning: Non-static method view::load() should not be called statically in /home1/nate01/public_html/sites/all/modules/views/views.module on line 1113.
  • strict warning: Declaration of views_plugin_pager_none::post_execute() should be compatible with views_plugin_pager::post_execute(&$result) in /home1/nate01/public_html/sites/all/modules/views/plugins/views_plugin_pager_none.inc on line 69.

How to Uninstall a Module in Magento - Reinstall Magento Module and Run Install Script

If 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 Magento

Magento 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
Syndicate content