Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Awesome work whatadewitt! For those looking for a more detailed explanation of what’s going on I wrote a post about it http://wp.me/p1F7Tn-1a.

    The add to cart button can be found in the wpsc-single_product.php, wpsc-products_page.php files in the wp-e-commerce theme. If you don’t have these theme files included in your site theme, you can copy them over from wp-content/plugins/wp-e-commerce/wpsc-theme.

    If you copy these files into your theme, they will be used ahead of the plugin versions.

    Basically anywhere you move the following code, is where the button will appear:

    <div class="wpsc_buy_button_container">
        <div class="wpsc_loading_animation">
    	<img title="Loading" alt="Loading" src="<?php echo wpsc_loading_animation_url(); ?>" />
    	<?php _e('Updating cart...', 'wpsc'); ?>
        </div><!--close wpsc_loading_animation-->
        <?php if(wpsc_product_external_link(wpsc_the_product_id()) != '') : ?>
        <?php $action = wpsc_product_external_link( wpsc_the_product_id() ); ?>
        <input class="wpsc_buy_button" type="submit" 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() ); ?>')">
        <?php else: ?>
        <input type="submit" value="<?php _e('Add To Cart', 'wpsc'); ?>" name="Buy" class="wpsc_buy_button" id="product_<?php echo wpsc_the_product_id(); ?>_submit_button"/>
        <?php endif; ?>
    </div><!--close wpsc_buy_button_container-->

Viewing 2 replies - 1 through 2 (of 2 total)