API-ACCESS for automated EXTRACTION of PhocaCart-Data

Phoca Cart - complex e-commerce extension
User avatar
CRM-Hero
Phoca Member
Phoca Member
Posts: 31
Joined: 24 Sep 2023, 12:11

API-ACCESS for automated EXTRACTION of PhocaCart-Data

Post by CRM-Hero »

Hello Folks, hello Jan,

I just registered and I am keen on exchanging information and understanding/improving PhocaCart.
I have studied intensively the web and this forum but could not find solutions.
Several different issues are addressed and that is why I am opening different threads.

  1. API-ACCESS for automated EXTRACTION OF PHOCA CART DATA
    1. How to access Phoca Cart Modules and Views (Databank Lists, Queries)
      • with API from an external application
    2. Especially Phoca Cart: Orders (Order List)
      • to access with API from an external application
      • most importantly: API address path
    3. Same for: Phoca Cart Customers (Customer List)
      • to access with API from an external application
      • API address path
  2. Joomla Web-Services is installed
    1. Using Postman as an API-tool, with Bearer Joomla-token
    2. Access to Joomly Components WORKS FINE
    3. Access to Joomla-Customers is also possible
    4. Example adress:
      https://Your_Web_Adress/api/index.php/v1/modules/site
Thanks in advance
Roland

Current System:
Joomla 4.3.4
PhocaCart 4.0.7
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49111
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: API-ACCESS for automated EXTRACTION of PhocaCart-Data

Post by Jan »

Hi, Joomla uses webservices plugins for this kind of operations. For now such plugin for Phoca Cart is under development. But really no idea when it will be released:
https://github.com/PhocaCz/PhocaCartWebservicesPlugin

Jan
If you find Phoca extensions useful, please support the project
User avatar
CRM-Hero
Phoca Member
Phoca Member
Posts: 31
Joined: 24 Sep 2023, 12:11

Re: API-ACCESS for automated EXTRACTION of PhocaCart-Data

Post by CRM-Hero »

Hi Jan,

PhocaCartWebservicesPlugin looks very interesting. I will try it in the next days and give feedback.

Best regards
Roland
Jan wrote: 26 Sep 2023, 23:49 Hi, Joomla uses webservices plugins for this kind of operations. For now such plugin for Phoca Cart is under development. But really no idea when it will be released:
https://github.com/PhocaCz/PhocaCartWebservicesPlugin
Jan
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49111
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: API-ACCESS for automated EXTRACTION of PhocaCart-Data

Post by Jan »

Hi, it is still on start.
If you find Phoca extensions useful, please support the project
User avatar
CRM-Hero
Phoca Member
Phoca Member
Posts: 31
Joined: 24 Sep 2023, 12:11

Re: PhocaCartWebservicesPlugin

Post by CRM-Hero »

Hi Jan,

I have installed the PhocaCart-WebService Plug-In:
  • but there is no change in what was available already before installation
    (Maybe because I had already Joomla-WebServices installed ?)
  • it shows a number of PhocaCart Modules (as before)
  • https://My_Web_Adress/api/index.php/v1/modules/site
Any advice on what the plug-in is supposed to make different ?

PS:
I am looking for a module listing/showing Customer-Orders

Regards Roland

CRM-Hero wrote: 28 Sep 2023, 11:30 Hi Jan,
PhocaCartWebservicesPlugin looks very interesting. I will try it in the next days and give feedback.
Best regards
Roland
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49111
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: API-ACCESS for automated EXTRACTION of PhocaCart-Data

Post by Jan »

Hi, I will be in online chate with the developer on thursday so I will ask him if he already made some progress regarding this plugin.

Jan
If you find Phoca extensions useful, please support the project
keep2000
Phoca Enthusiast
Phoca Enthusiast
Posts: 89
Joined: 14 Nov 2022, 12:04

Re: API-ACCESS for automated EXTRACTION of PhocaCart-Data

Post by keep2000 »

Hello Jan,

I'm currently experimenting with the Webservices plugin.
I can successfully get the list of orders via
api/index.php/v1/phocacart/orders,
and also a single order at
api/index.php/v1/phocacart/orders/135,
but that one only returns basic information.

Code: Select all

{
    "links": {
        "self": "https://..../api/index.php/v1/phocacart/orders/135"
    },
    "data": {
        "type": "orders",
        "id": "135",
        "attributes": {
            "id": 135,
            "order_token": "2feb98207139fc83d37b83775b21ea408c3fd3e43d4a07ed36613836b153d9d3",
            "user_id": 0,
            "group_id": 0,
            "invoice_id": 0,
            "products": []
        }
    }
}
How can I retrieve the full order details through the REST API?
For example: products, shipping, payment, and customer information?

Thanks
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49111
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: API-ACCESS for automated EXTRACTION of PhocaCart-Data

Post by Jan »

Hi, for now, this is not implemented yet in Webservice plugin. :-(

Jan
If you find Phoca extensions useful, please support the project
Post Reply