Copied to clipboard

Flag this post as spam?

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


  • Bex 444 posts 555 karma points
    Jan 19, 2012 @ 12:01
    Bex
    0

    Removing unique orderlines. How to Check it's unique?

    Hi

    I have just noticed I am unable to remove an item from my basket. 

    Having searched your forum I can see I need to use " TeaCommerce.removeUniqueOrderLine" if the order line is unique. But I can't seem to find anything that tells me how to check if the orderline is unique to know that I need to use that?

    My current js for removing order items is this:

    jQuery('.remove').live('click', function ()
    {
        var button = jQuery(this),
          orderlineEle = button.closest('.orderLine'),
          orderlineid = orderlineEle.attr('orderLineId'),
          productId = orderlineEle.attr('nodeid');
          TeaCommerce.removeOrderLine(productId);
          window.location.href = window.location.href;
        return false;
    });

     

    Becky

  • Rune Grønkjær 1372 posts 3103 karma points
    Jan 19, 2012 @ 12:02
    Rune Grønkjær
    1

    Hi Bex,

    All orderlines have a IsUnique bool variable. Just use that :)

    /Rune

  • Bex 444 posts 555 karma points
    Jan 19, 2012 @ 12:08
    Bex
    0

    Well that was easy! :) Thank you Rune!

  • Rune Grønkjær 1372 posts 3103 karma points
    Jan 19, 2012 @ 12:08
    Rune Grønkjær
    0

    No problem. I love easy ones ;)

    /Rune

Please Sign in or register to post replies

Write your reply to:

Draft