Forum Replies Created

Viewing 15 replies - 1 through 15 (of 20 total)
  • @dsbking , @sucuri1

    I’m having the same issue. It used to be dead easy to do this.
    I wonder whether they’re just trying to sell their premium service by breaking the free one?
    3 Months after and still nothing?

    Not quite sure how this topic can be marked ‘resolved’?

    • This reply was modified 1 year, 3 months ago by ozbassplayer.
    ozbassplayer

    (@ozbassplayer)

    Marcel
    I’d contact you on your website if you had an email or a contact form on it, but you don’t.
    my website: https://jrdesign.com.au.
    There’s a contact form: https://jrdesign.com.au/contact

    ozbassplayer

    (@ozbassplayer)

    Hi Marcel.
    A really quick question regarding your product.
    I’m creating products via WC REST API.
    The question is – in the JSON, can I use something like this (image url is dynamic):

    “images”: [
    {
    “src”: “https://996356.app.netsuite.com/core/media/media.nl?id=1022936&c=996356&h=b3579ce7d2680de37931”
    }
    ],
    I tried installing the free plugin and used Postman to test, but the request failed.
    1: Do I need to buy the pro version to allow the REST API to function?
    2: Will it allow me to reference the images via a query ?ID ?

    Happy to pay if this will work.
    Cheers
    JR

    OK then you need to sent a POST request with a correctly formatted JSON in the body to create new product, and a PUT if you want to update an existing product. Try using Postman to help you with this.
    Understand that once you’ve done this, the data will reside in your wordpress site. but new products and updated products you can use the methods explained above.
    The rest endpoints are well explained in the documentation that I provided a link for above.

    Example of a PUT product update JSON:
    {
    “name”: “First Test Product Title Change by REST”,
    “slug”: “first-product”,
    “description”: “<h2>This product was created in WordPress using the standard WordPress / WooCommerce Environment</h2>\n<p>It’s a simple product, with no variations.</p>\n”,
    “short_description”:”First Test Product “,
    “regular_price”: “199.50”
    }
    /* —————————- */
    the URL would be something like this with the method set to PUT(product id is 18 in this case:
    https://example.com/wp-json/wc/v2/products/18?consumer_key=insert_consumer_key&consumer_secret=insert_consumer_secret

    /* —————————- */
    Example of a POST new product JSON
    {
    “name”: “API-Generated Product”,
    “slug”: “api-generated”,
    “permalink”: “https://example.com/product/api-generated/&#8221;,
    “type”: “simple”,
    “status”: “publish”,
    “featured”: false,
    “catalog_visibility”: “visible”,
    “description”: “<h2>Created using WC REST API</h2>\n<p>Create the JSON data without an id value.</p><p>Use POST (not put). Remember to include consumer key & secret.</p>\n”,
    “short_description”: “<p>REST API POST call</p>\n”,
    “sku”: “wprestapi_1”,
    “price”: “100.00”,
    “regular_price”: “100.00”,
    “sale_price”: “”,
    “date_on_sale_from”: null,
    “date_on_sale_from_gmt”: null,
    “date_on_sale_to”: null,
    “date_on_sale_to_gmt”: null,
    “price_html”: “<span class=\”woocommerce-Price-amount amount\”><span class=\”woocommerce-Price-currencySymbol\”>$</span>0.02</span>”,
    “on_sale”: false,
    “purchasable”: true,
    “total_sales”: 0,
    “virtual”: false,
    “downloadable”: false,
    “downloads”: [],
    “download_limit”: -1,
    “download_expiry”: -1,
    “external_url”: “”,
    “button_text”: “”,
    “tax_status”: “taxable”,
    “tax_class”: “”,
    “manage_stock”: false,
    “stock_quantity”: null,
    “in_stock”: true,
    “backorders”: “no”,
    “backorders_allowed”: false,
    “backordered”: false,
    “sold_individually”: false,
    “weight”: “”,
    “dimensions”: {
    “length”: “”,
    “width”: “”,
    “height”: “”
    },
    “shipping_required”: true,
    “shipping_taxable”: true,
    “shipping_class”: “”,
    “shipping_class_id”: 0,
    “reviews_allowed”: false,
    “average_rating”: “0.00”,
    “rating_count”: 0,
    “related_ids”: [],
    “upsell_ids”: [],
    “cross_sell_ids”: [],
    “parent_id”: 0,
    “purchase_note”: “”,
    “categories”: [
    {
    “id”: 17,
    “name”: “Main Category”,
    “slug”: “main-category”
    },
    {
    “id”: 18,
    “name”: “Sub Category”,
    “slug”: “sub-category”
    }
    ],
    “tags”: [],
    “images”: [ ],
    “attributes”: [],
    “default_attributes”: [],
    “variations”: [],
    “grouped_products”: [],
    “menu_order”: 0,
    “meta_data”: [

    ],
    “_links”: {
    “self”: [],
    “collection”: []
    }
    }
    /* —————————- */
    the URL would be something like this with the method set to POST:
    https://example.com/wp-json/wc/v2/products/?consumer_key=insert_consumer_key&consumer_secret=insert_consumer_secret

    I just re-read your question and need clarification:
    Do you want to store all product info elsewhere, and call it INTO your wordpress site on the fly?
    I’m scratching my head…. do you want to create products in woocommerce without names, descriptions etc and have those automatically populate (somehow) on the fly, or do you want to have a CRM style of core control outside of your website which stores the original data and periodically populates your WC site as required? Once that’s done the data would remain on your site until another update.
    Is that what you mean?

    You need to set up the WC Rest API first and get your consumer key & secret.
    Then use those credentials in an API call like this:
    https://yourdomain.com/wp-json/wc/v2/products/?consumer_key=yourconsumerkey123&consumer_secret=yourconsumersecret.
    Documentation is here: https://woocommerce.github.io/woocommerce-rest-api-docs/

    Seb, I agree with you – I have customers with products that a simple category or tag just won’t do enough.
    You can easily create custom taxonomies for WC products just like you do for standard and custom posts.
    It’d be great to just use the ‘include in rest’, the ‘rest base’ and the controller where you create the new taxonomy.
    Seems like a glaring omission to me.

    I have exactly the same problem.
    Same theme too

    Bump

    I’m having exactly the same issue.
    I set:
    memory_limit = 256M
    upload_max_size = 64M
    post_max_size = 64M
    upload_max_filesize = 64M
    max_execution_time = 300
    max_input_time = 1000

    Server log error
    44068#0: *4383688 connect() failed (111: Connection refused) while connecting to upstream

    Hey Rashid.
    Cheers for this insight – great spotting.
    Did you make a workaround?
    Perhaps adding those files to a child theme?
    JR

    I’m sure that if the author of this plugin was really keeping tabs on his work, this discussion would have come up on his radar and he would have intervened before the discussion went pear-shaped.
    That in itself is an indication.

    But I’ll leave the mincing of words to you guys – in argosmedia’s words, ‘I’m out’.

    And I just realised that IndikatorDesign is actually not the author. My bad. Perhaps I should redact.

    I was surfing the web and looking for a few solutions to help speed up some sites.

    I do like the idea of being able to control where and how plugins are loaded – the idea of loading pages up with redundant code just doesn’t make sense, right?

    Which is where I got to this plugin. What a great idea!

    I appreciate the fact that open-source means that the product is free, so the developer often has to put a lot of time into maintaining, improving and supporting the plugin.

    I’ve used hundreds of free plugins, some of which have been perfect for the site, some not so much.
    But I do believe that if you put a plugin up to the WordPress Repository, you take that commitment on board. We all know that if a free plugin is awesome (with awesome support), then the ‘pro’ paid version will probably be worth it and we’d be the first to pay for it.

    Somehow I got caught on this thread and decided to read it through to the end.
    The first comment from argosmedia, although not a glittering endorsement of the plugin, was certainly not worth what followed.

    I do understand that when you put heart and soul into building something, when someone else makes comments that aren’t totally positive, it’s easy to let the ego get in the way and read it differently.

    I do believe that argosmedia was actually trying to help the developer improve the product, but somehow what could have been an informative discussion turned into an ego-driven rant.

    Cynicism and sarcasm really have no place here.

    I almost downloaded and installed this plugin, but after reading this, I realised that if I had a problem, somehow it would be all my fault, because clearly the developer is not interested in anything other than praise.

    I too have been coding for many years (about 33) and fully understand the development lifecycle from a commercial and open source environment.

    I wish you well with this project, IndikatorDesign, because I think that the idea is good. But even looking at the screenshots (because I have no intention of installing this plugin) I would tend to agree with argosmedia.

    ozbassplayer

    (@ozbassplayer)

    Cheers Cparker32. Like kenniswong1977 I’m also using Avada and needed this solution.
    Thankfully I spent only 3 minutes finding the solution here.
    Cheers, I owe ya a beer!

Viewing 15 replies - 1 through 15 (of 20 total)