Giter Site home page Giter Site logo

Comments (17)

jasonknight avatar jasonknight commented on September 26, 2024

Notes will now appear in the order listing.

from woocommerce-json-api.

jasonknight avatar jasonknight commented on September 26, 2024

The order status now shows correctly.

from woocommerce-json-api.

jasonknight avatar jasonknight commented on September 26, 2024

Updating products has been restored.

from woocommerce-json-api.

jasonknight avatar jasonknight commented on September 26, 2024

Write access for orders is coming soon! I'll have to look further into coupons and see how to best represent them.

from woocommerce-json-api.

jasonknight avatar jasonknight commented on September 26, 2024

Test Suite in PHP and one in JS is also being updated/built.

You can check tests with php tests/suite.php

New JS testing interface is in tests/interface/index.html is a full testing app.

from woocommerce-json-api.

tubiz avatar tubiz commented on September 26, 2024

@jasonknight How can I use both testing suites, as per installation and setting it uo,
Thanks

from woocommerce-json-api.

jasonknight avatar jasonknight commented on September 26, 2024

load index.html into a browser, just open the file directly, or the file path to the site. If you don't, you'll have cross domain issues.

Using the php testing suite from the command line is easiest.

from woocommerce-json-api.

tubiz avatar tubiz commented on September 26, 2024

@jasonknight using the js testing client only the get_system_time, get_supported_attributes, get_products, set_products are working.
Also how can I use the php testing suite from the command line (I uses Windows)

from woocommerce-json-api.

jasonknight avatar jasonknight commented on September 26, 2024

Early order write support now added. Only adding notes has been tested.

from woocommerce-json-api.

jasonknight avatar jasonknight commented on September 26, 2024

@tubiz I use windows.

Then you probably can't...I suggest you download Virtual Box and install Debian for testing. WooComm is meant to be deployed to a Linux based server.

Ideally it might kind of work on windows, you'd just have to install php, and do the normal CMD thing, though the test suite uses consol colors, so some junk would appear. You could also test it on your staging server.

from woocommerce-json-api.

jasonknight avatar jasonknight commented on September 26, 2024

Go here and get XAMPP: http://www.apachefriends.org/en/xampp.html
Then install wordpress: http://www.wikihow.com/Install-Wordpress-on-XAMPP

Download and install the woocommerce plugin...

Then run cmd and cd to the plugins directory...and you C:\path\to\xampp\php.exe tests\suite.php

Or something similar. That's just off the top of my head though...Don't really use windows for that kind of stuff.

from woocommerce-json-api.

tubiz avatar tubiz commented on September 26, 2024

@jasonknight the right order status is still not displayed.
All order status still returns pending.

from woocommerce-json-api.

jasonknight avatar jasonknight commented on September 26, 2024

Here are the results of the test on my system after making three orders:

salor@salor-retail:/var/www/woo/wp-content/plugins/woocommerce-json-api$ php tests/get_orders.php 
   *----------------------------------------------------*   
                       Reading Orders                       
   *----------------------------------------------------*   
Has Notes? 1 should equal 1                                 PASSED
Has OrderItems 1 should equal 1                             PASSED
Order status `processing` should not  == pending            PASSED
Order status `refunded` should not  == pending              PASSED
Order status `on-hold` should not  == pending               PASSED
salor@salor-retail:/var/www/woo/wp-content/plugins/woocommerce-json-api$ 

Make sure you have the latest copy?

from woocommerce-json-api.

tubiz avatar tubiz commented on September 26, 2024

@jasonknight All my orders are still returning an order status of pending.
Here is the result of my test, don't know what might be causing it, I am using the lastest copy of the plugin.
Thanks a lot for your help so far.

Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.

PS C:\Users\TUBIZ> cd c:/
PS C:\> cd .\wamp\www
PS C:\wamp\www> cd .\cartmultisite\wp-content\plugins
PS C:\wamp\www\cartmultisite\wp-content\plugins> cd .\woocommerce-json-api
PS C:\wamp\www\cartmultisite\wp-content\plugins\woocommerce-json-api> cd .\tests
PS C:\wamp\www\cartmultisite\wp-content\plugins\woocommerce-json-api\tests> php .\get_orders.php
←[0;34m   *----------------------------------------------------*   ←[0m
←[0;34m                       Reading Orders                       ←[0m
←[0;34m   *----------------------------------------------------*   ←[0m
←[1;33m←[40mHas Notes? 1 should equal 1                                 ←[0m←[0;32m←[40mPASSED←[0m
←[1;33mHas OrderItems 1 should equal 1                             ←[0m←[0;32mPASSED←[0m
←[1;33m←[40mOrder status `pending` should not  == pending               ←[0m←[0;31m←[40mFAILED←[0m
PS C:\wamp\www\cartmultisite\wp-content\plugins\woocommerce-json-api\tests>

from woocommerce-json-api.

jasonknight avatar jasonknight commented on September 26, 2024

What is the database value of the order status? Does it perhaps not have one?

Pending usually means no order status was actually found in the database. What does the status say for this order on the orders show page in woocom?

The code is with a sql query inside WCAPI\Order.php::getStatus() Look in that function and run the sql manually, try to figure out why it's not returning a result. Debug what is returned etc.

from woocommerce-json-api.

tubiz avatar tubiz commented on September 26, 2024

@jasonknight the order status in WC in WP admin is processing, but using the API in my laravel app it is pending.
I tried running the query but no result was found.

SELECT 
        t.slug
      FROM
        wp_terms as t,
        wp_term_relationships as tr,
        wp_term_taxonomy as tt
      WHERE
        tt.taxonomy = 'shop_order_status' AND
        t.term_id = tt.term_id AND
        tr.term_taxonomy_id = tt.term_taxonomy_id AND
        tr.object_id = {$this->_actual_model_id}
      ORDER BY tr.term_order

The value of {$this->_actual_model_id} that I passed is the order id of the order.

Note that I am using this in a multisite install.

from woocommerce-json-api.

jasonknight avatar jasonknight commented on September 26, 2024

Woopsie, table names were hard coded...fixed I hope, pull and see.

from woocommerce-json-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.