Appointments do not work when using Product shortcode

I am using Appointments + and the Marketpress ecommerce integration. I created a product which you can find here working: http://onlinejazzschool.com/store/products/brent/

I tried to use the product shortchode: [mp_product product_id="371"] to be able to order that appointment from a workers profile, and nothing is clickable. It does not work. You can find the use of that shortcode here: http://onlinejazzschool.com/test/

If that is not supported, how can i add an appointment to a normal page and use swipe at checkout and not Paypal?

Thanks,

  • Vaughan

    Hi @justin,

    Welcome to the forum.

    Thanks for your feedback, I have just tested this on my own site & also confirm the issue.

    The issue looks to be related to the Javascript that appointments+ uses but it isn't getting defined or isn't present when using the [my_product product_id="XX"] shortcode on a page.

    I will report this as a bug for the developer to look into and see if we can get this fixed up as quickly as possible. This user case has never been reported before, so it's something that has slipped through the testing procedure.

    Hope this helps

  • Vladislav

    Hello,

    If I got everything right, you're looking to have MarketPress product available from worker profile when it's rendered as a description (ie. not when it's viewed as a standalone page). To get there, you will first need to make sure that your app_service_providers shortcode also includes description="content" argument as well, like so:

    [app_service_providers description="content"]

    This will open up a possibility for rendering the shortcodes within the worker description - basically, it will tell the plugin to treat the descriptions as something other than plan text (that's the default). To actually render the shortcode, we will need a line added to your theme's functions.php like this:

    add_filter('app_content', 'do_shortcode');

    This line will tell Appointments that you want the shortcodes rendered too when used in service provider description, and the product should be rendered properly.

  • Jack Kitterhing

    Hi there @Justin,

    Hope you're well today! :slight_smile:

    Could you send me through the following please, so I can get this working for you. :slight_smile:

    - In the subject field add "Attn: Jack Kitterhing"
    - Link back to this thread
    - Include admin/network access
    - Include FTP
    - Include any relevant URLS for your site

    On the contact form, select "I have a different question", this ensures it comes through and gets assigned to me.

    https://premium.wpmudev.org/contact/

    Thank you!

    Kind Regards
    Jack.

  • Vinod Dalvi

    Hi @justin,

    I have tested it on my test site using latest version of Appointment & MarketPress plugins and could reproduce the issue. I have also followed the instructions provided by @Vladislav in his following reply but the issue remains on the page having MarketPress product shortcode where product is an Appointment.

    https://premium.wpmudev.org/forums/topic/appointments-do-not-work-when-using-product-shortcode#post-702008

    The issue is causing because the Appointment CSS and JS is not getting loaded on the page having MarketPress shortcode [mp_product product_id="371" title="0" ] but it is getting loaded for the pages having Appointments shortcodes.

    I have notified the developer to fix this issue.

    In the meanwhile you can fix this issue by editing the following Appointments plugin file on line number 4020 as below.

    Appointments plugin file:
    appointments/appointments.php

    Before Editing:
    if ( is_object( $post ) && stripos( $post->post_content, '[app_' ) !== false ) {

    After Editing:
    if ( is_object( $post ) && ( stripos( $post->post_content, '[app_' ) !== false || stripos( $post->post_content, '[mp_product' ) !== false ) ) {

    Note: You are making changes in the plugin file and these changes will be overwritten and lost when you update the plugin and you will have to make these again after plugin updation.

    Alternatively if you don't want to edit core plugin file then just add the following code in the page content wherever you use MarketPress product shortcode where product is an Appointment.

    <span style="display:none">[app_]</span>

    Best Regards,
    Vinod Dalvi

    • Justin

      Hi Vinod,

      Now, after I have modified the appointments plugin, it is almost working. Now the java-script is coming across and I can get to the part where users fill in details. 2 issues: The Buy Now button is always visible, meaning if they click it at the beginning, it while take them to the shopping cart with a product that costs $0... 2nd is, even after you enter in the information and click the "confirm this appointment" button, the buy it now price does not get updated, and if you select the button it is still $0, when the price was should be at $30.

      If you try and walk through ordering a lesson, you will see the issue: http://www.onlinejazzschool.com/?project=brent-vaartstra

      Select the day -> Select the Time ->Fill in the information and select the "Please Click Here to confirm this appointment" -> Select Buy NOW

      Also is it possible to after the users selects the time they want to meet, to take the user to another page to fill in their information, or after they fill in their information when they select the "please confirm this appointment" button to take them to the shopping cart?

      Thanks for your help.

  • Jack Kitterhing

    Hi there @Justin,

    Hope you're well today and thanks for your patience on this, sorry about the delay, I was away for the past 10 days.

    I've been discussing this with the lead developer of Appointments+, he's said that this hack to get around and make the integration work this way, most likely isn't going to work without further extensive customization, as even if we did get the product price to show, that won't reflect back on the appointment and then it won't be registered as paid.

    Would it be possible at all for you to use the integration in the out of the box manner? Maybe even having the appointment product page in a iframe on click?

    Thank you!

    Kind Regards
    Jack.

    • Justin

      @Jack Kitterhing,

      Well the only reason I am using the marketplace integration is because of the ability to utilize other payment methods. I wanted to use stripe. I really want to have the user have a seamless experience. Ideally a user would go to the instructors page and quickly be able to see their avalibilty and book it in the side section. If we use a Iframe it would not re-size to the page correct? If you have an idea of how to make the current page look pretty similar to what it does now, or have the same basic functionality but work properly I would love to hear it.

      Any help would be helpful, seeing as I only really wanted Wpmudev for this main feature.

      This is the page we are trying to get working. http://www.onlinejazzschool.com/?project=brent-vaartstra

      thanks,
      Justin

  • Jack Kitterhing

    Hi there Justin,

    Hope you're well today, thanks for your patience here.

    I've been discussing this with the lead developer and he agrees that using an iFrame would be the only way to get that to work as you need, as the shortcode method won't work on that page.

    So in the iFrame you'd have the page on with the bookable times, we can make this responsive, so it should still all work as you need.

    Could you try adding the iFrame and then I can assist you in getting it all working :slight_smile:

    There's a guide here on responsive iframes http://www.smashingmagazine.com/2014/02/27/making-embedded-content-work-in-responsive-design/

    Thanks!

    Kind Regards
    Jack.

    • Justin

      Hi @Jack Kitterhing I have now added the iframe. Not looking good so far.

      I tried inputting the css that it had, and it completely hide everything, so currently this css is not active.

      #cal_iframe {
      position: relative;
      padding-bottom: 56.25%;
      padding-top: 35px;
      height: 0;
      overflow: hidden;
      }

      #cal_iframe iframe{
      position: absolute;
      top:0;
      left: 0;
      width: 100%;
      height: 100%;
      }

      You can see the progress here: http://www.onlinejazzschool.com/?project=brent-vaartstra

      It is doing the iframe from here: http://www.onlinejazzschool.com/store/products/brent/

      Let me know what else I need to do to get it looking right. I would love to just use the appointments app and not use the marketplace app if it allowed payments through stripe or another option that would not make them leave the site.

      Also I started checking out. THE Iframe idea might not be a good idea. Because when you click the buy now button, it does not open in a new page, but in the iframe, which is terrible. I don't think that unless you have a solution to transfer the buy now button to the entire screen(full screen)?

    • Justin

      Hi @Jack Kitterhing I have now added the iframe. Not looking good so far.

      I tried inputting the css that it had, and it completely hide everything, so currently this css is not active.

      #cal_iframe {
      position: relative;
      padding-bottom: 56.25%;
      padding-top: 35px;
      height: 0;
      overflow: hidden;
      }

      #cal_iframe iframe{
      position: absolute;
      top:0;
      left: 0;
      width: 100%;
      height: 100%;
      }

      You can see the progress here: http://www.onlinejazzschool.com/?project=brent-vaartstra

      It is doing the iframe from here: http://www.onlinejazzschool.com/store/products/brent/

      Let me know what else I need to do to get it looking right. I would love to just use the appointments app and not use the marketplace app if it allowed payments through stripe or another option that would not make them leave the site.

      Also I started checking out. THE Iframe idea might not be a good idea. Because when you click the buy now button, it does not open in a new page, but in the iframe, which is terrible. I don't think that unless you have a solution to transfer the buy now button to the entire screen(full screen)?

  • Jack Kitterhing

    Hi there @Justin,

    Hope you're well today, I've been taking a look at this and can see what you mean with the iframe handling the complete process, but it's actually too small to handle that process and none of the content properly fits within it.

    How about if the buy button for that, then opened up the new window to make the purchase?

    As unfortunately at the moment to take any payments via something other than PayPal, MarketPress is required and the integration isn't designed to work on a workers profile, which is why we're trying this workaround. :slight_smile:

    Thank you!

    Kind Regards
    Jack.

    • Justin

      @Jack Kitterhing

      Well I am pretty disappointed that we have been working on this for a month and have not made any progress. I am not super impressed with having to have another screen, because that will probably reduce conversion rates.

      I want to make sure that the appointments built in paypal system only allows you to go out to the paypal website to pay, and then back, there is no way to keep the user on the site 100% through the payment cycle?

  • Vaughan

    Hi Justin,

    Unfortunately this just isn't possible with the current release, The developer is now aware of this issue and we have added it to the features list for the developer to look at adding in a future release, as it requires quite extensive coding to achieve. We are working on improving this in upcoming releases and the next version of marketpress 3.0 will certainly make it easier for plugins to hook into mp for their gateways.

    This is an issue spread between both mp & apps+ so both developers are working on this for both plugins.

    Hope this helps

  • Justin

    Hi @Vaughan,

    I am having issues now with emails not sending from the appointment plugin, the emails through the contact, and password function are working. I found in my Global Javascript plugin that you have added around 100+ lines of code. Since you were not able to find a solution, do you think you any of those lines are preventing the emails from going out when someone schedules an appointment?

    thanks

    Thanks,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.