Home › Forums › Ticket Products › Event Tickets Plus › Stock levels not going down when tickets sold
- This topic has 9 replies, 2 voices, and was last updated 8 years, 11 months ago by Nico.
-
AuthorPosts
-
May 29, 2015 at 7:31 am #965994JamieParticipant
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
May 29, 2015 at 1:40 pm #966137NicoMemberHi 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,
NicoJune 1, 2015 at 6:31 am #966371JamieParticipantHi Nico, I’ve tried a test purchase then looked into, Inventory and Stack Qty which still says 30. Any thoughts?
June 1, 2015 at 10:45 am #966433NicoMemberHi 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,
NicoJune 2, 2015 at 6:36 am #966598JamieParticipantHi 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. ThanksJune 2, 2015 at 12:02 pm #966671NicoMemberJamie,
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,
NicoJune 3, 2015 at 4:45 am #966867JamieParticipantHi Nico, How do I confirm the purchase in the back end? Thanks
June 3, 2015 at 5:15 am #966876JamieParticipantI’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 🙁
June 3, 2015 at 5:19 am #966878JamieParticipantAhhhh Ive solved it!! I had the product set as a virtual product in Woocommerce. Ive changed this and all works. 🙂
June 3, 2015 at 7:23 am #966907NicoMemberGreat 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 -
AuthorPosts
- The topic ‘Stock levels not going down when tickets sold’ is closed to new replies.