favorite product json delete not working

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
Dinver
Posts: 27
Joined: 26 Oct 2020, 08:42

favorite product json delete not working

Post by Dinver » 26 Nov 2020, 15:52

I create delete request, but nothing happens. Errors not, but does not delete anything.

Code: Select all

const url = '/jsonapi/customer?related=relationships&include=product&relatedid=' + id
		$.ajax({
			url: url,
			method: 'DELETE',
			headers: {
				'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
			}
		}).done(function(result) {
				console.log(result)
		})
response:

Code: Select all

{
"meta": {
"total": 0,
"prefix": null,
"content-baseurl": "http://shop.loc"
, "csrf": {
"name": "_token",
"value": "fIBH6KiZuCjDUOmrMbUYXlBoyRynflrywKJgmTpb"
}

},
"links": {
"self": "http://shop.loc/jsonapi/customer?related=relationships&include=product&relatedid=1",
"related": "http://shop.loc/jsonapi/customer?related=relationships&include=product"
}

}

User avatar
muhammadsiddiq
Posts: 1
Joined: 07 Sep 2023, 17:34

Re: favorite product json delete not working

Post by muhammadsiddiq » 07 Sep 2023, 17:37

Hello bro, did the issue got resolved ? i know its been 2 year + 😢

Post Reply