Questions tagged [delete]

The tag has no usage guidance, but it has a tag wiki.

Filter by
Sorted by
Tagged with
0
votes
1answer
15 views

Magento 2 - Foreign Key Constraint does not delete record

I am using the extension Amasty Product Attachments. If I add an attachment to a product and then delete that attachment from Amasty -> Product Attachments -> Attachments Management, then I can'...
2
votes
1answer
902 views

Delete all products and reset their Ids with least queries as possible

Can somebody suggest an intermediate way to delete all products in magento and reset their table's increment id to 1 without using multiple "truncate" queries found when Googling ? Magento version ce-...
0
votes
0answers
12 views

Unable to delete product entry in catalog flat tables on deleting product from admin in Magento2

I have enable catalog flat tables configuration. I try to delete product from admin but still it is displaying in frontend with message "Out of stock". Also i checked database entry for ...
3
votes
1answer
794 views

The difference of “remove product links” in the cart and minicart (rwd theme)

Looking at the remove product links I found two different below codes: In .../checkout/cart/item/default.phtml <a href="<?php echo $this->getDeleteUrl() ?>" title="<?php echo Mage::...
1
vote
1answer
75 views

Delete Product Custom Option value if it is null in magento 2

I wish to delete the custom options value of a product if it is null without deleting the option. Please provide me a solution to delete it without affecting the option
0
votes
1answer
40 views

Auto delete item from minicart in magento 2?

I have 2 items in cart suppose A & B. When customer delete item A from minicart then auto delete item B. How the ajax will call 2 times, I have done this in controller's execute function (delete ...
4
votes
3answers
5k views

Truncate table using resource model in Magento 2

I have a custom module and i want to add remove every data including the increment id, using resource model in magento 2, i've read the solution in here but this is for magento 1, i'm not sure how to ...
0
votes
1answer
25 views

Magento 2 - Delete/update all products attribute values by attribute_code

In Magento 2, How to do a mass deletion of all products attribute values, by attribute_code. For exemple I want to delete all values for attribute_code = "my_code". EDIT I also want to ...
0
votes
0answers
10 views

Magento2: Validation failed error on deleting store

I just deleted 3 storeviews for a customer. When attempting the fourth it gives a general 'validation failed' in the (red) magento notification system. I put a tail on the system.log & the ...
0
votes
2answers
133 views

Magento 2 delete specific product categories

how can I delete specific categories for a product in Magento 2.Forex: I have a product with a,b,c categories, I have some conditions if the conditions meet my categories remains same but if those ...
1
vote
1answer
242 views

main.ERROR: The “EM0EM00284-100” product couldn't be removed

After upgrade to Magento 2.3.5, When trying to delete products from the catalog, we receive an error. This occurs on various types of products, from virtual products, simple products, configurable ...
0
votes
1answer
21 views

How to remove all special prices for a specific customer group

I accidentally uploaded special prices for an erroneous group of customers. How to remove all special prices for a group of customers, not login (customer_group_id = 0) for all products and items from ...
1
vote
0answers
26 views

Delete Magento 2 base website

I have two websites in Magento installation. I need to remove the current base website completely. Can I just delete the default website or are there other steps to do?
0
votes
1answer
38 views

Method 'delete' is deprecated

phpstorm IDE saing that method 'delete' is deprecated. Is there any alternatives? public function deleteVoucherStatus($entity_id) { $voucherStatus = $this->voucherStatusModelFactory-&...
0
votes
1answer
179 views

How to delete the order Items from magento using Rest API

I want to delete the order Item form the Successfully placed Order how to delete the order item.Can anyone help to solve this situation. Thanks in Advance :)
0
votes
2answers
52 views

Can't delete block from Magento 2 homepage

I'm working on Magento 2 website that somebody developed before me. The website has Ultimo Theme. I'm trying to remove a block with a slider on the top of the home page. In the Ultime guide that block ...
0
votes
3answers
184 views

