• Resolved Sagar Gulati

    (@sagargulati)


    Greetings,
    Trying to build an AngularJS theme for wordpress along with woocommerce but i see the api is also limited to alot of features.
    How can we set Cash of Delivery for particular regions in WC and how can we charge for that as well.
    Also we want to do that via API but we weren’t even able to find that inside the WC core to set cod area wise in a country.

    We want to see via api:
    1) User enter pin code.
    2) Make a request you api/page
    3) Get request if current region with that pin code has cod available or not.
    4) Should validate the pin code as well default country wise.

    There are alot of basic e-commerce modules missing out.

    Any guide or help?

    Please help!

    https://www.ads-software.com/plugins/woocommerce/

Viewing 15 replies - 1 through 15 (of 23 total)
  • Plugin Contributor Mike Jolley

    (@mikejolley)

    The REST API in WC does not cover customer cart + interaction.

    It covers product, coupon, customer data, and order editing.

    So you won’t be able to use this API for this type of functionality unless you build your own.

    Thread Starter Sagar Gulati

    (@sagargulati)

    Greetings,
    That is what we asked, can you help/guide us how can we achieve that with api or any other way?

    We need to find a ajax way out for the same. Also how can we get cart contents via ajax or save it in a variable/cookie so that it can be used in angularjs?

    Thanks!

    Plugin Contributor Mike Jolley

    (@mikejolley)

    I cannot really help you out with this as it involves coding a new API for cart interaction from scratch. Thats no small task.

    You at the very least need your own ajax endpoints to retrieve data.

    Thread Starter Sagar Gulati

    (@sagargulati)

    Greetings,
    So you say without php there is no way to fetch data via ajax?

    Plugin Contributor Mike Jolley

    (@mikejolley)

    You have to have a handler on the server side so no. The only data you could access via javascript would the REST API endpoints that we **do** include. But as I mentioned, this does not include endpoints for the cart.

    Thread Starter Sagar Gulati

    (@sagargulati)

    Since u specified “It covers product, coupon, customer data, and order editing.”

    How to filter product categories and get only categories via api which has parent with particular id?

    Like https://somedomain.com/wc-api/v3/products/categories?filter%5Bparent%5D=13

    Thanks!

    Plugin Contributor Mike Jolley

    (@mikejolley)

    These are the filters currently supported in api v3 https://woothemes.github.io/woocommerce-rest-api-docs/#parameters

    FYI we’re working on a new api (https://woocommerce.wordpress.com/2016/04/22/new-rest-api-based-on-the-wp-rest-api-in-2-6/) so if there are things missing you can either report them or contribute them once live.

    Thread Starter Sagar Gulati

    (@sagargulati)

    I don’t see any filter parameter for getting child/sub categories only
    Can you tell me what we have to query for to get all the child categories of a particular category?

    Parent ID = 13, Parent Slug = “men”
    i want to get all sub categories of men or category with id 13

    Also could you please share the link where i can request features for the new api? When is the expect time of its release?

    Thanks!

    Plugin Contributor Mike Jolley

    (@mikejolley)

    There isn’t one, I linked to the ones which are available.

    2.6 is launching in a few weeks. I’ll see if we can add a category filter in a future release. Or as I said, you can contribute it to get it done faster via github.

    Thread Starter Sagar Gulati

    (@sagargulati)

    Then how you said “It covers product, coupon, customer data, and order editing”
    Categories are part of product.
    Before that, is there a way out we can do that even?

    Can u share the link where i can make feature request. What date should we expect for the next release?

    Thanks!

    Plugin Contributor Claudio Sanches

    (@claudiosanches)

    Parent ID = 13, Parent Slug = “men”
    i want to get all sub categories of men or category with id 13

    It’s possible in the WP REST API included in WooCommerce 2.6.
    But not possible right now in our current API.

    Thread Starter Sagar Gulati

    (@sagargulati)

    Can you Please share the any beta version or tell when it will be live?
    Also share the link for contributing to the plugin to request features?

    Thanks!

    Plugin Contributor Mike Jolley

    (@mikejolley)

    Thread Starter Sagar Gulati

    (@sagargulati)

    Greetings,
    Thanks for sharing.
    Can you also share the link about the new filters, like Mr. Claudio said

    It’s possible in WP REST API in WC 2.6
    I Have updated, so how can i filter and get sub categories with a parent cat via API?

    Thanks!

    Plugin Contributor Mike Jolley

    (@mikejolley)

    The docs will be live for new API before 2.6 launches. Follow the dev blog.

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘WC API AngularJS COD & Basic Features’ is closed to new replies.