Forum Replies Created

Viewing 15 replies - 16 through 30 (of 59 total)
  • Thread Starter Flamekebab

    (@flamekebab)

    The one that Jigoshop ships with.

    Thread Starter Flamekebab

    (@flamekebab)

    I can’t edit the post but here’s the mysql output with the code formatting:

    mysql> SELECT *  FROM wp_postmeta WHERE post_id = 1763 AND meta_key LIKE 'stock_status';
    +---------+---------+--------------+------------+
    | meta_id | post_id | meta_key     | meta_value |
    +---------+---------+--------------+------------+
    |   11572 |    1763 | stock_status | 1          |
    +---------+---------+--------------+------------+
    1 row in set (0.00 sec)
    Thread Starter Flamekebab

    (@flamekebab)

    I thought it might be something like that.

    It seems like I’ll have to disable Jetpack’s comment form functionality as it seems like I can’t edit its fields.

    Thread Starter Flamekebab

    (@flamekebab)

    So… erm, does that mean it only works during migration? How do I run the script?

    Thread Starter Flamekebab

    (@flamekebab)

    I don’t pay for support so I figure it’s on me to provide helpful bug reports and try to find solutions if I want them fixed!

    Speaking of which, did you ever create a script to fix this problem:
    https://wordpress.org/support/topic/additional-product-images-dont-migrate-potential-bug/

    ?

    Thread Starter Flamekebab

    (@flamekebab)

    I’ve seen some things in the changelog about related problems. Has a tool to fix this stuff been created yet?

    Thread Starter Flamekebab

    (@flamekebab)

    There’s something in the 2.1.2 changelog about this but it hasn’t fixed things that have already been migrated.

    As far as I can tell the problem is that items have the stock_status value in wp_postmeta of either 0 or 1 and the “Hide out of stock” setting relies on that.

    For some reason the migration didn’t set these values properly.

    An easy fix would be for JigoShop’s devs to create a script that looks for wp_postmeta’s stock_stock value and if it’s less than 1 sets the “stock_status” to 0…

    While you’re at it, sort out the values identified here to fix attachments.

    Thread Starter Flamekebab

    (@flamekebab)

    As much as I appreciate you fixing the problem it’d be better if I fixed PHP. What’s the problem?

    Thread Starter Flamekebab

    (@flamekebab)

    I’ve tried reapplying the setting since updating to 2.1.1 and the problem is still present.

    Thread Starter Flamekebab

    (@flamekebab)

    Fixed in 2.1.1.

    Thread Starter Flamekebab

    (@flamekebab)

    Looks like the fix worked!

    Thread Starter Flamekebab

    (@flamekebab)

    This looks to have been fixed in 2.1.1.

    Thread Starter Flamekebab

    (@flamekebab)

    Thread Starter Flamekebab

    (@flamekebab)

    Right, after a pointer from the JigoShop support staff it looks like the way to access it is relatively straightforward once one has a few key bits of information.

    First off – the location of the API!

    So my shop is at http://fox-box.co.uk

    The API access is as follows for me:
    https://fox-box.co.uk/api/v1/

    Visiting https://fox-box.co.uk/api/v1/ping results in this:
    {"success":true,"time":1494254232}
    That shows that we’ve got the right location!

    Then it’s a matter of authenticating. Setup users and passwords in JigoShop’s advanced settings tab.

    Running this:
    curl https://fox-box.co.uk/api/v1/token -X POST -u user:password

    Outputs this:
    {"success":true,"token":"[censored]"}

    The censored token being a string that’s 200+ characters long.
    That token is then used to make requests to the API. For example running this:
    curl https://fox-box.co.uk/api/v1/products/6531 -X GET -H "Authorization: Bearer [censored]"

    Spits out this:

    {
    "success": true,
    "data": {
    "id": 6531,
    "type": "simple",
    "name": "Fox Box Frankenork",
    "description": "<p>Back in 2010 <a href="http://gorkamorka.co.uk">The Unnamed Gorkamorka Site</a> released a Halloween scenario featuring “Da Monster” drawn by <a href="http://taytonclait.deviantart.com/art/Da-Frankenork-204020294">Clayton Tait</a>. Well <a href="https://yaktribe.org">YakTribe</a> had a contest a little while back with the theme “<a href="https://yaktribe.org/community/threads/yaktribe-competition-13-it-came-from-the.4663/">It came from the…</a>” and I felt like having a bash at this sculpt would be a fun challenge. It’s taken a while to get it cleared for commercial release but now we’re good to go!</p> <p>As you can see in the comparison photos – this guy is <em>big</em>. He can easily go toe-to-toe with a Games Workshop Ork warboss and uses a similar 40mm base.</p> <p>Also he only has nine toes. I was planning to link to <a href="http://weeblsstuff.wikia.com/wiki/Joust">the first Joust episode of Weebl and Bob at this point</a> but it’s no longer easily accessible (<a href="http://swfchan.com/5/21304/?Weebl+and+Bob+-+084+-+Joust.swf">although it can be found here</a>) so my hilariously antiquated pop culture references will have to be forgone on this occasion.</p> <p>This kit is supplied in four parts, including the base, cast in resin and so some clean-up may be required. For further details see our <a title="Working With Resin" href="http://fox-box.co.uk/working-with-resin/" target="_blank" rel="noopener noreferrer">Working With Resin page</a>.</p> <p>Sculpted by Benjamin Fox. Supplied unpainted.</p> <p><iframe src="https://www.youtube.com/embed/Iz8VC1uji3s?rel=0" width="518" height="291" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p> ",
    "sku": "",
    "brand": "Fox Box",
    "gtin": "",
    "mpn": "",
    "featured": false,
    "visibility": 3,
    "is_taxable": true,
    "tax_classes": [
      "standard"
    ],
    "size": {
    "weight": "0",
    "width": "0",
    "height": "0",
    "length": "0"
    },
    "attributes": [],
    "attribute_order": null,
    "attachments": {
    "image": [
      {
    "width": 1000,
    "height": 1000,
    "file": "http://fox-box.co.uk/wp-content/uploads/2016/10/frankenork_square_side.jpg",
    "sizes": {
    "thumbnail": {
    "file": "http://fox-box.co.uk/wp-content/uploads/frankenork_square_side-150x150.jpg",
    "width": 150,
    "height": 150,
    "mime-type": "image/jpeg"
    },
    "medium": {
    "file": "http://fox-box.co.uk/wp-content/uploads/frankenork_square_side-250x250.jpg",
    "width": 250,
    "height": 250,
    "mime-type": "image/jpeg"
    },
    "medium_large": {
    "file": "http://fox-box.co.uk/wp-content/uploads/frankenork_square_side-768x768.jpg",
    "width": 768,
    "height": 768,
    "mime-type": "image/jpeg"
    },
    "post-thumbnail": {
    "file": "http://fox-box.co.uk/wp-content/uploads/frankenork_square_side-980x110.jpg",
    "width": 980,
    "height": 110,
    "mime-type": "image/jpeg"
    },
    "shop_tiny": {
    "file": "http://fox-box.co.uk/wp-content/uploads/frankenork_square_side-36x36.jpg",
    "width": 36,
    "height": 36,
    "mime-type": "image/jpeg"
    },
    "shop_thumbnail": {
    "file": "http://fox-box.co.uk/wp-content/uploads/frankenork_square_side-90x90.jpg",
    "width": 90,
    "height": 90,
    "mime-type": "image/jpeg"
    },
    "shop_small": {
    "file": "http://fox-box.co.uk/wp-content/uploads/frankenork_square_side-150x150.jpg",
    "width": 150,
    "height": 150,
    "mime-type": "image/jpeg"
    },
    "shop_large": {
    "file": "http://fox-box.co.uk/wp-content/uploads/frankenork_square_side-300x300.jpg",
    "width": 300,
    "height": 300,
    "mime-type": "image/jpeg"
    },
    "admin_product_list": {
    "file": "http://fox-box.co.uk/wp-content/uploads/frankenork_square_side-32x32.jpg",
    "width": 32,
    "height": 32,
    "mime-type": "image/jpeg"
    }
    },
    "image_meta": {
    "aperture": "0",
    "credit": "",
    "camera": "",
    "caption": "",
    "created_timestamp": "0",
    "copyright": "",
    "focal_length": "0",
    "iso": "0",
    "shutter_speed": "0",
    "title": "",
    "orientation": "0",
    "keywords": [],
    }
    },
      {
    "width": 1000,
    "height": 1000,
    "file": "http://fox-box.co.uk/wp-content/uploads/2016/10/frankenork_square_back.jpg",
    "sizes": {
    "thumbnail": {
    "file": "http://fox-box.co.uk/wp-content/uploads/frankenork_square_back-150x150.jpg",
    "width": 150,
    "height": 150,
    "mime-type": "image/jpeg"
    },
    "medium": {
    "file": "http://fox-box.co.uk/wp-content/uploads/frankenork_square_back-250x250.jpg",
    "width": 250,
    "height": 250,
    "mime-type": "image/jpeg"
    },
    "medium_large": {
    "file": "http://fox-box.co.uk/wp-content/uploads/frankenork_square_back-768x768.jpg",
    "width": 768,
    "height": 768,
    "mime-type": "image/jpeg"
    },
    "post-thumbnail": {
    "file": "http://fox-box.co.uk/wp-content/uploads/frankenork_square_back-980x110.jpg",
    "width": 980,
    "height": 110,
    "mime-type": "image/jpeg"
    },
    "shop_tiny": {
    "file": "http://fox-box.co.uk/wp-content/uploads/frankenork_square_back-36x36.jpg",
    "width": 36,
    "height": 36,
    "mime-type": "image/jpeg"
    },
    "shop_thumbnail": {
    "file": "http://fox-box.co.uk/wp-content/uploads/frankenork_square_back-90x90.jpg",
    "width": 90,
    "height": 90,
    "mime-type": "image/jpeg"
    },
    "shop_small": {
    "file": "http://fox-box.co.uk/wp-content/uploads/frankenork_square_back-150x150.jpg",
    "width": 150,
    "height": 150,
    "mime-type": "image/jpeg"
    },
    "shop_large": {
    "file": "http://fox-box.co.uk/wp-content/uploads/frankenork_square_back-300x300.jpg",
    "width": 300,
    "height": 300,
    "mime-type": "image/jpeg"
    },
    "admin_product_list": {
    "file": "http://fox-box.co.uk/wp-content/uploads/frankenork_square_back-32x32.jpg",
    "width": 32,
    "height": 32,
    "mime-type": "image/jpeg"
    }
    },
    "image_meta": {
    "aperture": "0",
    "credit": "",
    "camera": "",
    "caption": "",
    "created_timestamp": "0",
    "copyright": "",
    "focal_length": "0",
    "iso": "0",
    "shutter_speed": "0",
    "title": "",
    "orientation": "0",
    "keywords": [],
    }
    },
      {
    "width": 1500,
    "height": 860,
    "file": "http://fox-box.co.uk/wp-content/uploads/2016/10/frankenork_size_comparison_gw.jpg",
    "sizes": {
    "thumbnail": {
    "file": "http://fox-box.co.uk/wp-content/uploads/frankenork_size_comparison_gw-150x86.jpg",
    "width": 150,
    "height": 86,
    "mime-type": "image/jpeg"
    },
    "medium": {
    "file": "http://fox-box.co.uk/wp-content/uploads/frankenork_size_comparison_gw-250x143.jpg",
    "width": 250,
    "height": 143,
    "mime-type": "image/jpeg"
    },
    "medium_large": {
    "file": "http://fox-box.co.uk/wp-content/uploads/frankenork_size_comparison_gw-768x440.jpg",
    "width": 768,
    "height": 440,
    "mime-type": "image/jpeg"
    },
    "large": {
    "file": "http://fox-box.co.uk/wp-content/uploads/frankenork_size_comparison_gw-1024x587.jpg",
    "width": 1024,
    "height": 587,
    "mime-type": "image/jpeg"
    },
    "post-thumbnail": {
    "file": "http://fox-box.co.uk/wp-content/uploads/frankenork_size_comparison_gw-980x110.jpg",
    "width": 980,
    "height": 110,
    "mime-type": "image/jpeg"
    },
    "shop_tiny": {
    "file": "http://fox-box.co.uk/wp-content/uploads/frankenork_size_comparison_gw-36x21.jpg",
    "width": 36,
    "height": 21,
    "mime-type": "image/jpeg"
    },
    "shop_thumbnail": {
    "file": "http://fox-box.co.uk/wp-content/uploads/frankenork_size_comparison_gw-90x52.jpg",
    "width": 90,
    "height": 52,
    "mime-type": "image/jpeg"
    },
    "shop_small": {
    "file": "http://fox-box.co.uk/wp-content/uploads/frankenork_size_comparison_gw-150x86.jpg",
    "width": 150,
    "height": 86,
    "mime-type": "image/jpeg"
    },
    "shop_large": {
    "file": "http://fox-box.co.uk/wp-content/uploads/frankenork_size_comparison_gw-300x172.jpg",
    "width": 300,
    "height": 172,
    "mime-type": "image/jpeg"
    },
    "admin_product_list": {
    "file": "http://fox-box.co.uk/wp-content/uploads/frankenork_size_comparison_gw-32x18.jpg",
    "width": 32,
    "height": 18,
    "mime-type": "image/jpeg"
    }
    },
    "image_meta": {
    "aperture": "0",
    "credit": "",
    "camera": "",
    "caption": "",
    "created_timestamp": "0",
    "copyright": "",
    "focal_length": "0",
    "iso": "0",
    "shutter_speed": "0",
    "title": "",
    "orientation": "0",
    "keywords": [],
    }
    }
    ],
    },
    "categories": [
      {
    "id": 70,
    "name": "Fox Box",
    "slug": "fox-box",
    "link": "https://fox-box.co.uk/product-category/fox-box/"
    },
      {
    "id": 5,
    "name": "Greenskins",
    "slug": "orcs",
    "link": "https://fox-box.co.uk/product-category/orcs/"
    }
    ],
    "tags": [
      {
    "id": 86,
    "name": "Fox Box",
    "slug": "fox-box",
    "link": "https://fox-box.co.uk/product-tag/fox-box/"
    },
      {
    "id": 44,
    "name": "Orc",
    "slug": "orc",
    "link": "https://fox-box.co.uk/product-tag/orc/"
    },
      {
    "id": 31,
    "name": "Resin",
    "slug": "resin",
    "link": "https://fox-box.co.uk/product-tag/resin/"
    },
      {
    "id": 92,
    "name": "Special!",
    "slug": "special",
    "link": "https://fox-box.co.uk/product-tag/special/"
    }
    ],
    "link": "https://fox-box.co.uk/product/fox-box-frankenork/",
    "cross_sells": [],
    "up_sells": [],
    "regular_price": 5.99,
    "stock": {
    "manage": false,
    "status": 1,
    "allow_backorders": "no",
    "stock": 0
    },
    "sale": {
    "enabled": false,
    "price": "",
    "from": {
    "timestamp": 1493683200,
    "date": "2017-05-02"
    },
    "to": {
    "timestamp": 1493683200,
    "date": "2017-05-02"
    }
    }
    }
    }

    That should be enough to figure out the other bits of the API, I suspect.

    My only question now is – what’s the secret key for?!

    Thread Starter Flamekebab

    (@flamekebab)

    Huh. You’re absolutely right! Well in that case I’ll just disable it.

    Good catch!

Viewing 15 replies - 16 through 30 (of 59 total)