Thứ Ba, 11 tháng 3, 2014

Magento Delete order

magento delete orders magento delete orders magento delete orders magento delete orders magento delete orders magento delete orders magento delete orders magento delete orders magento delete orders magento delete orders

Delete Magento orders

How to delete Magento orders

Magento by default does not provide a function to delete Magento orders. Fortunately, there are many plug-ins are available that would add option to delete Magento orders in grid actions drop-down.

Delete Magento orders
While this decision makes good sense, many users are still in need of this functionality to delete test orders. It’s not simple to delete Magento orders isn’t a simple task. Because you have to remove invoices, creditnotes and shipments firstly that related to order you want to delete. 
I have found a scirpt for that task.
Hope this useful!

<?php
// comment the following two lines before execute shis script
echo 'No access permission';
exit;

$mageFilename = '../app/Mage.php';
require_once $mageFilename;
Varien_Profiler::enable();
Mage::setIsDeveloperMode(true);
ini_set('display_errors', 1);
umask(0);
Mage::app('default');
Mage::register('isSecureArea', 1);

// order increment ID you want to delete. Delete one Order to execute this order once.
$incrementId = 100000037;
  
$order = Mage::getModel('sales/order')->loadByIncrementId($incrementId);
$invoices = $order->getInvoiceCollection();
foreach ($invoices as $invoice){
$invoice->delete();
}
$creditnotes = $order->getCreditmemosCollection();
foreach ($creditnotes as $creditnote){
$creditnote->delete();
}
$shipments = $order->getShipmentsCollection();
foreach ($shipments as $shipment){
$shipment->delete();
}
if ($order->delete()) {
      echo 'the Order of order # ' . $incrementId . ' has been deleted from database.';
} else {
      echo 'Deletion failed.';
}

?>
You also use this script to delete all Magento canceled orders.
$collection = Mage::getResourceModel('sales/order_collection')
            ->addAttributeToSelect('*')
            ->setPageSize(1000)
            ->addFieldToFilter('status', 'canceled')
             ->load();

foreach ($collection as $col) {
  Mage::log($col->getIncrementId() . ' order deleted ');
    try {
         $col->delete();
    } catch (Exception $e) {
        throw $e;
    }
}

Magento Custom Menu

Magento Custom Menu extension helps store-owners create professional magento navigation Menu easily without technical knowledge. Your customers can view and access products and categories just by hovering over the menu.
  • Easy to create Menu using provided templates.
  • Menu Horizontal or Vertical with effects: Hover, animate, toggle
  • Customize the style of menu to fit with your store: width, color, icon, position
  • Not slowing sites like normal Menu extensions
magento custom menu magento custom menu magento custom menu magento custom menu magento custom menu magento custom menu magento custom menu magento custom menu magento custom menu magento custom menu 

 Do you know how long customers stay on web pages? Only 10-20s on average (NNGroup, 2011), whereas you have a variety of products and categories to show. Based on the concept “The less clicks the better”, our Magento Custom Menu extensionmust be the perfect solution, helping your visitors find the information as quickly as possible. Instead of spending much time and effort in coding and designing the menu manually, now there is a huge number of menu templates available for you to select. With this Magento Menu extension, creating and editing menu items and menu bar with a lot of features seems never easier.

Magento menu extension

Magento Mega Menu extension - Benefits

HOW IT WORKS

Magento Mega Menu extension - How it works

FEATURES DETAILED

You can create horizontal or vertical Magento navigation menuMagento Mega Menu extension - Vertical and horizontal menus
As mentioned above, you can conveniently create Magento layered navigation using available templates. To show a menu item as product listing or category listing, you can simply choose a template then select products/ categories to be displayed.Magento Mega Menu extension - Product listing
You are also allowed to set featured products/ categories in Magento dropdown menu content.Magento Mega Menu extension - Set featured products in menu
You can quickly create a menu bar in which menu items are categories of your site.Magento Mega Menu extension - Quickly create menu bar
For each other menu types like Content only, Contact form or Anchor text, we provide various templates for you to select as well.Magento Mega Menu extension - Content Only
Menu effects: Hover, animate, toggle. For example, when Customers hover over a Menu item, a list of your products will be displayed. This feature makes your magento menu more lively and professional.Magento Mega Menu extension - Animation effects (Hover, animate, toggle)
You can freely customize the style of menu such as width, menu color, icon, arrange the position of Menu items. It is also possible to customize the style of menu's content (size, number and position of columns).Magento Mega Menu extension - Menu Style Configuration
While many other Magento Menu extensions interact with database directly, thus slowing your site, Magestore's Custom menu uses generated HTML code of your menu, so it wouldn't affect your site performance.Magento Mega menu extension - Manage Cache

