• Resolved Jelle Tempelman

    (@jtempelman)


    Hi Alaxandre,

    I found something and I think it is a bug, but you may have special reasons for this.

    If I have activated multiple locations for a product, and they are all stocked. When I deactivate one location, in the postmeta table in the database the meta_key remains. As a result, the stock remains in the database.

    I ran into this problem because I work with custom queries. I’ve added the link to the website I’m currently working on so you can see what I’m talking about.

    I first retrieve all existing locations from the database and then look up the stock. This ensures that a location is also shown when they have no stock / are not activated.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor alexmigf

    (@alexmigf)

    Hello @jtempelman

    How are you deactivating the location? Let me know.

    • This reply was modified 4 years, 7 months ago by alexmigf.
    Thread Starter Jelle Tempelman

    (@jtempelman)

    Hi @alexmigf
    sorry for the late response, overlooked the email.

    I disable the location in de sidebar (see image)
    All the steps I take are:

    1. Create a product
    2. Link all locations in the side menu
    3. Fill in stock for all locations
    4. Delete link between 1 location and the product
    Plugin Contributor alexmigf

    (@alexmigf)

    Hi @jtempelman

    Correct, in fact the post meta will remain in the database but it will be ignored for stock usage and total stock, can you confirm that?

    Your issue is having the post meta in the database?

    Thread Starter Jelle Tempelman

    (@jtempelman)

    Yes indeed, the post meta is not destroyed when I disable a location.
    I was not sure if this is a bug or a development choice.
    I ran into it because I get data directly from the database to display in my theme.

    What my sql-query does is:
    I first retrieve all existing locations from the database and then look up the stock. This ensures that a location is also shown when it has no stock / is not activated for that product.

    Plugin Contributor alexmigf

    (@alexmigf)

    Hi @jtempelman

    Ok, personally i don’t consider it a bug, but i will include a fix for that in the next release.

    Hope that helps!

    Thread Starter Jelle Tempelman

    (@jtempelman)

    Thanks @alexmigf very helpfull!
    Have a great evening!

    Plugin Contributor alexmigf

    (@alexmigf)

    Hi @jtempelman

    It’s fixed in the last release, please update.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Disabled location’ is closed to new replies.