Q. How to delete article and category in Shopware using REST Api?
You have already read my last posts of Shopware. If not, Please read last posts to start shopware from beginning..
Shopware Section:
1. Rest API in Shopware PHP
2. Create REST Api for Shopware using php and curl
3. Retrieve Articles and Category using REST Api in Shopware
4. Post Article, Category and Image using REST Api in Shopware
Now Lets start.
Follow these steps:
1. Create a page "deletedata.php"
2. Put following code under this page
4. Run this page. If you have write all correct coding. You will get success to delete data.
That's it.
You have already read my last posts of Shopware. If not, Please read last posts to start shopware from beginning..
Shopware Section:
1. Rest API in Shopware PHP
2. Create REST Api for Shopware using php and curl
3. Retrieve Articles and Category using REST Api in Shopware
4. Post Article, Category and Image using REST Api in Shopware
Now Lets start.
Follow these steps:
1. Create a page "deletedata.php"
2. Put following code under this page
<?php3. If you are confused about the code of config.php. Must read 1st post of shopware section
include 'config.php';
$client->delete('articles/' . ArticleId); //Delete Article
$client->delete('categories/' . CategoryId); //Delete Article
?>
4. Run this page. If you have write all correct coding. You will get success to delete data.
That's it.