WordPress.org

Support

Support » Plugins and Hacks » WP eCommerce » [Resolved] Need a link on a picture which will add a product to the basket!

[Resolved] Need a link on a picture which will add a product to the basket!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Edward

    @edwardinstinct

    You could use something like the following.

    First go to the page you want to add the product to and click the “Add a product editor button” It looks like a credit card. (see following screenshot)
    Add Product Short Code Editor Button

    Select the “Product” Tab in the dialog that appears. Select a product from the Drop Menu in this dialog (see following screenshot)
    Product tab product drop menu

    Scroll down in this dialog and select the “Add an add to cart button” option. (see following screenshot)
    Add to cart option

    This results in a shortcode that produces something like the following

    <div class="wpsc-add-to-cart-button">
    <form class="wpsc-add-to-cart-button-form" id="product_476" action="" method="post">
    <div class="wpsc_variation_forms">
    </div>
    <input type="hidden" name="wpsc_ajax_action" value="add_to_cart">
    <input type="hidden" name="product_id" value="476">
    <input type="submit" id="product_476_submit_button" class="wpsc_buy_button" name="Buy" value="Add To Cart">
    <input type="hidden" name="bb2_screener_" value="1398949885 69.116.7.166"></form>
    </div>

    Now you can use some basic CSS to alter the appearance of this button.

    In the code above you see a line for the button
    <input type="submit" id="product_476_submit_button" class="wpsc_buy_button" name="Buy" value="Add To Cart">

    You see this has ID product_476_submit_button your button will have a different number so do not just copy paste this.

    Create a CSS style something like the following

    #product_476_submit_button{
    border: none; /* remove the border */
    background-color: transparent;
    height: 140px; /* need to set a height and width */
    width: 170px;
    /* add your image as a background */
    background-image: url(http://getshopped.org/wp-content/themes/getshopped/images/showcase1.png);
    text-indent: -2000px; /* remove the button text */
    }

    Hope this helps

    Thanks for the reply! Much appreciated.
    I understand what you are saying. Though I’ve tried and all I get is a window with a 0 in it where you click ‘add and add to car button”

    Here is the page http://abodesofas.com/showroom/chesterfield-sofas/manhattan-leather-chesterfield-sofa/ basically I want a button underneath the prices at the bottom which will add the individual variation to the car. At this moment in time the variation is selected by clicking the drop down menu.

    Hope you can shed some light on this.

    Thanks.

    Basically, the button is already there under the plugin. The plugin is a pricing table, i just need to add a link on the button which will add each indivdual variation to the cart if it’s clicked.

    Hope you understand what I mean, it’s kinda difficult to get it across what I want 🙂

    Plugin Author Edward

    @edwardinstinct

    What you are attempting is not possible out of the box. You might be able to have a developer build something custom. Here is a list of prominent WordPress / WPEC developers that may be able to assist you with custom development and design.
    http://getshopped.org/consultant/

    Good Luck!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Need a link on a picture which will add a product to the basket!’ is closed to new replies.
Skip to toolbar