importing configurable products in Magento from CSV

magento import configurable products magento import configurable products magento import configurable products magento import configurable products magento import configurable products magento import configurable products magento import configurable products magento import configurable products magento import configurable products magento import configurable products

importing configurable products in Magento from CSV

I'm trying to append complex data to my database products in Magento ver. 1.7.0.2, some are simple and other configurable. The exported Magento CSV doesn't greet with the needs for importing. I have this file for example for importing data:
 sku,_store,_attribute_set,_type,_category,_root_category,_product_websites,price,special_price,special_from_date,special_to_date,image,media_gallery,news_from_date,news_to_date,url_key,url_path,minimal_price,visibility,custom_design,custom_layout_update,page_layout,options_container,required_options,has_options,image_label,small_image_label,thumbnail_label,created_at,updated_at,enable_googlecheckout,gift_message_available,is_imported,country_of_manufacture,msrp_enabled,msrp_display_actual_price_type,msrp,qty,min_qty,use_config_min_qty,is_qty_decimal,backorders,use_config_backorders,min_sale_qty,use_config_min_sale_qty,max_sale_qty,use_config_max_sale_qty,is_in_stock,notify_stock_qty,use_config_notify_stock_qty,manage_stock,use_config_manage_stock,stock_status_changed_auto,use_config_qty_increments,qty_increments,use_config_enable_qty_inc,enable_qty_increments,is_decimal_divided,_links_related_sku,_links_related_position,_links_crosssell_sku,_links_crosssell_position,_links_upsell_sku,_links_upsell_position,_associated_sku,_associated_default_qty,_associated_position,_tier_price_website,_tier_price_customer_group,_tier_price_qty,_tier_price_price,_group_price_website,_group_price_customer_group,_group_price_price,_media_attribute_id,_media_image,_media_lable,_media_position,_media_is_disabled,_super_products_sku,_super_attribute_code,_super_attribute_option,_super_attribute_price_corr "1202012000009S_freesoul,,PartesDeArriba_Hombre,simple,Hombre/Camisetas,""Default Category"",base,45.0000,,,,/t/n/tn_1202012000009-1_1.jpg,,,,camiseta-freesoul,camiseta-freesoul.html,,1,,,,""Bloque después de la columna de Información"",0,0,""Camiseta Freesoul"",""Camiseta Freesoul"",""Camiseta Freesoul"",""2012-10-05 08:41:01"",""2012-10-05 12:07:06"",1,,No,,""Usar configuración"",""Usar configuración"",,5.0000,0.0000,1,0,0,1,1.0000,1,0.0000,1,1,,1,0,1,0,1,0.0000,1,0,0,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-1_1.jpg,""Camiseta Freesoul"",1,0,,,,"",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-2_1.jpg,""Camiseta para hombre Freesoul"",2,0,,,,""1202012000009M_freesoul,,PartesDeArriba_Hombre,simple,Hombre/Camisetas,""Default Category"",base,45.0000,,,,no_selection,,,,camiseta-freesoul,camiseta-freesoul-58.html,,1,,,,""Bloque después de la columna de Información"",0,0,/,/,/,""2012-10-05 08:41:51"",""2012-10-05 12:07:39"",1,,No,,""Usar configuración"",""Usar configuración"",,5.0000,0.0000,1,0,0,1,1.0000,1,0.0000,1,1,,1,0,1,0,1,0.0000,1,0,0,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-1_1_1.jpg,""Camiseta Freesoul"",1,0,,,,"",espanol,,,,,,,,,,,,,,,camiseta-freesoul.html,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-2_1_1.jpg,""Camiseta para hombre Freesoul"",2,0,,,,""1202012000009L_freesoul,,PartesDeArriba_Hombre,simple,Hombre/Camisetas,""Default Category"",base,45.0000,,,,no_selection,,,,camiseta-freesoul,camiseta-freesoul-59.html,,1,,,,""Bloque después de la columna de Información"",0,0,/,/,/,""2012-10-05 08:43:19"",""2012-10-05 12:08:03"",1,,No,,""Usar configuración"",""Usar configuración"",,5.0000,0.0000,1,0,0,1,1.0000,1,0.0000,1,1,,1,0,1,0,1,0.0000,1,0,0,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-1_1_1_1.jpg,""Camiseta Freesoul"",1,0,,,,"",espanol,,,,,,,,,,,,,,,camiseta-freesoul.html,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-2_1_1_1.jpg,""Camiseta para hombre Freesoul"",2,0,,,,""1202012000009XL_freesoul,,PartesDeArriba_Hombre,simple,Hombre/Camisetas,""Default Category"",base,45.0000,,,,no_selection,,,,camiseta-freesoul,camiseta-freesoul-60.html,,1,,,,""Bloque después de la columna de Información"",0,0,/,/,/,""2012-10-05 08:44:34"",""2012-10-05 12:08:29"",1,,No,,""Usar configuración"",""Usar configuración"",,5.0000,0.0000,1,0,0,1,1.0000,1,0.0000,1,1,,1,0,1,0,1,0.0000,1,0,0,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-1_1_1_1_1.jpg,""Camiseta Freesoul"",1,0,,,,"",espanol,,,,,,,,,,,,,,,camiseta-freesoul.html,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-2_1_1_1_1.jpg,""Camiseta para hombre Freesoul"",2,0,,,,""1202012000009XXL_freesoul,,PartesDeArriba_Hombre,simple,Hombre/Camisetas,""Default Category"",base,45.0000,,,,no_selection,,,,camiseta-freesoul,camiseta-freesoul-61.html,,1,,,,""Bloque después de la columna de Información"",0,0,/,/,/,""2012-10-05 11:39:42"",""2012-10-05 12:08:52"",1,,No,,""Usar configuración"",""Usar configuración"",,5.0000,0.0000,1,0,0,1,1.0000,1,0.0000,1,1,,1,0,1,0,1,0.0000,1,0,0,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-1_1_1_1_1_1.jpg,""Camiseta Freesoul"",1,0,,,,"",espanol,,,,,,,,,,,,,,,camiseta-freesoul.html,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-2_1_1_1_1_1.jpg,""Camiseta para hombre Freesoul"",2,0,,,,""12020120000093XL_freesoul,,PartesDeArriba_Hombre,simple,Hombre/Camisetas,""Default Category"",base,45.0000,,,,no_selection,,,,camiseta-freesoul,camiseta-freesoul-62.html,,1,,,,""Bloque después de la columna de Información"",0,0,/,/,/,""2012-10-05 11:41:45"",""2012-10-05 12:09:15"",1,,No,,""Usar configuración"",""Usar configuración"",,5.0000,0.0000,1,0,0,1,1.0000,1,0.0000,1,1,,1,0,1,0,1,0.0000,1,0,0,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-1_1_1_1_1_1_1.jpg,""Camiseta Freesoul"",1,0,,,,"",espanol,,,,,,,,,,,,,,,camiseta-freesoul.html,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-2_1_1_1_1_1_1.jpg,""Camiseta para hombre Freesoul"",2,0,,,,""1202012000009_freesoul,,PartesDeArriba_Hombre,configurable,Hombre/Camisetas,""Default Category"",base,45.0000,,,,/t/n/tn_1202012000009-1_3.jpg,,""2012-10-04 00:00:00"",,camiseta-freesoul-conf,camiseta-freesoul-conf.html,,4,,,,""Bloque después de la columna de Información"",1,1,,,,""2012-10-05 11:59:13"",""2012-10-10 11:02:47"",1,,No,,""Usar configuración"",""Usar configuración"",,0.0000,0.0000,1,0,0,1,1.0000,1,0.0000,1,1,,1,0,1,0,1,0.0000,1,0,0,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-1_3.jpg,,1,0,1202012000009S_freesoul,tallacamisetas_h,S,
