Announcement

Collapse
No announcement yet.

Also display prices in.. Norman?

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

    Also display prices in.. Norman?

    I trying to turn off the 2nd currency in * under
    Design-->Option-->Misce-->Also display prices in..
    but once I turn it off. My Price per metre and Today Rate will be gone. Why is this so? And how should I do?
    ------------------------------------------------------------------------------
    Price per cm: S$0.55 / US$0.32*
    Price per metre: S$55 / US$32*

    Today Rate: US$32 Euro$29 per meter
    ------------------------------------------------------------------------------
    I added the extended info in product template as :

    <b>NETQUOTEVAR:PRODUCTPRICE</b>
    <script language=JavaScript>
    <!--
    var mainprice = metreprice(thiscost);
    if ( mainprice) document.write('<br><b>' + mainprice + '</b>');
    //-->

    Thank in advance.
    <a href = "http://www.hst.com.sg">
    "http://www.hst.com.sg"</a>
    The Online Fabric Store

    #2
    Try using this replacement routine:-

    Code:
    function metreprice(thiscost) {     // convert an single price actinic price string into 100 times it's size
            var newprice = '';
            thiscost = thiscost.replace(/&#46;/g,".");
            var nums = thiscost.match(/(.*)(\d+)\.(\d)(\d)(.*)/);
              if (nums != null)
                {
                newprice = 'Price per Metre: ' + nums[1] + ((nums[2] * 100) + (nums[3] * 10 ) + (nums[4] - 0)) + '.'  + '00';
                }
    return newprice;
    }
    I havn't tested it as I've no more time left to help you and have deleted your test site.

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

    Comment


      #3
      It is ok Norman. Thank to you, I am on the edge of completing my project. Thank again.
      <a href = "http://www.hst.com.sg">
      "http://www.hst.com.sg"</a>
      The Online Fabric Store

      Comment

      Working...
      X