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

How to Use the ‘Buy Now’ or ‘Subscribe’ button on a Standalone HTML page

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore General Questions › How to Use the ‘Buy Now’ or ‘Subscribe’ button on a Standalone HTML page

  • This topic has 6 replies, 3 voices, and was last updated 13 years, 5 months ago by Taika.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • December 3, 2011 at 1:52 am #4926
    Taika
    Member

    Hi,

    I love eStore plugin, but have some technical issue(s) with it. First and most important:

    I want to display a buy now button on standalone HTML page.

    I followed the directions in http://www.tipsandtricks-hq.com/ecommerce/wordpress-estore-miscellaneous-tweaks-215 page. However, when I try to find the HTML code from WP Edit page and/or edit post I can only see shorcode like [wp_eStore_buy_now:product_id:22:end] on both visual AND html view. How can I get access to actual HTML code of this ? Thanks, Taika

    December 3, 2011 at 3:22 am #39119
    admin
    Keymaster

    You preview the post or page from the editor or publish it (whatever you prefer). This will let you view the page from the front end (as if a visitor is viewing the page). When you view the page from the front end the shortcode will get rendered and you will be able to click view source in your browser and view the HTML source.

    December 3, 2011 at 3:59 am #39120
    Peter
    Member

    Following from admin’s comment here’s an example of what a single buy now button would like if you wanted to paste it in html:

    <object class=”eStore_button_object”><form action=”https://www.sandbox.paypal.com/cgi-bin/webscr&#8221; method=”post” onsubmit=”return ReadForm1(this, 2);”><input type=”hidden” name=”product_name_tmp1″ value=”test product” /><input type=”hidden” name=”price_tmp1″ value=”0.01″ /><input type=”hidden” name=”cmd” value=”_xclick” /><input type=”hidden” name=”charset” value=”utf-8″ /><input type=”hidden” name=”business” value=”test@gmail.com” /><input type=”hidden” name=”item_name” value=”test product” /><input type=”hidden” name=”amount” value=”0.01″ /><input type=”hidden” name=”currency_code” value=”USD” /><input type=”hidden” name=”item_number” value=”6″ /><input type=”hidden” name=”no_shipping” value=’1′ /><input type=”hidden” name=”notify_url” value=”http://www.yourdomain.com/wp/wp-content/plugins/wp-cart-for-digital-products/paypal.php&#8221; /><input type=”hidden” name=”return” value=”http://www.yourdomain.com/wp/thank-you/&#8221; /><input type=”hidden” name=”mrb” value=”3FWGC6LFTMTUG” /><input type=”hidden” name=”cbt” value=”” /><input type=”hidden” name=”page_style” value=”” /><input type=”hidden” name=”rm” value=”2″ /><input type=”hidden” name=”custom” value=”ip=215.43.60.237&subsc_ref=Premium” id=”eStore_custom_values” /><input type=”submit” class=”eStore_buy_now_button” value=”Buy Now” /></form></object>

    Note, as per admin’s suggestion above, you would extract your particular button code by viewing the source of the wordpress post page where you initially put the button.

    December 3, 2011 at 11:50 pm #39121
    Taika
    Member

    That worked fine, even with custom buy button graphic, thanks a lot. Few more questions: is this possible with forced Agree to terms function ? I tried, but it just took me to paypal page without needing to agree when I pushed the buy button, so I just got rid of the agree terms code for that particular product. Would be cool tho if I could add Agree to terms function (I use it on my store so the customers has to agree to terms = mainly agree to optin to my email list(s) but would like to also add to some of my standalone landing pages products)

    Also,

    I tried the same method on WordPress custom page template, but when I tested the buy button it took me to https://www.paypal.com/cgi-bin/webscr and after that nothing happened, just a blank white page. What could I have been missing…? How can I add correct html code to WP custom page template ?

    Also, just out of curiosity why does the code include MY IP address / why do I need to put it in code ?

    Thanks,

    Taika

    December 4, 2011 at 12:52 am #39122
    Peter
    Member

    Hi Taika,

    Regarding your question – “is this possible with forced Agree to terms function?”

    Yes it is possible but remember that you are not using the button on a WordPress page as intended so to add this you will need to manually add JavaScript code. If you are not a coder then I won’t recommend using this option. Be sure to include the javascript code and references with your button.

    For instance as well as the code for your button you will need to also put things like the following:

    <script type='text/javascript' src='http://www.yourdomain.com/wp-includes/js/jquery/jquery.js?ver=1.6.1'></script>

    <script type='text/javascript' src='http://www.yourdomain.com/wp-content/plugins/wp-cart-for-digital-products/lib/jquery.external.lib.js?ver=3.2.1'></script>

    <p>

    <script type="text/javascript">

    jQuery.noConflict();

    jQuery(document).ready(function($) {

    $(function() {

    $('.t_and_c_error').hide();

    $(".t-and-c").click(function(){

    if($(".t-and-c").is(':checked'))

    {

    $.cookie("eStore_submit_payment","true",{path: '/'});

    $('.t_and_c_error').hide();

    }

    else

    {

    $.cookie("eStore_submit_payment","false",{path: '/'});

    }

    });

    $(".eStore_paypal_checkout_button").click(function(e){

    if(!$(".t-and-c").is(':checked'))

    {

    $('.t_and_c_error').show();

    e.preventDefault();

    }

    });

    $(".eStore_buy_now_button").click(function(e){

    if(!$(".t-and-c").is(':checked'))

    {

    $('.t_and_c_error').show();

    e.preventDefault();

    }

    });

    $(".eStore_subscribe_button").click(function(e){

    if(!$(".t-and-c").is(':checked'))

    {

    $('.t_and_c_error').show();

    e.preventDefault();

    }

    });

    $(".free_download_submit").click(function(e) {

    // Non-Ajax free download squeeze page button clicked...

    if(!$(".t-and-c").is(':checked')) {

    // T&C checkbox not set...

    $('.t_and_c_error').show(); // Show error message.

    e.preventDefault(); // Prevent default action.

    }

    });

    });

    });

    </script>

    </p>

    Regarding the IP address inclusion – You don’t need to put it there. It will still work if you remove the whole tag with id “eStore_custom_values”. I believe this is generated by the plugin itself and not strictly needed when talking to paypal because it is an “optional” field.

    Regarding your custom page template issue I don’t know the answer to that so might have to think about it and get back to you if I find a solution :)

    December 4, 2011 at 3:20 am #39123
    admin
    Keymaster

    If you are not a coder then the following might be an easier option:

    Simply add something like the following just below or above the button (make the “terms and conditions” a link to your terms page):

    “By clicking on the buy button you agree to our terms and conditions”

    December 15, 2011 at 12:39 pm #39124
    Taika
    Member

    Ok, thanks guys.

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

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • 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
  • 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

Our Other Plugins

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

Copyright © 2025 | Tips and Tricks HQ