Magento test ürünlerini silme
Magento site kurulumu yaptığınızda test ürünleri, siparişleri ve müşterileri eklenir. Bunları silmek için phpmyadminden Truncate komutunu kullanmamız gerekiyor. Aşağıda yer alan SQL sorgularını bu kısımdan yaptığınızda işlemleriniz tamamlanacaktır. Hata alırsanız aşağıdaki komutlarda mage_ ile başlayan prefix olmayabilir. bunu silerek denerseniz işleminiz tamamlanacaktır.
Test Ürünlerini kaldırmak için;
TRUNCATE TABLE `mage_catalog_product_bundle_option`; TRUNCATE TABLE `mage_catalog_product_bundle_option_value`; TRUNCATE TABLE `mage_catalog_product_bundle_selection`; TRUNCATE TABLE `mage_catalog_product_entity_datetime`; TRUNCATE TABLE `mage_catalog_product_entity_decimal`; TRUNCATE TABLE `mage_catalog_product_entity_gallery`; TRUNCATE TABLE `mage_catalog_product_entity_int`; TRUNCATE TABLE `mage_catalog_product_entity_media_gallery`; TRUNCATE TABLE `mage_catalog_product_entity_media_gallery_value`; TRUNCATE TABLE `mage_catalog_product_entity_text`; TRUNCATE TABLE `mage_catalog_product_entity_tier_price`; TRUNCATE TABLE `mage_catalog_product_entity_varchar`; TRUNCATE TABLE `mage_catalog_product_link`; TRUNCATE TABLE `mage_catalog_product_link_attribute`; TRUNCATE TABLE `mage_catalog_product_link_attribute_decimal`; TRUNCATE TABLE `mage_catalog_product_link_attribute_int`; TRUNCATE TABLE `mage_catalog_product_link_attribute_varchar`; TRUNCATE TABLE `mage_catalog_product_link_type`; TRUNCATE TABLE `mage_catalog_product_option`; TRUNCATE TABLE `mage_catalog_product_option_price`; TRUNCATE TABLE `mage_catalog_product_option_title`; TRUNCATE TABLE `mage_catalog_product_option_type_price`; TRUNCATE TABLE `mage_catalog_product_option_type_title`; TRUNCATE TABLE `mage_catalog_product_option_type_value`; TRUNCATE TABLE `mage_catalog_product_super_attribute`; TRUNCATE TABLE `mage_catalog_product_super_attribute_label`; TRUNCATE TABLE `mage_catalog_product_super_attribute_pricing`; TRUNCATE TABLE `mage_catalog_product_super_link`; TRUNCATE TABLE `mage_catalog_product_enabled_index`; TRUNCATE TABLE `mage_catalog_product_website`; TRUNCATE TABLE `mage_catalog_product_entity`; TRUNCATE TABLE `mage_cataloginventory_stock`; TRUNCATE TABLE `mage_cataloginventory_stock_item`; TRUNCATE TABLE `mage_cataloginventory_stock_status`; INSERT INTO `mage_catalog_product_link_type`(`link_type_id`,`code`) VALUES (1,'relation'),(2,'bundle'),(3,'super'),(4,'up_sell'),(5,'cross_sell'); INSERT INTO `mage_catalog_product_link_attribute`(`product_link_attribute_id`,`link_type_id`,`product_link_attribute_code`,`data_type`) VALUES (1,2,'qty','decimal'),(2,1,'position','int'),(3,4,'position','int'),(4,5,'position','int'),(6,1,'qty','decimal'),(7,3,'position','int'),(8,3,'qty','decimal'); INSERT INTO `mage_cataloginventory_stock`(`stock_id`,`stock_name`) VALUES (1,'Default');
Test kategorilerini kaldırmak için;
TRUNCATE TABLE `mage_catalog_category_entity`; TRUNCATE TABLE `mage_catalog_category_entity_datetime`; TRUNCATE TABLE `mage_catalog_category_entity_decimal`; TRUNCATE TABLE `mage_catalog_category_entity_int`; TRUNCATE TABLE `mage_catalog_category_entity_text`; TRUNCATE TABLE `mage_catalog_category_entity_varchar`; TRUNCATE TABLE `mage_catalog_category_product`; TRUNCATE TABLE `mage_catalog_category_product_index`; INSERT INTO `mage_catalog_category_entity`(`entity_id`,`entity_type_id`,`attribute_set_id`,`parent_id`,`created_at`,`updated_at`,`path`,`POSITION`,`level`,`children_count`) VALUES (1,3,0,0,'0000-00-00 00:00:00','0000-00-00 00:00:00','1',1,0,1), (2,3,3,1,'0000-00-00 00:00:00','0000-00-00 00:00:00','1/2','1','1','0'); INSERT INTO `mage_catalog_category_entity_int`(`value_id`,`entity_type_id`,`attribute_id`,`store_id`,`entity_id`,`value`) VALUES (1,3,32,0,2,1),(2,3,36,0,2,1),(3,3,61,0,2,1),(4,3,44,0,2,NULL),(5,3,45,0,2,1),(6,3,62,0,2,1),(7,3,63,0,2,1),(8,3,64,0,2,NULL); INSERT INTO `mage_catalog_category_entity_varchar`(`value_id`,`entity_type_id`,`attribute_id`,`store_id`,`entity_id`,`value`) VALUES (1,3,31,0,1,'Root Catalog'),(2,3,35,0,2,'Default Category'),(3,3,37,0,2,'default-category'),(4,3,40,0,2,NULL),(5,3,43,0,2,'PRODUCTS'),(6,3,52,0,2,NULL),(7,3,55,0,2,NULL);
Test kullanıcılarını kaldırmak için;
TRUNCATE TABLE `mage_customer_address_entity`; TRUNCATE TABLE `mage_customer_address_entity_datetime`; TRUNCATE TABLE `mage_customer_address_entity_decimal`; TRUNCATE TABLE `mage_customer_address_entity_int`; TRUNCATE TABLE `mage_customer_address_entity_text`; TRUNCATE TABLE `mage_customer_address_entity_varchar`; TRUNCATE TABLE `mage_customer_entity`; TRUNCATE TABLE `mage_customer_entity_datetime`; TRUNCATE TABLE `mage_customer_entity_decimal`; TRUNCATE TABLE `mage_customer_entity_int`; TRUNCATE TABLE `mage_customer_entity_text`; TRUNCATE TABLE `mage_customer_entity_varchar`;
Test siparişlerini kaldırmak için
SET FOREIGN_KEY_CHECKS=0; TRUNCATE `mage_sales_flat_creditmemo`; TRUNCATE `mage_sales_flat_creditmemo_comment`; TRUNCATE `mage_sales_flat_creditmemo_grid`; TRUNCATE `mage_sales_flat_creditmemo_item`; TRUNCATE `mage_sales_flat_invoice`; TRUNCATE `mage_sales_flat_invoice_comment`; TRUNCATE `mage_sales_flat_invoice_grid`; TRUNCATE `mage_sales_flat_invoice_item`; TRUNCATE `mage_sales_flat_order`; TRUNCATE `mage_sales_flat_order_address`; TRUNCATE `mage_sales_flat_order_grid`; TRUNCATE `mage_sales_flat_order_item`; TRUNCATE `mage_sales_flat_order_payment`; TRUNCATE `mage_sales_flat_order_status_history`; TRUNCATE `mage_sales_flat_quote`; TRUNCATE `mage_sales_flat_quote_address`; TRUNCATE `mage_sales_flat_quote_address_item`; TRUNCATE `mage_sales_flat_quote_item`; TRUNCATE `mage_sales_flat_quote_item_option`; TRUNCATE `mage_sales_flat_quote_payment`; TRUNCATE `mage_sales_flat_quote_shipping_rate`; TRUNCATE `mage_sales_flat_shipment`; TRUNCATE `mage_sales_flat_shipment_comment`; TRUNCATE `mage_sales_flat_shipment_grid`; TRUNCATE `mage_sales_flat_shipment_item`; TRUNCATE `mage_sales_flat_shipment_track`; TRUNCATE `mage_sales_invoiced_aggregated`; TRUNCATE `mage_sales_invoiced_aggregated_order`; TRUNCATE `mage_log_quote`; ALTER TABLE `mage_sales_flat_creditmemo_comment` AUTO_INCREMENT=1; ALTER TABLE `mage_sales_flat_creditmemo_grid` AUTO_INCREMENT=1; ALTER TABLE `mage_sales_flat_creditmemo_item` AUTO_INCREMENT=1; ALTER TABLE `mage_sales_flat_invoice` AUTO_INCREMENT=1; ALTER TABLE `mage_sales_flat_invoice_comment` AUTO_INCREMENT=1; ALTER TABLE `mage_sales_flat_invoice_grid` AUTO_INCREMENT=1; ALTER TABLE `mage_sales_flat_invoice_item` AUTO_INCREMENT=1; ALTER TABLE `mage_sales_flat_order` AUTO_INCREMENT=1; ALTER TABLE `mage_sales_flat_order_address` AUTO_INCREMENT=1; ALTER TABLE `mage_sales_flat_order_grid` AUTO_INCREMENT=1; ALTER TABLE `mage_sales_flat_order_item` AUTO_INCREMENT=1; ALTER TABLE `mage_sales_flat_order_payment` AUTO_INCREMENT=1; ALTER TABLE `mage_sales_flat_order_status_history` AUTO_INCREMENT=1; ALTER TABLE `mage_sales_flat_quote` AUTO_INCREMENT=1; ALTER TABLE `mage_sales_flat_quote_address` AUTO_INCREMENT=1; ALTER TABLE `mage_sales_flat_quote_address_item` AUTO_INCREMENT=1; ALTER TABLE `mage_sales_flat_quote_item` AUTO_INCREMENT=1; ALTER TABLE `mage_sales_flat_quote_item_option` AUTO_INCREMENT=1; ALTER TABLE `mage_sales_flat_quote_payment` AUTO_INCREMENT=1; ALTER TABLE `mage_sales_flat_quote_shipping_rate` AUTO_INCREMENT=1; ALTER TABLE `mage_sales_flat_shipment` AUTO_INCREMENT=1; ALTER TABLE `mage_sales_flat_shipment_comment` AUTO_INCREMENT=1; ALTER TABLE `mage_sales_flat_shipment_grid` AUTO_INCREMENT=1; ALTER TABLE `mage_sales_flat_shipment_item` AUTO_INCREMENT=1; ALTER TABLE `mage_sales_flat_shipment_track` AUTO_INCREMENT=1; ALTER TABLE `mage_sales_invoiced_aggregated` AUTO_INCREMENT=1; ALTER TABLE `mage_sales_invoiced_aggregated_order` AUTO_INCREMENT=1; ALTER TABLE `mage_log_quote` AUTO_INCREMENT=1; TRUNCATE `mage_downloadable_link_purchased`; TRUNCATE `mage_downloadable_link_purchased_item`; ALTER TABLE `mage_downloadable_link_purchased` AUTO_INCREMENT=1; ALTER TABLE `mage_downloadable_link_purchased_item` AUTO_INCREMENT=1; TRUNCATE `mage_eav_entity_store`; ALTER TABLE `mage_eav_entity_store` AUTO_INCREMENT=1; SET FOREIGN_KEY_CHECKS=1;
Eğer bunları nereye yazacam diyorsanız phpmyadminden veritabınınızı seçip sql sorgusu yapılan SQL yazan kısma girip grup grup ekleyip yapabilirsiniz.