Skip to main content

Posts

Delete Order details from Magento

SET FOREIGN_KEY_CHECKS=0; TRUNCATE `sales_flat_creditmemo`; TRUNCATE `sales_flat_creditmemo_comment`; TRUNCATE `sales_flat_creditmemo_grid`; TRUNCATE `sales_flat_creditmemo_item`; TRUNCATE `sales_flat_invoice`; TRUNCATE `sales_flat_invoice_comment`; TRUNCATE `sales_flat_invoice_grid`; TRUNCATE `sales_flat_invoice_item`; TRUNCATE `sales_flat_order`; TRUNCATE `sales_flat_order_address`; TRUNCATE `sales_flat_order_grid`; TRUNCATE `sales_flat_order_item`; TRUNCATE `sales_flat_order_payment`; TRUNCATE `sales_flat_order_status_history`; TRUNCATE `sales_flat_quote`; TRUNCATE `sales_flat_quote_address`; TRUNCATE `sales_flat_quote_address_item`; TRUNCATE `sales_flat_quote_item`; TRUNCATE `sales_flat_quote_item_option`; TRUNCATE `sales_flat_quote_payment`; TRUNCATE `sales_flat_quote_shipping_rate`; TRUNCATE `sales_flat_shipment`; TRUNCATE `sales_flat_shipment_comment`; TRUNCATE `sales_flat_shipment_grid`; TRUNCATE `sales_flat_shipment_item`; TRUNCATE `sales_flat_shipment_track`; TRUNCATE `sale

Delete Customer Details from Magee using SQL

SET FOREIGN_KEY_CHECKS=0; -- reset customers TRUNCATE customer_address_entity; TRUNCATE customer_address_entity_datetime; TRUNCATE customer_address_entity_decimal; TRUNCATE customer_address_entity_int; TRUNCATE customer_address_entity_text; TRUNCATE customer_address_entity_varchar; TRUNCATE customer_entity; TRUNCATE customer_entity_datetime; TRUNCATE customer_entity_decimal; TRUNCATE customer_entity_int; TRUNCATE customer_entity_text; TRUNCATE customer_entity_varchar; TRUNCATE log_customer; TRUNCATE log_visitor; TRUNCATE log_visitor_info; ALTER TABLE customer_address_entity AUTO_INCREMENT=1; ALTER TABLE customer_address_entity_datetime AUTO_INCREMENT=1; ALTER TABLE customer_address_entity_decimal AUTO_INCREMENT=1; ALTER TABLE customer_address_entity_int AUTO_INCREMENT=1; ALTER TABLE customer_address_entity_text AUTO_INCREMENT=1; ALTER TABLE customer_address_entity_varchar AUTO_INCREMENT=1; ALTER TABLE customer_entity AUTO_INCREMENT=1; ALTER TABLE customer_entity_datetime AUTO_INCREME

Delete Magento images programmatically

$productId =1; $loadpro=Mage::getModel('catalog/product')->load($product->getId()); $mediaApi = Mage::getModel("catalog/product_attribute_media_api"); $mediaApiItems = $mediaApi->items($product->getId()); foreach($mediaApiItems as $item) { $mediaApi->remove($loadpro->getId(), $item['file']); } $loadpro->save();

TORA SQL In UBUNTU

I have used DbVisualizer 9.0 in Ubuntu 13.04. Because of that I cannot use other software like netbeans and chrome due to slowness of their process. So I moved to different Mysql Admin tools and Tora is great tool. http://torasql.com/ here is how you can install it in Ubuntu $ sudo apt-get install tora $ sudo apt-get install libqt4-sql-mysql libqt4-sql-psql libqt4-sql-sqlite libqt4-sql-odbc libqt4-sql-tds

Cheap Web Hosting

I just want to mention here I found some of my friends offering cheap web hosting in fiverr. Checkout their gigs. They offer following options for $5. Its Cheap I guess. Why don't you give a try Below are the links to those gigs. You can pay them via Paypal http://fiverr.com/calestomedia/provide-a-genuine-5-websites-hosting-package-for-1-year-including-cpanel-fantastico-sitebuilder-500-free-templates http://fiverr.com/llcoollasa/give-you-100mb-hosting-space