• Hi,

    I have managed to put the following code into a section of my page to display four downloadable virtual items:

    <div id=”woo_shortcodes”>

    <div id=”woo_items”><?php echo do_shortcode(‘[products ids=”638, 641, 642, 643″ columns=”4″ order=”asc” orderby=”date”]’); ?></div>

    <div id=”woo_cart”><?php echo do_shortcode(“[woocommerce_cart]”); ?></div>

    <div id=”woo_checkout”><?php echo do_shortcode(“[woocommerce_checkout]”); ?></div>

    </div>

    Once visitor clicks the ‘buy now’ button, the item gets in the cart, but in order to display the cart together with the checkout/payment below the items, visitor have to refresh the page. I would like to know how can I make the cart/checkout sections to appear without page refresh right after visitor clicks the buy now item button. How can I accomplish this?

    I like the solution on the actual checkout page for example when there are more than one payment options listed and once visitor selects between the options, the spinning circle comes up with opacity on the page letting the visitor know that the page/section is refreshing.

    My site is: unitedpostage.com

    Thank you

    https://wordpress.org/plugins/woocommerce/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    You’ll need to implement Ajax for this to work. It’s going to be a bit larger of a task than you might initially think. You’ll run into some more problems such as empty cart redirects and is_checkout() conditional returning false.

    Might want to look into using one of these extensions:

    https://woocommerce.com/products/woocommerce-one-page-checkout/
    https://wordimpress.com/plugins/woocommerce-quick-checkout/

    Thread Starter unitedp

    (@unitedp)

    Thank you Caleb,

    The Ajax implementation is most definitely out of my knowledge.

    I see that the woocommerce-quick-checkout supports PayPal Pro, so I would go with that. In their demo it is clear that even at a page where you add an item via short code, once user clicks to buy, the checkout does not appear automatically. So, basically I will run into the same issue I have now. Do you know by chance if this is adjustable in that plugin?

    Thank you

    Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    I’m not sure if it’s possible or not to have it automatically appear with that plugin. You’d need to contact their support.

    I do know that WooCommerce One Page Checkout will also support PayPal Pro. It does more of what you were looking to do earlier, in that the checkout appears underneath the products on your one page checkout page. It does the automatic updating for you. Check out the video 🙂

    Thread Starter unitedp

    (@unitedp)

    Thank you Caleb. I sent them an email.

    The reason why I did not even watch the Woo video is because their support said that their subscription plugin does not support paypal pro, therefore I will not be able to sell the monthly subscriptions via their plugin. My idea was to create the desired items on the deired page, get the checkout on the same page with the short codes and then find a subscription plugin that will work.
    But now, I am totally confused because I watched the video you suggested, I see that they have what I need, plus I also see in the video about the pricing table template being customizable with the example of monthly packages.
    What do you suggest to do?
    I would like to sell one single downloadable virtual software with different monthly recurring subscriptions. Have these packages listed on a desired page where visitor will checkout as well.

    Thank you,
    Peter

    Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    I think you are mixing up the three things you need. You need a subscriptions extensions, a payment gateway that works with subscriptions, and a single page checkout extension.

    As far as I’m aware, PayPal Pro doesn’t work with recurring billing: https://docs.woocommerce.com/document/paypal-pro-2/#section-11. This has nothing to do with the single page checkout plugin you use.

    You need to find a gateway that works with subscriptions: https://docs.woocommerce.com/document/subscriptions/payment-gateways/

    And then WooCommerce Subscriptions will allow you to have a variable billing period: https://docs.woocommerce.com/document/subscriptions/faq/#section-13

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘working with shortcodes to display checkout after item placed in cart’ is closed to new replies.