Jump to content
Sign in to follow this  
Pixrael

Woocommerce REST API can be cloned?

Recommended Posts

I have a technical question that maybe you can guide me to a solution/idea.

I know an online tool that publishes product information and updates prices/inventories regularly from marketplaces such as Amazon, Ebay, etc. to a Wordpress website ... can get the orders information, auto-order it and send back the tracking numbers. All this is done through the Woocommerce API. They don't have an API or CSV option to access this features..

Is it possible to create fake REST endpoints (a clone of WooCommerce) on my site to accept requests from that external website and process this data my way inside PW? The requests to a REST endpoint are POST like in regular forms submits?

Sorry I don't have to much technical background about this

Share this post


Link to post
Share on other sites
4 hours ago, clsource said:

Another option is to create a "Fake Woocommerce" site and use PW inside their handlers
in order to save the data into PW.

This is a solution I was thinking about at the beginning, but it could be very complex for me ... maybe I'll install WP + WC in a subdomain to act as a "router" and then I can connect to the WC API to get/put information the exact information I'll need about prices, inventory and orders ... it's crazy, but I need that tool, so I need to be creative 🙂

Thanks for you response

Share this post


Link to post
Share on other sites
38 minutes ago, Pixrael said:

but I need that tool,

What tool is that, btw?

Share this post


Link to post
Share on other sites

is Shopmaster ... by the way yesterday I bought a license for Padloper .. and I'll be ready for the new version 😉

  • Like 1

Share this post


Link to post
Share on other sites
6 hours ago, Pixrael said:

This is a solution I was thinking about at the beginning, but it could be very complex for me ... maybe I'll install WP + WC in a subdomain to act as a "router" and then I can connect to the WC API to get/put information the exact information I'll need about prices, inventory and orders ... it's crazy, but I need that tool, so I need to be creative 🙂

Thanks for you response

well you can always read the database directly

or use the wordpress rest api 🙂

  • Thanks 1

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By ngrmm
      My clients wants a modal to show up on every page. But when a user clicks inside the modal -> a session-cookie is set and the modal gets a class.
      // user clicks on modal button $('.modal_button').click(function(){ // 1. set PW session cookie // 2. toggle class $('.modal').toggleClass('off'); }); I know how to set a cookie on page-load via PW-API. But the click on the modal button does not force a page-load. So i have to set the cookie through javascript. Is there a way to do that?
    • By VeiJari
      Hello,
      I'm trying to create a page via api and populate values to it. I can populate everything except user pages to a page reference array.
      Code: 
      $dataUsers = $data->project->users; foreach($dataUsers as $dataUser) { $newProject->projectUsers->add(wire()->pages->find('template=user, id=' . $dataUser->id)); } I'm receiving my data via JSON.
      Is there something I'm missing?
      Thanks for help
    • By VeiJari
      Hi, this is the first we are trying to make a page that has only one type of user that has access to every page. 
      The other users should only have a given access to specific pages, not to the whole template.
      My structure
      -Field -Organisation -Project -Report I want that the "measurer" role only has access to "project x" and it's children, but no view access to every project, organisation or field. I've tried to do this with https://modules.processwire.com/modules/page-edit-per-user/ but it still needs a view access to the whole tree to see the "project x" page. Or is there something I haven't figured out?
      Maybe I have to make it via the API: a select field in the "organisation" template where the admins could add the users and then I use hook to update the privileges?
      Have you done something like this and how did you accomplish it?
      Any help would be appreciated.
       
    • By clsource
      Hello, I finished this toy project. A simple API to show data for Chilean Birds.
      Used to flex my PW and React muscles, since a lot of time has passed since making something with those techs.
       

      Code: https://github.com/NinjasCL/chileanbirds-api
      Frontend (React): https://aves.ninjas.cl
      Backend (PW): https://aves.ninjas.cl/api
      Hope you like it 🙂

      Thanks.
       
       
    • By cosmicsafari
      Hi all,
      Before I go potentially wasting time trying to achieve the impossible.
      Can anyone confirm if its possible to have a Page Reference field on a modules config page?
      I'm wanting to essentially just output a list of select able pages based on the a given selector (likely by template at this stage), wherein the select is the pages that the module should apply to etc. I was thinking a simple checkbox list would suffice is asmSelect isn't available.
      Essentially have it display the same way a Page Reference field would display on a template, where you can easily select a bunch of them.
      public function getInputfields() { $inputfields = parent::getInputfields(); $f = $this->modules->get('InputfieldPage'); $f->attr('name', 'testSelect'); $f->setAttribute('multiple', 'checkboxes'); $f->setAttribute('findPagesSelector', 'template=development'); $f->label = 'Test'; $inputfields->add($f); return $inputfields; } Figured something akin to the above would work but can't seem to get rid of this warning on the modules config screen though.

×
×
  • Create New...