Stock levels not going down when tickets sold

Home Forums Ticket Products Event Tickets Plus Stock levels not going down when tickets sold

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #965994
    Jamie
    Participant

    Hi. I spoke to you a couple of days ago and you kindly helped me to add some code so the stock level shows on the front page to the client.
    (https://theeventscalendar.com/support/forums/topic/woocommerce-tickets-7/#post-965410)

    I run events each month and plan to sell 30 tickets to my event, so i needed the viewer to see how many tickets are still available. This code worked perfectly, but now I just noticed that when a ticket is sold, the stock levels dont go down. It still says 30 tickets left.

    Do you have any advice to fix this??

    Much appreciated

    #966137
    Nico
    Member

    Hi Jamie,

    Sorry to see you are still struggling to get that right.

    I reproduced the solution Geoff pointed out for you and then “purchased” a couple of tickets. Went back to the event and the ticket stock is updated reflecting my purchase. So that’s working on my end.

    Have you made a sample purchase on your site to test this? If so please go to WP-Admin > Products > “Your Ticket”, once in there go to Product Data > Inventory and check the Stock Qty. Is it showing something different from what you are seeing in the Event Page?

    Please let me know, I’m sure we can make it work!
    Best,
    Nico

    #966371
    Jamie
    Participant

    Hi Nico, I’ve tried a test purchase then looked into, Inventory and Stack Qty which still says 30. Any thoughts?

    #966433
    Nico
    Member

    Hi Jamie,

    Thanks for the follow up. It appears to be those “test purchases” aren’t affecting the stock, but at least we know it’s not a problem with the code previously provided. I think there’s something wrong with “test purchase”.

    Are you making the “test purchases” from the front-end of the site? Have you confirmed those orders in the back-end?

    You can check out this article from the Knowlegdebase covering orders and attendees management.

    I’ll be waiting for your feedback,
    Happy to help,
    Nico

    #966598
    Jamie
    Participant

    Hi Nico, Yep Im making the orders through the front end to simulate a visitor and it stays on 30 remaining.
    Is this something you’d be able to look at for me if I sent you my log in details, Any help would be much appreciated. Thanks

    #966671
    Nico
    Member

    Jamie,

    I’m sorry to say we are not allowed to login into your site. But of course I’ll keep trying to solve this with you.

    All I can think of is the purchase not being completed somehow. Because what the code you were provided is doing is just picking up the stock managed by WooCommerce.

    Just to be sure, are you confirming the purchase in the back-end? Do you need help on this?

    Thanks for your patience,
    Nico

    #966867
    Jamie
    Participant

    Hi Nico, How do I confirm the purchase in the back end? Thanks

    #966876
    Jamie
    Participant

    I’ve added a plugin that auto sets the status to completed once the payment is received. Ive made 2 purchases from the front end and received emails and tickets confirming booking. The payment is taken and paid to paypal.

    Here is the code I use on the tickets.php file:

    $is_there_any_product_to_sell = true;
    } else {
    echo “<span class=’tickets_nostock’>” . esc_html__( ‘Out of stock!’, ‘tribe-wootickets’ ) . “</span>”;
    }
    echo “</td>”;

    echo “<td nowrap=’nowrap’ class=’tickets_name’>”;
    echo $ticket->name;
    echo “</td>”;

    echo “<td class=’tickets_price’>”;
    echo $this->get_price_html( $product );
    echo “</td>”;

    echo “<td class=’tickets_description’>”;
    echo $ticket->description;
    echo “</td>”;

    echo “<td nowrap=’nowrap’ class=’tickets_stock’>”;
    echo $ticket->stock . ‘ seats left’;
    echo “</td>”;

    echo “</tr>”;
    }

    Does this look correct to you?

    Not sure why the stock level is still at 30 🙁

    #966878
    Jamie
    Participant

    Ahhhh Ive solved it!! I had the product set as a virtual product in Woocommerce. Ive changed this and all works. 🙂

    #966907
    Nico
    Member

    Great catch Jamie! Glad you solved it 🙂

    I’m closing this topic – but please don’t hesitate to create new topics if you need help with anything else.

    Have a great day,
    Nico

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Stock levels not going down when tickets sold’ is closed to new replies.