Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Matt Bliss 176 posts 234 karma points c-trib
    Jan 24, 2012 @ 11:28
    Matt Bliss
    0

    Invoke XSLT and additional data in cart_step01.xslt

    I've added additional information in the cart_step01.xslt file to show for example stock availability and standard delivery costs, but these do not get updated when Invoke XSLT is called by pressing the + and - buttons against a product in the basket. If the page is reloaded then all the values update correctly.

    Do I need to update something else in order for these values to recalculate?

  • Rune Grønkjær 1372 posts 3103 karma points
    Jan 24, 2012 @ 13:33
    Rune Grønkjær
    0

    Hi Matthew,

    Are you sure it updates the full cart step. I believe the standard script will only update the parts it needs to.

    Check out the function updateCartUI(order) in teaCommerce_Simple.js. Thats the one that updates the cart. You can change it update the whole cart or whatever :)

    /Rune

  • Matt Bliss 176 posts 234 karma points c-trib
    Jan 24, 2012 @ 14:05
    Matt Bliss
    0

    Hi Rune,

    I've just looked at that and see what you mean. I had just assumed it was using the same InvokeXSLT method as the product page. Is it possible to use Invoke XSLT on the cart step 1 page and if so what would I need to change?

    Thanks,

    Matt

  • Rune Grønkjær 1372 posts 3103 karma points
    Jan 24, 2012 @ 14:09
    Rune Grønkjær
    0

    Yes. The step is allready set up with an invokeXSLT div. Just do something like in updateProduct(productEle)

    /Rune

  • Matt Bliss 176 posts 234 karma points c-trib
    Jan 24, 2012 @ 14:44
    Matt Bliss
    0

    Hi Rune,

    The solution was even more simple than that, I just replaced the entire contents of...

    function updateCartUI(order)

    ... in 'teaCommerce_Simple.js' with a single line of code...

    updatePageUI();

    ...and that did the trick perfectly!

    Thanks for getting me looking in the right place.

    Matt

  • Rune Grønkjær 1372 posts 3103 karma points
    Jan 24, 2012 @ 14:48
    Rune Grønkjær
    0

    Yes, of course. That would work even better. Good thing I know my own code ;-)

    /Rune

Please Sign in or register to post replies

Write your reply to:

Draft