Hello, my goal is to be able to send data from remote python server and add products to virtuemart that way (which of course is located on another server).
My script does following: (using python requests library)
1. goes to domain.com/administrator/index.php
2. logs in successfully
3. goes to /index.php?option=com_virtuemart&view=product&task=edit&virtuemart_product_id=0 and sends POST data to this url
step 3 goes by without any errors but i don't see new products being added, for now i'm only sending "product_name", and predefined values of hidden inputs with names: task, option, boxchecked, controller, view and one more input which doesn't have a static name, I think it's csrf token, I'm sending that as well. Is what I'm trying to achieve possible with this approach? any guidance is appreciated
- Use python script for creating XML file and this file import to Virtuemart
- Use eMagic for write to DB
You have to write your own script to add the product to DB.
Because you need form token and valid user for VM, it's better to use com_ajax for eg and a plugin or use your own Joomla component to add the product to DB