Announcement

Collapse
No announcement yet.

How can I get the price without £

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How can I get the price without £

    Hello Everyone,

    Im trying to get the number value of a price without the £, so I can use something like the below to show a new price based on quantity

    $('#quantity').bind('click keyup',function(){
    var tot = $('#price').val() * this.value;

    $('#total').text(tot);
    });

    Any ideas?

    Thanks

    Keith

    #2
    OK so Ive managed to get it to work by using

    $('#quantity').bind('click keyup',function(){
    var tot = $('#price').text().replace(/[^0-9\.]/g, '') * this.value;

    $('#total').text(tot);
    });

    which removes the £, kinda dirty workaround so Id still like to know if there is a variable in sellerdeck that gives me the raw number value

    Thanks

    Keith

    Comment


      #3
      ProductPriceRaw
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Hello Norman,

        Thank you for the reply, Ill get to work on that!

        Thanks

        Keith

        Comment

        Working...
        X