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

Change text on 'Add To Cart' button

by

Tips and Tricks HQ Support Portal › Forums › Simple PayPal Shopping Cart › Simple shopping Cart Usage › Change text on 'Add To Cart' button

Tagged: add to cart button, button

  • This topic has 3 replies, 2 voices, and was last updated 15 years, 4 months ago by amin007.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • January 7, 2010 at 12:56 pm #632
    ukmgranger
    Member

    Hi there,

    Is there a way to make the text on the ‘Add to Cart’ button reflect the price that I have given to it?

    Or alternativley is there any way of turning the button into a text link?

    January 8, 2010 at 5:46 am #17079
    amin007
    Participant

    You want to put the Price inside the button (as the text of the button)? If you want this then it should be doable quite easily. A button has the following code:

    echo ‘<input type=”submit” value=”Add to Cart” />’;

    the text inside the “value” is what gets displayed on the button so all you have to do is put the price there instead of the text “Add to Cart”. something like the following should achieve it:

    echo ‘<input type=”submit” value=”‘.$price.'” />’;

    January 11, 2010 at 9:29 am #17080
    ukmgranger
    Member

    Sorry about this but I am a bit of a noob when it comes to editing PHP!

    I assume that I am looking for the line echo ‘<input type=”submit” value=”Add to Cart” />’; in the wp_shopping_cart.php file?

    I can’t seem to find it. is there any chance that you could give me a line number to edit?

    Thanks

    Martin

    January 12, 2010 at 12:18 am #17081
    amin007
    Participant

    Search for the following line

    $replacement .= '<input type="submit" value="'.$addcart.'" />';

    and change it to

    $replacement .= '<input type="submit" value="'.$price.'" />';

    This is in the “wp_shopping_cart.php file”

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 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