Remove an Appointment from shopping cart

Hi,

I've just installed marketpress 3.0.0.2 and have a couple more issues

1) When I make an appointment and put it in my shopping cart if I change my mind and decide to remove that appointment it doesn't remove it from Appointments+. The time is still blocked out and the appointment is sat as pending. Is it possible to integrate the two better and move it to removed so someone else is able to book the appointment immediately. I have pending appointments set to delete after 20 mins so I presume they will be come available again after 20 mins.

2) Currently I can book an appointment and go through to the marketpress cart but then manually change the quantity to 2 or 3 or 4 etc. I want to disable any changing of the quantity here as it should all be done through the appointments+ plugin properly.

Thanks
Kieran

  • Panos
    • SLS

    Hi Kieran ,

    I have attached a plugin that should resolve the first issue, so by removing an appointment from the cart it should set the Appointment to Removed status.

    Depending on your feedback I will inform developer to push it into next version :slight_smile:

    I haven't found a solution for the second one, but I thought you may wanted to try this out without waiting until the second one is resolved :slight_smile:

    Thanks!
    Panos

  • Kieran
    • The Crimson Coder

    Hey Panos

    Great that seems to be working for me! However still one minor hurdle.

    When I have two appointments in my shopping cart and I remove one of them. It all works fine. I can see the appointment correctly move from pending to remove. However an "Add again" link pops up after you click remove. Which If I click it doesn't bring it back out from removed to pending. Which would be ideal.

    If this is not possible to do I suggest we just hide that "add again" link but it's possible other marketpress users would like that to remain.

    Many Thanks
    Kieran

  • Panos
    • SLS

    Hi Kieran ,

    You're right, I didn't realize that :slight_smile: Thanks for pointing it out !

    I changed it so this should be fixed in plugin attached this time :slight_smile:

    I will be looking into Marketpress displaying the quantity dropdown issue in Marketpress, until there is a fix for this you can hide it with some css, for example:

    add_action( 'wp_head', 'wpmdev_hide_dropdown_in_cart', 10 );
    
    function wpmdev_hide_dropdown_in_cart(){
    
    	?>
    	<style>
    	#mp-cart .mp_cart_item_content.mp_cart_item_content-qty .mp_select2{
    	display: none;
    	}
    	</style>
    	<?php
    
    }

    You can paste the above snippet in your theme's functions.php file or copy only the css part and paste it in your child theme's style.css file or you theme's custom css field if it provides any :slight_smile:

    Cheers!
    Panos

  • Kieran
    • The Crimson Coder

    Hi Panos,

    Thanks again for the help. I can confirm the removal issue is now fixed. It moves from pending to removed and back again :slight_smile: Excellent stuff!

    I've added the CSS to my child theme and can confirm this seems to be working as a temporary fix although obviously if in the future I want to sell actual products it wont work. I think we need a seperate product type called "Appointments" which would enable us to make a longer term solution and be a better fix for everyone.

    Just to finish off this temporary fix can we also temporarily remove the quantity from the checkout page too. See Attached screenshot.

    Thanks for the efforts though this is already starting to look better :slight_smile:

    Thanks!
    Kieran

  • Kieran
    • The Crimson Coder

    Hi Panos,

    Sorry to reopen this thread. The last bit of code you gave goes a bit too far. It makes the "remove" link disappear completly from the cart but I'd like to keep that in case someone changes their mind and wants to remove an appointment after it's added

    I would still like the quantity boxes removed so I've kept the first bit of the code but now obviously i have the quantity number on the final page. Can you help tweak please

    Kind Regards
    Kieran

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.