Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    January 18th, 2005
    Posts
    162
    I want to show the retail price field only when the retail price is larger than the discount price (in the discount price field). Unfortunately, there is no way to compare two different WM-fields with "<" or ">", is there?
    Thanks!

    huhu

  2. #2
    Affiliate Manager
    Join Date
    January 18th, 2005
    Location
    Los Angeles, California
    Posts
    1,913
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by huhu:
    I want to show the retail price field only when the retail price is larger than the discount price (in the discount price field). Unfortunately, there is no way to compare two different WM-fields with "&lt;" or "&gt;", is there?<HR></BLOCKQUOTE>

    Yep, and it supports both the "&gt;" and "&lt;" operators (and a whole lot more).

    See the WebMerge Help page for the WM-If tag.

    --
    Richard Gaskin
    Fourth World Media Corporation
    Developer of WebMerge: Publish any database on any site
    ___________________________________________________________
    Ambassador@FourthWorld.com http://www.FourthWorld.com
    Tel: 323-225-3717 AIM: FourthWorldInc

  3. #3
    Member
    Join Date
    January 18th, 2005
    Posts
    162
    Richard,

    These operators cannot operate between two WM-Fields. You can say "[WM-Field: PRICE &lt; 175]",
    but you cannot say
    "[WM-Field: PRICE &lt; [WM-Field: RETAILPRICE]]"
    right?

    Huhu

  4. #4
    Affiliate Manager
    Join Date
    January 18th, 2005
    Location
    Los Angeles, California
    Posts
    1,913
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by huhu:
    Richard,

    These operators cannot operate between two WM-Fields. You can say "[WM-Field: PRICE &lt; 175]",
    but you cannot say
    "[WM-Field: PRICE &lt; [WM-Field: RETAILPRICE]]"
    right?<HR></BLOCKQUOTE>

    Yes, but with slightly simpler syntax:

    [WM-If: Field:MyField &lt; Field:MyOtherField]

    --
    Richard Gaskin
    Fourth World Media Corporation
    Developer of WebMerge: Publish any database on any site
    ___________________________________________________________
    Ambassador@FourthWorld.com http://www.FourthWorld.com
    Tel: 323-225-3717 AIM: FourthWorldInc

  5. #5
    Member
    Join Date
    January 18th, 2005
    Posts
    162
    Richard,

    It doesn't work. I am using Version 2.3. I am trying:

    [WM-IF: FIELD:RETAILPRICE&gt;FIELD:PRICE]Retail: $[WM-FIELD: RETAILPRICE];[WM-ELSE][/WM-IF]Price: $[WM-FIELD: PRICE]

    but I get "Invalid IF Expression 70&gt;FIELD:PRICE"
    Most probably "70" is the actual RETAILPRICE of the item.

    Thank you!

    huhu

  6. #6
    Member
    Join Date
    January 18th, 2005
    Posts
    162
    It worked! There must be a space on the left and the right of "&lt;" or "&gt;".
    Thank you Richard!

    huhu

  7. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. PHP Comparing 2 Strings
    By gcarson in forum Programming / Datafeeds / Tools
    Replies: 4
    Last Post: December 2nd, 2010, 09:03 PM
  2. Comparing Merchants on a new site
    By superCool in forum Midnight Cafe'
    Replies: 8
    Last Post: November 12th, 2009, 12:17 PM
  3. Comparing networks
    By Zeus in forum Midnight Cafe'
    Replies: 6
    Last Post: August 19th, 2007, 02:54 PM
  4. Comparing the different networks
    By maae10 in forum Starting an Affiliate Program & Merchant Q&A
    Replies: 16
    Last Post: August 25th, 2006, 08:42 AM
  5. Domain name values?
    By cera in forum Domains & Hosting
    Replies: 13
    Last Post: June 9th, 2005, 10:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •