Jump to content

oliver hauser

  • Content Count

  • Joined

  • Last visited

  • Days Won


oliver hauser last won the day on November 1

oliver hauser had the most liked content!

About oliver hauser

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. oliver hauser

    Programatically create and update listings

    Thank you Alejandro, I will do so. (Testing right now and implementing in a plugin). 🙂
  2. oliver hauser

    Programatically create and update listings

    Hello, I've tested and will use these methods from above, they work great. Now, is there a similar way to add media to listings, cause I would like to also directly add images when importing the listtng? Ok, I found out so far, parts of it. Think I would have to do 2 requests. First one: $params['data']['controller'] = 'media_upload'; $params['data']['action'] = '_uploadUrl'; $params['data']['upload_url'] = 'URL; $params['data']['Media']['listing_id'] = 226; $params['data']['Media']['review_id'] = 0; $params['data']['Media']['extension'] = 'com_content'; This to save the file from an URL. And a second one as: $params['data']['action'] = ' _saveEdit'; $params['data']['controller'] = 'media'; $params['data']['Media]['media_id'] = 98; $params['data']['Media]['title'] = 'Title'; $params['data']['referrer'] = 'create'; As I can tell, the first request can't handle the params used in the second request, they are ignored. So if having to change any of these values, the second one is also required. And I think that there is no update possible. Makes sense also, as the files can only be created or deleted, but not updated. This would have to be done in a custom check? Is this the solution that could be used, or are there some other options? & would it work with a local file when not loading from an url? (Like saving the file first locally on the server)

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Please refer to our Privacy Policy.