WordPress.org

Ready to get started?Download WordPress

Forums

WP e-Commerce
wpsc_add_to_cart Action (3 posts)

  1. Matteo Legittimo
    Member
    Posted 1 year ago #

    This code in function php not working:

    function theme_cart_update() {
    echo <<<HTML
    jQuery("#theme-checkout-count").html("im here");

    HTML;
    }
    add_action('wpsc_add_to_cart', 'theme_cart_update');

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

  2. bentleykfrog
    Member
    Posted 1 year ago #

    Thought I'd test and see if it is at least eval'd using add_action to wpsc_add_to_cart. This works if you're using firefox with firebug.

    function theme_cart_update() {
        echo 'console.log("im here");';
    }
    add_action('wpsc_add_to_cart', 'theme_cart_update');

    What does <<<HTML mean?

  3. Matteo Legittimo
    Member
    Posted 1 year ago #

    I tried before, not working.
    <<< It's heredoc syntax for string
    Look at:

    http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.