Tips and Tricks HQ Forum

Support Forum for Tips and Tricks HQ Products

Register or log in - lost password? (Having an issue with the forum login?)

Search the Forum

Tips and Tricks HQ Forum » Simple PayPal Shopping Cart » Simple shopping Cart Usage

Change text on 'Add To Cart' button

(4 posts) (2 voices)
  • Started 2 years ago by ukmgranger
  • Latest reply from amin007
  • Possible Solutions (Related Topics):
    1. How to change 'add to cart' button text
    2. line up add to cart button and change short code
    3. Is it possible to use a text link instead of a button for 'add to cart'?
    4. "Update cart" button? or text "Hit enter to update cart"
    5. How to change eStore Cart Text color for labels

Tags:

  • add to cart button
  • button
  1. 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?

    Posted 2 years ago #
  2. amin007
    Key Master

    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.'" />';

    Posted 2 years ago #
  3. 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

    Posted 2 years ago #
  4. amin007
    Key Master

    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"

    Posted 2 years ago #

RSS feed for this topic

Reply

You must log in to post.

Tips and Tricks HQ  | WP Shopping Cart  | WP Affiliate Software  | WordPress Membership Plugin