Support » Plugin: WP eCommerce » [Plugin: WP e-Commerce] Shopping Cart In Header not updating

  • Hi

    I’ve tried searching for ages but so far not found the answer so apologies if this has been asked before.

    I have moved the shopping cart into the header of my website and now it no longer automatically updates when you “add to cart”.

    It does show when you refresh the page so I figure it’s an Ajax thing. Has anyone any ideas where I can find this script and what I need to edit?


Viewing 2 replies - 1 through 2 (of 2 total)
  • [ Moderator Note: Please post code or markup snippets between backticks or use the code button. Or better still – use the pastebin ]

    I needed the same functionality. So what I did was to use the same classes for the div’s containing the shopping cart. This is what I added to my header:

    <?php if(wpsc_cart_item_count() > 0): ?>
        <div class="shoppingcart">
    	<div class="shopping-cart-wrapper">
    	<div class="shoppingcart">
    			<tr class="cart-widget-total">
    				<td class="cart-widget-count">
    					<?php printf( _n('%d item', '%d items', wpsc_cart_item_count(), 'wpsc'), wpsc_cart_item_count() ); ?>
    				<td class="pricedisplay checkout-total" colspan='4'>
    					<?php _e('Total', 'wpsc'); ?>: <?php echo wpsc_cart_total_widget( false, false ,false ); ?>
    					<small><?php _e( 'excluding shipping and tax', 'wpsc' ); ?></small>
    				<td id='cart-widget-links' colspan="5">
    					<a>" title="<?php _e('Checkout', 'wpsc'); ?>" class="gocheckout"><?php _e('Checkout', 'wpsc'); ?></a>
    					<form action="" method="post" class="wpsc_empty_the_cart">
    						<input type="hidden" name="wpsc_ajax_action" value="empty_cart" />
    							<a>" class="emptycart" title="<?php _e('Empty Your Cart', 'wpsc'); ?>"><?php _e('Clear cart', 'wpsc'); ?></a>
    <?php endif; ?>

    Hi There

    Please could you help me. I also need to add the shopping cart to my header. I used the code above but it doesn’t show. Why is that?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WP e-Commerce] Shopping Cart In Header not updating’ is closed to new replies.