• Resolved dannywhitehead

    (@dannywhitehead)


    We use an ERP called Stok.ly to keep most of our product data and sync it to WooCommerce via REST API. We use a custom attribute within Stok.ly that is mapped to WooCommerce’s ‘menu_order’ attribute to specify the order product variations appear within a variable product.

    When I sync a product from Stok.ly to Woocommerce, it successfully changes the ‘menu_order’ value, but the order in the variable product doesn’t change.

    I’ve exported a products CSV from WooCommerce, and it contains columns for both ‘Meta: menu_order’ and ‘Position’. They don’t always match. Changing values in the ‘Position’ to match the ‘Meta: menu_order’ value and importing back into WooCommerce fixes the order.

    The problem is, the ‘Position’ value isn’t visible via the API in Stok.ly, so I can’t map to it.

    Does anyone have any idea what the problem might be? We have the ‘Post Types Order’ plugin enabled.

    Is there any way to make the ‘position’ values visible and changeable via the API?

Viewing 1 replies (of 1 total)
  • Plugin Support Mahfuzur Rahman(woo-hc)

    (@mahfuzurwp)

    Hi @dannywhitehead,

    Thank you for reaching out!

    Based on your description, the variation order issue seems to stem from how the menu_order and position attributes are handled in WooCommerce. The menu_order attribute is used internally for sorting, but the position attribute determines the display order of variations within a variable product. Currently, WooCommerce does not expose the position attribute via the REST API, which is why you’re unable to map it directly from Stok.ly.

    You can manually adjust the variation order from the product edit screen in WooCommerce, or continue using your current approach of updating the CSV file and re-importing it to correct the variation order. However, to make the position attribute accessible and editable via the REST API, custom development would be required. While this falls outside our support scope, a developer can help extend the API for this purpose.

    Additionally, as this involves Stok.ly and the Post Types Order plugin, we recommend reaching out to their support teams to explore potential solutions for compatibility or alternative syncing methods. You might also consider consulting a developer or joining the WooCommerce Developer Slack channel for further insights: https://woocommerceslack.herokuapp.com/.

    Thank you.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.