Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

eStore Shortcode in page template

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › eStore Shortcode in page template

Tagged: Subscribe button, subscription

  • This topic has 4 replies, 2 voices, and was last updated 9 years, 8 months ago by enyaw.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • July 31, 2013 at 3:16 pm #9417
    enyaw
    Member

    Hi, I am trying to use the WordPRess function ‘do_shortcode’ in my page template. HEre is the code that I am trying to implement but it just returning the shortcode text.

    Example: I am using this in my page template ‘<?php echo do_shortcode (‘[wp_eStore_subscribe:product_id:4:end]’); ?>. But is is not returning the subscribe button. It is only returning ‘[wp_eStore_subscribe:product_id:4:end]’ as a string.

    Can you help me with this?

    Thanks

    July 31, 2013 at 3:23 pm #56891
    enyaw
    Member

    Update: I have found a work around. However, I don’t think that this is the most practical way to do things. I have copied all of the form HTML code by using chrome’s element inspector and it is processing to the Paypal checkout page. But again. if there is a way I can use the shortcode that would be great. But if the way I have done it will work then that would be even greater.

    Thanks

    Wayne Hatter

    August 1, 2013 at 12:38 am #56892
    wpCommerce
    Moderator

    Hi, you can try using the following function instead of copying the html button code:

    <?php echo print_eStore_subscribe_button_form(4); ?>

    Also, the text link purchase button feature can be handy too:

    https://support.tipsandtricks-hq.com/forums/topic/estore-how-to-use-a-text-link-to-accommodate-the-purchase-of-a-product

    August 1, 2013 at 9:36 pm #56893
    enyaw
    Member

    Cool, Thank you.

    August 1, 2013 at 9:42 pm #56894
    enyaw
    Member

    This is how I am utilizing the shortcode function in case there is anyone else wanting to do the same thing:

    function sub_button(){

    ob_start();

    $subscribe = print_eStore_subscribe_button_form(4);

    return $subscribe;

    }

    add_shortcode(‘subscribe’, ‘sub_button’);

    Where ‘4’ is equal to the product ID.

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • WP PDF Stamper Documentation
  • WP Photo Seller Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial
  • WP Photo Seller Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2023 | Tips and Tricks HQ