Unable to delete product in magento2

I try to delete product but it returns exception can not delete product and sku my code is here $productcollection = $this->collectionFactory->create()->addAttributeToSelect('manufacturer'...
0
votes
0answers
12 views

Delete multipe field Data

I'm currently working on a field that adds several image files in the same field by saving it with json_encode. The addition works well, I display my images in Front and Back. My concern is that ...
0
votes
0answers
34 views

I have created datapatch to delete products with specific value on attribute manufacturer

I have created datapatch to delete products with specific value on attribute manufacturer. I want to delete all products whose manufacturer is LG , my datapatch looks like that <?php declare(...
0
votes
2answers
1k views

Magento 2 Custom Module Delete Issue [SOLVED]

I'm using Magento 2 Version 2.1.0 {folder path}\magento2\app\code\Custom\Module\view\adminhtml\ui_component\custom_module_index.xml <massaction name="listing_massaction"> <argument name=...
3
votes
4answers
4k views

Delete test orders Magento 2

I've done some orders through Magento however I want to remove them now from Sales page to clean it up. I need to remove only test orders, there are also some real order which I don't wish to remove. ...
0
votes
1answer
42 views

All urls are not working, it is accidently deleted,

Yesterday, I accidentally deleted unnecessary backup files from the public_html folder and deleted other important files as well. Since then, the main home page of the website has been well displayed,...
0
votes
1answer
254 views

Delete a file from directory magento 2

Is there any way to delete files from var directory, if the file name matched with a condition. I need to delete log files based upon given date. Please let me know how to achieve this in magento2?
1
vote
0answers
785 views

Magento 2: Delete duplicate products programatically

I need to search Magento 2 DB for duplicate SKUs and remove duplicate products using a script, i found a very useful script here: Remove duplicated products from catalog. but it's not compatible with ...
0
votes
1answer
42 views

Sql to delete category and its descendants

I am working with a Magento 2 store with a very large category tree (over 10000 categories). I used CategoryRepository and deleted one by one but this is very time-consuming since delete a brand with ...
0
votes
0answers
104 views

Cannot delete products from store

We are noticing that in our Magento 2 store we are unable to delete products, individually or in bulk, from the catalog page. When selecting a product and hitting Delete, we get an error that says the ...
3
votes
3answers
868 views

While trying to delete address its redirecting to 404 page in Magento 2

When I try to delete additional address in Magento 2 customer dashboard its redirecting to 404 Page. My URL format mentioned below. /customer/address/delete/id/13/form_key/xkTKVSSxqip79bZ1
0
votes
1answer
908 views

CURL request using DELETE method in Magento 2

I am trying to call a curl request for delete method using Magento\Framework\HTTP\Client\Curl.php. In this class makeRequest method is responsible for sending curl request. But as I can see that ...
2
votes
3answers
292 views

How to delete bunch of products in Magento2?

Is there a short and best way to delete bunch of products in Magento2. I am having list if 1,20,000 SKUs and want to delete that. Tried: Read CSV Delete products in loop by repository. Problem: ...
1
vote
1answer
550 views

Magento2 : How to remove delete item button from cart page?

I want to remove delete item button from cart page. I am using below xml code to remove this but not working:- Path: app/design/frontend/vendor/theme/Magento_Checkout/layout/...
1
vote
0answers
49 views

Magento 2 Delete operation is forbidden for current area

I have tried to make the solution proposed at Delete operation is forbidden for current area magento 2 But without result I work in magento 2.3.2 with php 7.2 Please help me... Thank you.
2
votes
2answers
3k views

How to delete object from collection in magento2

How to remove any object from magento 2 collection. If we have collection of products and we want to delete product which is at first index . how to delete that product without deleting it from ...
2
votes
5answers
3k views

Delete Product Magento 2

I want to delete products by sctip. They way I am doing it for test : if(!empty($products)) { foreach($products as $_product) { $sku = $_product->...
2
votes
3answers
1k views

Unable to delete tax rate

Whenever I try to delete a tax rate, I get below error message. Tax rate cannot be removed. It exists in tax rule I checked there is no tax rule in admin. I have deleted all tax rules. UPDATE I ...
1
vote
2answers
2k views

Delete multiple store views programmatically

I am trying to delete multiple store views using a php script that includes app/Mage.php in the root of my installation. I am able to get the list of websites and store views but I need to somehow ...
0
votes
1answer
37 views

I m very new to magento. Can you please tell me? How can i delete configurable product attributes that i have marked in image

[![enter image description here][1]][1]I am using Magento 2.3.2. I want to delete those two attributes that I have marked. I googled it but did not find any solution. https://i.stack.imgur.com/mJULS....
2
votes
2answers
903 views

how can I empty magento 2 orders, customer and products data reset to 1

how can I empty Magento 2 order customers products data to reset 1 how I can do this?? when i run in sql MySQL said: Documentation #1146 - Table 'magento_db.gift_message' doesn'...
5
votes
2answers
2k views

How to Delete Quote item Based on the condition in magento 2

I have requirement like below. I need to read all quote items and their sku, against the custom table, If value matched, need to delete that quote item and update qty 1 for remaining items but this ...
1
vote
4answers
678 views

Magento 2: Mass Delete PHP code not Working

I'm very new to Magento, i created a Mass Action for Delete i write this code in /EC/Downloads/view/adminhtml/ui_component/ec_downloads_items.xml <?xml version="1.0"?> <listing xmlns:xsi="...
2
votes
2answers
3k views

How to delete a custom table entry by clicking a delete button in a phtml file in Magento 2?

Fetched details from my custom module and displayed it in a table. There is a delete option give to corresponding row entries. The above table codes written in a phtml page. How to delete the db ...
0
votes
1answer
346 views

Addresses Delete not working in address book Magento 2.3

Add additional addresses to address book in magento 2.3 then Click on ' Delete Address' link in address book it redirect to 404 page and invalid url shows.
2
votes
1answer
103 views

How to create Delete function in My Order page

I want to add a new action in My Orders page that is Delete action How can I do that? Can anyone help me with this function?
0
votes
2answers
632 views

Delete Multiple Tax Rates in Magento 2

I have a number of redundant Tax rates (539 when I only need 269) in Magento 2.2.7 and I'd like to remove them. Is there a way to do this that doesn't involve going into each one and clicking the "...
2
votes
1answer
39 views
1
vote
0answers
25 views

After deleting the cart items programmatically for customer and after adding new product, shipping methods not displaying using controller magento2

Hi @ll in my case after deleting all cart items of a customer and after that we are adding new product to the cart. This time new product shipping Methods("Sorry, no quotes are available for this ...
4
votes
1answer
66 views

How do i delete products which are not in a category?

our site has over 90,000 products which need to be deleted and are not in categories, but the products in the categories we want to keep, how do i solve this?
2
votes
3answers
7k views

How to clear cart and minicart programatically in Magento 2?

How to clear cart and minicart programatically in Magento 2?? I am using this code $quoteId = $this->_checkoutSession->getQuote()->getId(); $quoteModel = $this->objectManager->create('...
3
votes
0answers
58 views

How to disable duplicated values options when adding new option of an attribute magento 2

I have set the attribute color as unque value but still can add same value and i have tried with an event catalog_entity_attribute_save_before but now he delete all the label and values please any ...
0
votes
0answers
173 views

How to remove Edit and Delete button from mini-cart and cart page for specific product?

I want to remove edit and delete button from mini-cart and cart page for specific product only. How can I do this? Any help would be appreciated. Thanks.
2
votes
2answers
7k views

How do I delete products in magmi

I have been using magmi to import products in bulk, but now need to delete some of them. How can I do this?