Delete all Orders, Sales & Customer Data in Magento

https://www.designhaven.co.uk/2014/08/cleanly-delete-orders-sales-customer-data-magento/#comment-27491

From Comments:

In addition to clear the SEARCH TERMS

SET FOREIGN_KEY_CHECKS=0;

TRUNCATE catalogsearch_query;
TRUNCATE catalogsearch_fulltext;
TRUNCATE catalogsearch_result;
ALTER TABLE catalogsearch_query AUTO_INCREMENT=1;
ALTER TABLE catalogsearch_fulltext AUTO_INCREMENT=1;
ALTER TABLE catalogsearch_result AUTO_INCREMENT=1;

TRUNCATE TABLE sales_bestsellers_aggregated_daily;
TRUNCATE TABLE sales_bestsellers_aggregated_monthly;
TRUNCATE TABLE sales_bestsellers_aggregated_yearly;
ALTER TABLE sales_bestsellers_aggregated_daily AUTO_INCREMENT=1;
ALTER TABLE sales_bestsellers_aggregated_monthly AUTO_INCREMENT=1;
ALTER TABLE sales_bestsellers_aggregated_yearly AUTO_INCREMENT=1;

SET FOREIGN_KEY_CHECKS=1;

=========================================
In addition to clear the NEWSLETTER SUBSCRIBERS

SET FOREIGN_KEY_CHECKS=0;

TRUNCATE newsletter_problem;
TRUNCATE newsletter_queue;
TRUNCATE newsletter_queue_link;
TRUNCATE newsletter_queue_store_link;
TRUNCATE newsletter_subscriber;
TRUNCATE newsletter_template;

ALTER TABLE newsletter_problem AUTO_INCREMENT=1;
ALTER TABLE newsletter_queue AUTO_INCREMENT=1;
ALTER TABLE newsletter_queue_link AUTO_INCREMENT=1;
ALTER TABLE newsletter_queue_store_link AUTO_INCREMENT=1;
ALTER TABLE newsletter_subscriber AUTO_INCREMENT=1;
ALTER TABLE newsletter_template AUTO_INCREMENT=1;

SET FOREIGN_KEY_CHECKS=1;

More :
http://inchoo.net/magento/delete-test-orders-in-magento/

https://stackoverflow.com/questions/8899366/deleting-all-products-on-magento

Advertisements

Shipping cost not showing on cart page

I think it will help others …

http://www.danneh.org/2010/08/adding-shipping-costs-to-the-cart-automatically-in-magento/

 

For my case, I did not enable any of the FlateRate or TableRate but another extension “Cash on delivery ” and I used shipping code “tablerate_bestway”
then after entering that value the module worked perfectly on Magento CE 1.9.2.2.

how to rename the attribute’s label for front-end Magento

Sometime there need to be a situation to change the default attributes name for the front-end. In that case the all of the custom theme don’t have the pre-work for this. We have to make it with replace the following code ….

In
app/design/frontend/YOURPACKAGE/YOURTHEME/template/catalog/product
/view/type/options/configurable.phtml in line 35 for my case

if the file not there then please check in

app/design/frontend/base/default/template/catalog/product/view
/type/options/configurable.phtml

and you may copy it to the theme and Change the following code inside the line

echo $_attribute->getLabel()

To

echo $_attribute->getProductAttribute()->getStoreLabel()

Then you should get the Label you set in Default Store View section of the attribute in admin

The order confirmation email is not sent in Magento

It’s very common that the order confirmation email is not sent to the email. And it’s specially problem for the Magento 1.9.x. There is a very simple trick to make it work …

We need to change in order.php in below

public_html/app/code/core/Mage/Sales/Model/Order.php

We have to create one directory structure on the path below, then copy and paste the file to the path below.

public_html/app/code/local/Mage/Sales/Model/Order.php

Now, change from

$mailer->setQueue($emailQueue)->send(); ( for me it was line 1356)

to

$mailer->send();