Results 1 to 13 of 13
  1. #1
    Member tsmgroup2's Avatar
    Join Date
    January 18th, 2005
    Location
    New Providence, PA USA
    Posts
    155
    A little help in template modification, plz
    I am trying to get the '~' symbol to appear every fourth product when generating a new product page. Right now, the only thing this file does is place the symbol after the fourth product is generated. That's it.

    Here's what I have:
    <center>[WM-INDEXLABEL: SHIPPROMOTEXT][WM-RECORD cols="2" width="460"]
    <strong><a href="[WM-FIELD: BUYURL]" target="_blank" title="[WM-FIELD: BRAND]">Prod Id: [WM-FIELD: PRODUCTID]</a></strong><br>
    <strong><a href="[WM-FIELD: BUYURL]" target="_blank" title="Desc: [WM-FIELD: BRIEFDESC]">Prod Name: [WM-FIELD: PRODUCTNAME]</a></strong><br>
    <strong>in stock: <a href="[WM-FIELD: BUYURL]" target="_blank" title="Ship Cost: $[WM-FIELD: SHIPCOST]">[WM-FIELD: instock]</a></strong><br>
    <a href="[WM-FIELD: BUYURL]" target="_blank" title="Sizes available: [WM-FIELD: PERMUSIZE]">[WM-ImagePath: ImageURL width="60" height="60" nolink]</a><br>
    <a href="[WM-FIELD: BUYURL]" target="_blank" style="color:red" title="Sale price: $[WM-FIELD: SALEPRICE]"><strong>$[WM-FIELD: PRICE] USD</strong></a><br>
    <a href="[WM-FIELD: BUYURL]" target="_blank" style="color:green" title="Ship Promo:[WM-FIELD: SHIPPROMOTEXT]"><strong>Add to Cart</strong></a>
    <br><br>[WM-If: IndexRecordNumber = 4]
    ~
    [/WM-If]
    [/WM-RECORD][/WM-INDEXLABEL]
    </center>

    any change to make it generate the symbol every fourth product would be greatly appreciated. I wouldn't doubt it might involve an old algebra formula but the scripting is throwing me off... thanx
    Mark (Satchel)
    Webmaster / Sales Manager
    [url]www.tsmgroup2.biz[/url]

  2. #2
    The Seal of Aproval rematt's Avatar
    Join Date
    November 19th, 2006
    Location
    The Windy City
    Posts
    4,140
    Try this:

    [WM-If: IndexRecordNumber = mod 4]

    From 4W WebMerge Tag Reference
    Mod simply determines whether there is a remainder when you divide the first value by the second. This is useful for determining a series of specific number of records, such as every fourth record or every tenth record.
    Good luck

    -rematt
    "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
    Member tsmgroup2's Avatar
    Join Date
    January 18th, 2005
    Location
    New Providence, PA USA
    Posts
    155
    Question Thanks Rematt
    I tried it as you stated and other variations thereof, no effect.

    I'll remember that tip though, may prove useful later on.
    Let me know if you find a way that does work.

    thanks again.
    Mark (Satchel)
    Webmaster / Sales Manager
    [url]www.tsmgroup2.biz[/url]

  4. #4
    The Seal of Aproval rematt's Avatar
    Join Date
    November 19th, 2006
    Location
    The Windy City
    Posts
    4,140
    tsmgroup, take the (=) out of the statement. I didn't catch that the first time.

    So it should read: [WM-If: IndexRecordNumber mod 4]

    I use this to insert page breaks after every XX number of products and it works like a charm.

    -rematt
    "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

  5. #5
    Member tsmgroup2's Avatar
    Join Date
    January 18th, 2005
    Location
    New Providence, PA USA
    Posts
    155
    Thumbs up That did it !!!! Yaahhoooooo !!!
    Thank you and the May the Good Lord bless you !!!
    It Worked

    It worked fantastically, now I can generate all those new feeds.

    Thank you again, Rematt !! I owe you one ...
    Mark (Satchel)
    Webmaster / Sales Manager
    [url]www.tsmgroup2.biz[/url]

  6. #6
    The Seal of Aproval rematt's Avatar
    Join Date
    November 19th, 2006
    Location
    The Windy City
    Posts
    4,140
    No problem. Glad it worked.

    -rematt
    "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

  7. #7
    Member tsmgroup2's Avatar
    Join Date
    January 18th, 2005
    Location
    New Providence, PA USA
    Posts
    155
    one more little problem with this setup...
    I need that '~' symbol to appear outside of the table and wm-record script or </tr> and </td> at the end of the 4 product generation.. how would I adapt my .txt file or template above to accommodate that?

    thank you.

    PS otherwise, the product rotators won't work..
    Mark (Satchel)
    Webmaster / Sales Manager
    [url]www.tsmgroup2.biz[/url]

  8. #8
    The Seal of Aproval rematt's Avatar
    Join Date
    November 19th, 2006
    Location
    The Windy City
    Posts
    4,140
    This should do the trick (changes in bold)

    <br><br>[WM-If: IndexRecordNumber mod 4]
    </Table> ~ <Table>
    [/WM-If]
    [/WM-RECORD][/WM-INDEXLABEL]

    -rematt
    "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

  9. #9
    Member tsmgroup2's Avatar
    Join Date
    January 18th, 2005
    Location
    New Providence, PA USA
    Posts
    155
    nope, didn't work...
    I'm going to try something but welcome anything that may work just in case. Will reply back shortly on my results..

    thanks.
    Mark (Satchel)
    Webmaster / Sales Manager
    [url]www.tsmgroup2.biz[/url]

  10. #10
    The Seal of Aproval rematt's Avatar
    Join Date
    November 19th, 2006
    Location
    The Windy City
    Posts
    4,140
    What version Webmerge are you using? I'm using 2.5b4 and this is working perfectly for me. Here is the exact code that I'm using:

    [WM-If IndexRecordNumber mod 4] </Table> ~ <Table> [/WM-If]

    [/WM-Record]
    "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

  11. #11
    Member tsmgroup2's Avatar
    Join Date
    January 18th, 2005
    Location
    New Providence, PA USA
    Posts
    155
    Talking my fault, my fault.. i messed up...
    I put the <table> ~ </table>.. not </table> ~ <table>...

    I just got done testing it and that's it.. you done it again.

    Thank you. I don't know why I didn't see those tags working,
    it must be Sunday, my brain's out on vacation or something.

    Thanks again. This fix will get me back up and running for now, I do have a size limitation problem as far as my product file size but I'll need to reconfigure my rotators to rotate multiple text files or something like that.

    take care
    Mark (Satchel)
    Webmaster / Sales Manager
    [url]www.tsmgroup2.biz[/url]

  12. #12
    Member tsmgroup2's Avatar
    Join Date
    January 18th, 2005
    Location
    New Providence, PA USA
    Posts
    155
    oh..
    I'm running either Webmerge 2.5b2 or 2.5b4 on Linux...

    thanks.
    Mark (Satchel)
    Webmaster / Sales Manager
    [url]www.tsmgroup2.biz[/url]

  13. #13
    The Seal of Aproval rematt's Avatar
    Join Date
    November 19th, 2006
    Location
    The Windy City
    Posts
    4,140
    Quote Originally Posted by tsmgroup2
    I don't know why I didn't see those tags working, it must be Sunday, my brain's out on vacation or something.
    Sometimes you just need to get away from it for a while.

    -rematt
    "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

  14. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Featured: css sprite creation/modification help
    By tsmgroup2 in forum Programming / Datafeeds / Tools
    Replies: 2
    Last Post: April 23rd, 2014, 08:40 PM
  2. Jump Script Modification
    By caffeine in forum Programming / Datafeeds / Tools
    Replies: 1
    Last Post: October 3rd, 2007, 03:09 PM
  3. bfast link modification
    By gm1234 in forum Commission Junction - CJ
    Replies: 1
    Last Post: November 5th, 2004, 01:44 AM

Posting Permissions

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