I'm getting this error:
ProductTypeis invalid ornot supported in rows:1,2,3,4,5,6,7,8,9,10,11,12,13,Productwith specified super products `SKU`not found in rows:14
If tried this things to make it work:
  • The SKU is required and I see some lines don't have them so, trying to import other lines put that the type is incorrect.
  • I've converted the CSV to utf-8 and the error continues
  • I've changed the column names putting "" and doesn't work neither
  • I've used Magmi and when runnig the import file get this error: SQLSTATE[28000] [1045] Access denied for user '<>'@'localhost' (using password: YES)
Edit After configuring correctly Magmi when I try to import from a CSV there's a problem with the path of the file and get this error:
C:wampwwwmagentoarimport/myfile.csv not found -
The thing is that the path is missing "/" because it should be:
C:wamp/www/magento/var/import/myfile.csv
How can I sort this out?

Answer

If that's the latest version of the CSV then the issue will be due to the way the quotes are done. How does the file look if you open it in a spreadsheet application? I have a feeling that it won't look as you would expect it.
I've removed the extraneous quotes, but it also looks like you have an issue with the number of columns too, try the version below and you will see what I mean. I would suggest you look at the file in a spreadsheet application, you will see what I mean
sku,_store,_attribute_set,_type,_category,_root_category,_product_websites,price,special_price,special_from_date,special_to_date,image,media_gallery,news_from_date,news_to_date,url_key,url_path,minimal_price,visibility,custom_design,custom_layout_update,page_layout,options_container,required_options,has_options,image_label,small_image_label,thumbnail_label,created_at,updated_at,enable_googlecheckout,gift_message_available,is_imported,country_of_manufacture,msrp_enabled,msrp_display_actual_price_type,msrp,qty,min_qty,use_config_min_qty,is_qty_decimal,backorders,use_config_backorders,min_sale_qty,use_config_min_sale_qty,max_sale_qty,use_config_max_sale_qty,is_in_stock,notify_stock_qty,use_config_notify_stock_qty,manage_stock,use_config_manage_stock,stock_status_changed_auto,use_config_qty_increments,qty_increments,use_config_enable_qty_inc,enable_qty_increments,is_decimal_divided,_links_related_sku,_links_related_position,_links_crosssell_sku,_links_crosssell_position,_links_upsell_sku,_links_upsell_position,_associated_sku,_associated_default_qty,_associated_position,_tier_price_website,_tier_price_customer_group,_tier_price_qty,_tier_price_price,_group_price_website,_group_price_customer_group,_group_price_price,_media_attribute_id,_media_image,_media_lable,_media_position,_media_is_disabled,_super_products_sku,_super_attribute_code,_super_attribute_option,_super_attribute_price_corr 1202012000009S_freesoul,,PartesDeArriba_Hombre,simple,Hombre/Camisetas,"Default Category",base,45.0000,,,,/t/n/tn_1202012000009-1_1.jpg,,,,camiseta-freesoul,camiseta-freesoul.html,,1,,,,"Bloque después de la columna de Información",0,0,"Camiseta Freesoul","Camiseta Freesoul","Camiseta Freesoul","2012-10-05 08:41:01","2012-10-05 12:07:06",1,,No,,"Usar configuración","Usar configuración",,5.0000,0.0000,1,0,0,1,1.0000,1,0.0000,1,1,,1,0,1,0,1,0.0000,1,0,0,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-1_1.jpg,"Camiseta Freesoul",1,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-2_1.jpg,"Camiseta para hombre Freesoul",2,0,,,,1202012000009M_freesoul,,PartesDeArriba_Hombre,simple,Hombre/Camisetas,"Default Category",base,45.0000,,,,no_selection,,,,camiseta-freesoul,camiseta-freesoul-58.html,,1,,,,"Bloque después de la columna de Información",0,0,/,/,/,"2012-10-05 08:41:51","2012-10-05 12:07:39",1,,No,,"Usar configuración","Usar configuración",,5.0000,0.0000,1,0,0,1,1.0000,1,0.0000,1,1,,1,0,1,0,1,0.0000,1,0,0,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-1_1_1.jpg,"Camiseta Freesoul",1,0,,,,,espanol,,,,,,,,,,,,,,,camiseta-freesoul.html,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-2_1_1.jpg,"Camiseta para hombre Freesoul",2,0,,,,1202012000009L_freesoul,,PartesDeArriba_Hombre,simple,Hombre/Camisetas,"Default Category",base,45.0000,,,,no_selection,,,,camiseta-freesoul,camiseta-freesoul-59.html,,1,,,,"Bloque después de la columna de Información",0,0,/,/,/,"2012-10-05 08:43:19","2012-10-05 12:08:03",1,,No,,"Usar configuración","Usar configuración",,5.0000,0.0000,1,0,0,1,1.0000,1,0.0000,1,1,,1,0,1,0,1,0.0000,1,0,0,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-1_1_1_1.jpg,"Camiseta Freesoul",1,0,,,,,espanol,,,,,,,,,,,,,,,camiseta-freesoul.html,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-2_1_1_1.jpg,"Camiseta para hombre Freesoul",2,0,,,,1202012000009XL_freesoul,,PartesDeArriba_Hombre,simple,Hombre/Camisetas,"Default Category",base,45.0000,,,,no_selection,,,,camiseta-freesoul,camiseta-freesoul-60.html,,1,,,,"Bloque después de la columna de Información",0,0,/,/,/,"2012-10-05 08:44:34","2012-10-05 12:08:29",1,,No,,"Usar configuración","Usar configuración",,5.0000,0.0000,1,0,0,1,1.0000,1,0.0000,1,1,,1,0,1,0,1,0.0000,1,0,0,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-1_1_1_1_1.jpg,"Camiseta Freesoul",1,0,,,,,espanol,,,,,,,,,,,,,,,camiseta-freesoul.html,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-2_1_1_1_1.jpg,"Camiseta para hombre Freesoul",2,0,,,,1202012000009XXL_freesoul,,PartesDeArriba_Hombre,simple,Hombre/Camisetas,"Default Category",base,45.0000,,,,no_selection,,,,camiseta-freesoul,camiseta-freesoul-61.html,,1,,,,"Bloque después de la columna de Información",0,0,/,/,/,"2012-10-05 11:39:42","2012-10-05 12:08:52",1,,No,,"Usar configuración","Usar configuración",,5.0000,0.0000,1,0,0,1,1.0000,1,0.0000,1,1,,1,0,1,0,1,0.0000,1,0,0,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-1_1_1_1_1_1.jpg,"Camiseta Freesoul",1,0,,,,,espanol,,,,,,,,,,,,,,,camiseta-freesoul.html,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-2_1_1_1_1_1.jpg,"Camiseta para hombre Freesoul",2,0,,,,12020120000093XL_freesoul,,PartesDeArriba_Hombre,simple,Hombre/Camisetas,"Default Category",base,45.0000,,,,no_selection,,,,camiseta-freesoul,camiseta-freesoul-62.html,,1,,,,"Bloque después de la columna de Información",0,0,/,/,/,"2012-10-05 11:41:45","2012-10-05 12:09:15",1,,No,,"Usar configuración","Usar configuración",,5.0000,0.0000,1,0,0,1,1.0000,1,0.0000,1,1,,1,0,1,0,1,0.0000,1,0,0,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-1_1_1_1_1_1_1.jpg,"Camiseta Freesoul",1,0,,,,,espanol,,,,,,,,,,,,,,,camiseta-freesoul.html,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-2_1_1_1_1_1_1.jpg,"Camiseta para hombre Freesoul",2,0,,,,1202012000009_freesoul,,PartesDeArriba_Hombre,configurable,Hombre/Camisetas,"Default Category",base,45.0000,,,,/t/n/tn_1202012000009-1_3.jpg,,"2012-10-04 00:00:00",,camiseta-freesoul-conf,camiseta-freesoul-conf.html,,4,,,,"Bloque después de la columna de Información",1,1,,,,"2012-10-05 11:59:13","2012-10-10 11:02:47",1,,No,,"Usar configuración","Usar configuración",,0.0000,0.0000,1,0,0,1,1.0000,1,0.0000,1,1,,1,0,1,0,1,0.0000,1,0,0,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-1_3.jpg,,1,0,1202012000009S_freesoul,tallacamisetas_h,S,
As for the magmi issue, that looks like you haven't set up the Global Parameters correctly. Make sure you have specified the username and password on the configuration page and that you click the "Save global parameters" button.
If this has been set up correctly and you are still seeing the issue, then I think it will be a MySQL permissions issue

You should check different options:
  1. Magmi link http://sourceforge.net/projects/magmi/
  2. Check this video https://www.youtube.com/watch?v=XoqPVz8Fq7o
  3. Check this manual http://www.ayasoftware.com/content/how-import-configurable-products-csv-file-magento-system
  4. Another interesant manual http://www.magentocommerce.com/wiki/3_-_store_setup_and_management/import_export/how_to_automatically_import_simple_grouped_and_configurable_product