Support » Plugin: WP eCommerce » [Plugin: WP e-Commerce] Can I use a custom add to cart button?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi Jaylowx,

    Yes you can by changing the button class in you child themes ccs. You have to know some code to do it yourself – or ask your developer – its a very simple and quick task,

    Hi Jay,

    Your css will most likely look something like this:

    #content input.wpsc_buy_button
    {
        background: url('images/buynow.png') no-repeat top left transparent;
    }

    Where #content input.wpsc_buy_button is the CSS selector you might be using and buynow.png is your new buy now button imag. You would changing this, most likely in the wpsc-default.css file.

    Hope that helps.

    That’s brilliant – it worked, thank you.

    How would I make it so there’s no text in the button & the button is purely an image and not restricted to a certain size (so when I overwrite the button image with a different sized button image it would be the new size)?

    Hope that makes sense…

    Hi Jay,

    In your wpsc-list_view.php page or wpsc-grid_view.php you will find a line like this: (just search for the class name wpsc_buy_button)

    <input class="wpsc_buy_button" type="button" value="<?php echo wpsc_product_external_link_text( wpsc_the_product_id(), __( 'Buy Now', 'wpsc' ) ); ?>" onclick="return gotoexternallink('<?php echo $action; ?>', '<?php echo wpsc_product_external_link_target( wpsc_the_product_id() ); ?>')">

    Just change it to something like this:

    <input class="wpsc_buy_button" type="button" value="<?php echo wpsc_product_external_link_text( wpsc_the_product_id(), __( '', 'wpsc' ) ); ?>" onclick="return gotoexternallink('<?php echo $action; ?>', '<?php echo wpsc_product_external_link_target( wpsc_the_product_id() ); ?>')">

    Note: the Buy Now has been removed.

    That should do the trick.

    Thanks but that didn’t seem to do anything?

    I just want a button that’s an image that when clicked adds my product to the basket. I want to be able to change the image whenever I want by changing the url to the image. I want to use something like this: http://www.aquariumfish.net/_paypal/images/paypal_add_to_cart.gif

    This is the page I’m trying to do it on: http://utgold.co.uk/?page_id=10

    Sorry if I’m being stupid, I’m new to wordpress and not familiar with how to code at all.

    bobspalding

    (@bobspalding)

    I can’t seem to get it to work @sixfootjames, I followed your instructions, am I doing something wrong?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: WP e-Commerce] Can I use a custom add to cart button?’ is closed to new replies.