Announcement

Collapse
No announcement yet.

Removing spaces from Netquotevar:productref

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

    Removing spaces from Netquotevar:productref

    Hi all

    We're linking a client's product pages to an external site with a stock database so that shoppers can view the stock availibility of an item in a pop-up window.

    Linking to the external database is quite straight forward - all we do is add NETQUOTEVAR:PRODUCTREF to the relevant link code in the product template and Actinic generates a full URL to the external DB with the correct product code in the link.

    The problem is that a lot of the client's products have spaces in the product reference and the above NQV interprets this as   and includes this in the link. Unfortunately, the external DB doesn't like   - It wants to see an actual space in the product code.

    i.e. A product ref of "ABC 123" should appear as such and not as "ABC 123"

    Any suggestions on how we can get NQV:ProductRef to not insert   into the link?

    Thanks

    Nick
    Hazelnet Web Solutions
    www.hazelnet.co.uk
    Actinic & Worldpay Partners
    Specialising in ecommerce and
    online promotion.

    Workwear and Promotional Clothing
    www.workwearhouse.co.uk
    Logo Your Polo!

    #2
    You could use JavaScript to generate the link and strip out that  

    E.g.

    Code:
    <script language=JavaScript>
    <!--
    document.write('<a href="http://whatever.com?link=' + 'NETQUOTEVAR:PRODUCTREF'.replace(/&nbsp;/g,' ') + '">Click here</a>');
    // -->
    </script>
    This is untested but should work barring typos.

    Norman

    PS there's also an additional netquotevar NETQUOTEVAR:PRODUCTREFERENCE that may generate a cleaner value.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      I just tested this claner option and it works fine. Use NETQUOTEVAR:PRODUCTREFERENCE and you're fixed. Wish I'd saved typing that lot above.

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

      Comment


        #4
        Thanks Norman

        NQV:PRODUCTREFERENCE worked perfectly.

        Regards

        Nick
        Hazelnet Web Solutions
        www.hazelnet.co.uk
        Actinic & Worldpay Partners
        Specialising in ecommerce and
        online promotion.

        Workwear and Promotional Clothing
        www.workwearhouse.co.uk
        Logo Your Polo!

        Comment

        Working...
        X