Results 1 to 4 of 4
  1. #1
    Join Date
    October 7th, 2007
    show select products on index page with IF statement
    HI! I am a webmerge newbie, and here is my challenge: I want to show on my index page select products from my datafeed. I DO NOT want a link on the index page taking the visitor to yet another page.

    Below is the basics of the code I want to use for the index template, but it is not working. I read a similar thread in the webmerge column where someone was trying to attempt the same thing, but was not having success. Someone suggested they put the code within the If conditional statements, but when I do that, I get an error that says it cannot find closing IF tags. Do you think that I can only use IF tags only on a detail page?

    I also followed where webmerge wanted to add sorting as a feature in version 3 - well that was an old thread (2005?) and there is no version 3 - were they not able to do it or am I missing something in my trial version?

    Here is my code, hope it displays correctly (product fields might not be typed right (I don't have my coding in front of me at the moment). It is for wine racks (don't want to show bedding, furniture, clocks, etc.)

    [WM-If Field: MerchantSubcategory contains Wine racks, Wine cabinets]


    [WM-Field: Product-ID]

    [WM-Field: NAME]

    <p>[WM-Field: DESCRIPTION]</p>

    <p>Your Cost: $[WM-Field: SALE_PRICE]</p>

    <p><a href="[WM-Field: BUYURL]">Click Here</a> to purchase the [WM-Field: Product-ID] now !</p>

    <a href="[WM-Field: BUY_URL]"><img src="[WM-Field: IMAGEURL]" alt="[WM-Field: NAME]" border="0"></a>



  2. #2
    The Seal of Aproval rematt's Avatar
    Join Date
    November 19th, 2006
    The Windy City
    Sweetiowa, try changing your closing IF tag to [/WM-If].

    "I know that you believe you understand what you think I said, but I'm not sure you realize that what you heard is not what I meant." - Richard Nixon

  3. #3
    Join Date
    October 7th, 2007
    Oops - that was a typo in my post, but I will check my coding!

    Thanks rematt!

  4. #4
    Join Date
    October 7th, 2007
    After reading more on conditional statements, I don't think what I am attempting is possible. When using the "IF" statement it spits out HTML - it appears not to perform an operation that would filter out my records.

    In another thread I mentioned extracting products out of a datafeed (excel) by performing a query on the spreadsheet. Here is the url that tells how to do it:
    The person who offered this commented how he only needed DVD's out of a datafeed and not jewelry, hats, books, etc. so it narrowed it down nicely for him.

    I had trouble with it, so here are two tips:

    Make sure your datafeed is saved in CSV format, and make sure that is the file you locate to do the query on.

    When filtering a query remember "Box" is NOT the same as "box" !!!!

    Good luck!

  5. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Using an array from a mysql field in a select statement
    By knight01 in forum Programming / Datafeeds / Tools
    Replies: 9
    Last Post: May 9th, 2010, 09:16 PM
  2. How to show index numbers on index page?
    By sinpeople in forum WebMerge (
    Replies: 0
    Last Post: June 23rd, 2007, 11:06 PM
  3. LIKE '%$categoryid%' works = doesn't in select statement
    By suzie250 in forum Programming / Datafeeds / Tools
    Replies: 5
    Last Post: January 17th, 2006, 08:37 PM
  4. Help with PHP Select statement
    By Doug247 in forum Programming / Datafeeds / Tools
    Replies: 1
    Last Post: July 30th, 2004, 11:01 AM
  5. WM-IF statement, only for Index pages?
    By photonstudios in forum WebMerge (
    Replies: 2
    Last Post: February 16th, 2004, 11:52 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