WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Sumit1988
    Member
    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?

    http://wordpress.org/plugins/wp-e-commerce/

  2. Sumit1988
    Member
    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() ); ?>);
    </script>

    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.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.