Delete article and category using REST Api in Shopware

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..

Delete article and category using REST Api in Shopware


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
     <?php
                 include 'config.php';
               $client->delete('articles/' . ArticleId);   //Delete Article
               $client->delete('categories/' . CategoryId);   //Delete Article
     ?>
3. If you are confused about the code of config.php. Must read 1st post of shopware section

4. Run this page. If you have write all correct coding. You will get success to delete data.

That's it.
    
0 Comments
Disqus
Fb Comments
Comments :

0 comments:

Post a Comment