Ready to get started?Download WordPress


WP eCommerce
Refresh Template Tags after AJAX-Call (2 posts)

  1. Sumit1988
    Posted 9 months ago #

    Hey there,

    i'm using
    printf( _n('%d item', '%d items', wpsc_cart_item_count(), 'wpsc'), wpsc_cart_item_count() );

    somewhere in my template. Sadly this value doesn't get updated if an item is added to the cart, except when it's inside wpsc_cart_widget.php.
    How can i extend the AJAX-refresh to the template tag?


  2. Sumit1988
    Posted 9 months ago #

    Ok i added my own callback function at the bottom of wpsc_cart_widget.php

    <script type="text/javascript">
    	updateCart(<?php printf( _n('%d', '%d', wpsc_cart_item_count(), 'wpsc'), wpsc_cart_item_count() ); ?>);

    This plugin is not nearly as customizeable as it claims to be.
    I'd love to pay for some premium support for my customizations, sadly though it has only some kind of "pay per ticket" policy. But during development there'll be like hundreds of tickets if i want to do it with beautiful, clean, hack-free code.


You must log in to post.

About this Plugin

About this Topic


No tags yet.