Results 1 to 22 of 22
  1. #1
    Member
    Join Date
    January 18th, 2005
    Posts
    50
    I know how to create result templates, but I am having trouble knowing what to do and how to create list and detail templates. What is the difference between the two. I can not find any instructions on the website. I want to be able to show "you save" and "Add to wish list" to my script output on my site. I am lost on all of this.

    Any one care to give a lesson? Only thing I have been able to figure out so far is that list and detail templates go in the "Amazon-Format" directory once completed. How to create them is a mystery. I am assuming the templates that come with Amazon.pl are great but how do I get them to work?

    Dennis

  2. #2
    ABW Ambassador cusimano's Avatar
    Join Date
    January 18th, 2005
    Location
    Toronto, Canada
    Posts
    1,369
    Format Templates are a relatively new feature of amazon.pl XML (introduced in v2.10.16). See the following pages for an introduction:

    <UL TYPE=SQUARE>
    <LI>Introduction to Format Templates
    <LI>Introduction to IF statements
    <LI>Sample Format Templates -- "List"
    <LI>Sample Format Templates -- "Details"[/list]

    There is no difference between "list" and "detail" -- they are all Format Templates. The layouts used in the "list" format files are more suitable for showing a list of products, whereas the layouts used in the "details" format files are more suitable for showing details about an individual product.

    There are currently no configuration options for showing "you save" or "add to wish list". By modifying an existing format template or creating your own, you can add anything to the results such as "you save", "add to wish list", "quick purchase", etc.

    See the c4.fmt file for an example of how "you save" can be shown, such as in: Best selling books (using c4.fmt)

    In the future, we hope to provide more configuration options, more sample format files, and more documentation about Format Templates.

    Also see the library.fmt file in the amazon-format directory. Use a text editor such as Notepad to view it (run Notepad, select File > Open..., select "All Files" for "Files of type", select library.fmt, click Open). Note: If you modify library.fmt and want to use it, you will have to set in your amazon.ini configuration file:

    format.library "library"

    This will cause the specified file, amazon-format/library.fmt, to be used (don't include the .fmt since it is added). If you set format.library back to "" then the builtin format library is used.

    We are constantly working to improve amazon.pl XML. In a future version there will be support to show product details locally rather than jumping to amazon.com to show the details (a configuration variable will turn this on/off). For example, see http://www.bime.com/cgi-bin/amazon.pl and click on a product; the details will appear locally (that website is configured to use details6.fmt format file; a configuration variable will specify what format file to use to show details).

    Yours truly,
    Cusimano.Com Corporation
    per: David Cusimano

  3. #3
    Newbie
    Join Date
    January 18th, 2005
    Posts
    7
    There is also no way to format the "more results" pages to match a template? Well, it seems to follow the template but not the CSS or other format code that would have to go in the HTML.

    I am sure there is a way to do this in XML, but I am still in HTML world.

    ?
    a

  4. #4
    ABW Ambassador cusimano's Avatar
    Join Date
    January 18th, 2005
    Location
    Toronto, Canada
    Posts
    1,369
    If you include a template= or format= parameter as part of the URL, then those parameters will be included in the "more results" and "previous results" links.

    You can include CSS in your template file, then use the CSS in your template file. You can also modify a format file (or create your own format file) to use the CSS.

    Format files let you completely customize the layout of the results, and template files let you customize the overall layout of the page.

    Yours truly,
    Cusimano.Com Corporation
    per: David Cusimano

  5. #5
    Newbie
    Join Date
    January 18th, 2005
    Posts
    7
    Heh, I just figured it out.... amazon.html
    Thanks - I can't get enough of this xml version!!!

    a

  6. #6
    Newbie
    Join Date
    January 18th, 2005
    Posts
    7
    Ok, last question for today (and a while).
    Please consult this page: www.cadmonkey.com/bookarch.htm

    I understand what the script is doing.... just not how.
    If you click on the "Browse" links - See the difference between "Architects A-Z" and "Architectural Standards"? How do I change the "Architects A-Z" result page - that opens with a top seller and then the secondary subject link list? Or how do I add this top seller section to the result page of the others like the "Architectural Standards" that goes straight to a list.

    Does that make sense?

    I would also like to remove the "Browse More" and "Click here" on the "A-Z" result page. And where is that "products" in the upper left coming from.

    This is great. Thanks for the script and all your help. Can't wait to finish the store!

    a

  7. #7
    Member
    Join Date
    January 18th, 2005
    Posts
    50
    David,
    What Paramaters would I need to include if I modified a list template to include the "quick click" and add to wishlist buttons to a page of results?

    Dennis

  8. #8
    Full Member garystarling's Avatar
    Join Date
    January 18th, 2005
    Posts
    277
    It seems there is a difference between a topseller page and standard search or normal page results.

    Try this url

    http://www.cadmonkey.com/cgi-bin/ama.../&format=list7

    Also you may want to consider reducing the number of books returned as 25 are taking some time to process each time.

    'I am not young enough to know everything.'
    - Oscar Wilde

  9. #9
    Newbie
    Join Date
    January 18th, 2005
    Posts
    7
    Rock. Thanks Gary. How did you know how to put all those variables in the link code? I spent hours looking at those pages yesterday - but I couldn't get it right?

    thanks again,
    a

  10. #10
    ABW Ambassador cusimano's Avatar
    Join Date
    January 18th, 2005
    Location
    Toronto, Canada
    Posts
    1,369
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by meanadam:
    Ok, last question for today (and a while).
    Please consult this page: http://www.cadmonkey.com/bookarch.htm

    I understand what the script is doing.... just not how.
    If you click on the "Browse" links - See the difference between "Architects A-Z" and "Architectural Standards"? How do I change the "Architects A-Z" result page - that opens with a top seller and then the secondary subject link list? Or how do I add this top seller section to the result page of the others like the "Architectural Standards" that goes straight to a list.

    Does that make sense?

    I would also like to remove the "Browse More" and "Click here" on the "A-Z" result page. And where is that "products" in the upper left coming from.<HR></BLOCKQUOTE>

    Amazon.com organizes its products into categories called "browse nodes". Some browse nodes have sub-nodes to subcategorize products.

    If you use type=browse&mode=BROWSENODENUMBER and the browse node contains sub-nodes, then amazon.pl XML will show a "browse index" -- a bulleted list of those sub-nodes. And at the top it will show a grid of bestsellers for the browse node itself (the format of that grid is set using the browse.grid configuration variable). If the browse node does not contain sub-nodes, then a list of products in that browse node is shown instead (format is specified using the format= parameter, or list.style configuration variable, or format library).

    Architects A-Z is a browse node with sub-nodes so you see a grid of bestsellers and a bullet list of sub-nodes. Architectural Standards is a browse node that does not have sub-nodes so you see a list of 25 products -- these are the bestsellers in this browse node.

    To turn off the "Browse more..." section, set the browse.more configuration variable to no ---- unfortunatley, this variable does not appear in the amazon.ini v2.11.25 file so you'll have to add a line to the amazon.ini file that says: browse.more no

    The ">> Click here for bestsellers in ..." that appears at the bottom of browse index pages (after all the other bullet lists), shows the bestsellers of this browse node in list format (or whatever format has been specified via format=). It lets you see the bestsellers in list format that appear at the top in grid format. This link cannot be removed.

    The "Products" in the upper left is coming from the {type} {mode} substitution variables that you have in your amazon.html template. These variables are not fully implemented in amazon.pl XML. For compatibility with the older amazon.pl (non-XML), these variables say "Products". Remove these substitution variables from your amazon.html template.

    Yours truly,
    Cusimano.Com Corporation
    per: David Cusimano

  11. #11
    ABW Ambassador cusimano's Avatar
    Join Date
    January 18th, 2005
    Location
    Toronto, Canada
    Posts
    1,369
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by GaryS:
    It seems there is a difference between a topseller page and standard search or normal page results.

    Try this url

    http://www.cadmonkey.com/cgi-bin/ama.../&format=list7

    Also you may want to consider reducing the number of books returned as 25 are taking some time to process each time.<HR></BLOCKQUOTE>

    The "url" parameter is no longer required (it was used in the old amazon.pl script). It was used when you wanted to show bestsellers of a browse node that had sub-nodes.

    If a browse node has sub-nodes, then:

    type=browse&mode=BROWSENODENUMBER --- displays a bulleted list of sub-nodes, with a grid of bestsellers for the node itself at the top.

    type=bestsellers&mode=BROWSENODENUMBER --- displays list of bestsellers for the node itself (these are what showed up in the grid above).

    Yours truly,
    Cusimano.Com Corporation
    per: David Cusimano

  12. #12
    ABW Ambassador cusimano's Avatar
    Join Date
    January 18th, 2005
    Location
    Toronto, Canada
    Posts
    1,369
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by meanadam:
    Rock. Thanks Gary. How did you know how to put all those variables in the link code? I spent hours looking at those pages yesterday - but I couldn't get it right?

    thanks again,
    a<HR></BLOCKQUOTE>

    See: amazon.pl Script : Script Parameters

    See also: amazon.pl Script : Documentation

    If you have a question, post it here or use the Contact Us form.

    Yours truly,
    Cusimano.Com Corporation
    per: David Cusimano

  13. #13
    ABW Ambassador cusimano's Avatar
    Join Date
    January 18th, 2005
    Location
    Toronto, Canada
    Posts
    1,369
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by D. Jones:
    David,
    What Paramaters would I need to include if I modified a list template to include the "quick click" and add to wishlist buttons to a page of results?

    Dennis<HR></BLOCKQUOTE>

    Using your HTML editor or a text editor such as Notepad, open the format template that you want to modify. Use any of the following format codes for buttons:

    {details.addto.wishlist} for wish list button.
    {details.addto.cart} for shopping cart button.
    {details.addto.weddingregistry} for wedding registry button.
    {details.addto.babyregistry} for baby registry button.

    Note: Format codes are delimited by curly brackets "{" and "}". Alternatively, they can be put in an HTML comment such as < !--details.addto.wishlist-->

    To add "quick-click", you have to manually add amazon.com's quick-click HTML and substitute the ASIN with a format code. Login to Amazon.com Associates Central, click Build-a-Link, click Quick-Click, enter any ASIN and select the button style to use, click Build It. Copy the generated quick-click HTML to your format file. Now go through the quick-click HTML and replace all occurrences of the ASIN that you entered with {details.asin} --- as results are generated by amazon.pl XML, {details.asin} will equal the ASIN of the current product. Also replace all occurrences of your associate ID with {cfg.amazonid} if you want to use the amazon.com associate ID set in amazon.ini or amazon.key

    Yours truly,
    Cusimano.Com Corporation
    per: David Cusimano

  14. #14
    Newbie
    Join Date
    January 18th, 2005
    Posts
    7
    Ok. Got all that fixed.
    2 more:
    Is there a way to omit list results that do not have a tumbnail - like in the grid?

    Please tell me how to work the ASIN exclude. I tried to make a exclude.txt file (in the exclude dir) and told the amazon.ini - but it didn't work.

    a

  15. #15
    ABW Ambassador cusimano's Avatar
    Join Date
    January 18th, 2005
    Location
    Toronto, Canada
    Posts
    1,369
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by meanadam:
    Is there a way to omit list results that do not have a tumbnail - like in the grid?

    Please tell me how to work the ASIN exclude. I tried to make a exclude.txt file (in the exclude dir) and told the amazon.ini - but it didn't work.<HR></BLOCKQUOTE>

    1. There is no configuration option to omit no-image products from list results. However, there are two things you can do:

    a. If you want no-image products to be excluded, modify {format.cell} in your format file or {format.list1.cell} in the format library. Insert as the first line {if details.ImageThumb} and insert as the last line {endif} ---- Also, in amazon.ini set imageWH to yes. However, we recommend against this since this will require image information to be fetched for each product (it is saved in the image cache). This will slightly slow down the results the first time they are displayed.

    b. If you want to sort all the images first (like the images first "if" grid option), then change < !--format.cell--> to < !--format.cell sortimages--> in your format file, or change < !--format.list1.cell--> to < !--format.list1.cell sortimages--> in your format library. By adding the sortimages option to the format open-tag, images will be sorted first.

    2. In amazon.pl XML v2.11.25, exclusion does not work due to a bug. Do not use the exclude.list or exclude.file configuration variables or the exclude= script parameter. This will be fixed in the next release.

    Yours truly,
    Cusimano.Com Corporation
    per: David Cusimano

  16. #16
    Member
    Join Date
    January 18th, 2005
    Posts
    50
    David and all. I have tweaked list7 format template and added a few features. Check it out and give me your opinions. The URL is http://www.diversautograph.com/Main%...ges/Store.html

    Also, David, please let me know why some items do not include the "quick-click" button and features and others do. You may have to scroll through several pages (depending on which store you browse) but eventually you will see one or two items that have no quick click button. Strange? Is it Amazon or my codeing of the format template.

    Thanks,
    Dennis

  17. #17
    ABW Ambassador cusimano's Avatar
    Join Date
    January 18th, 2005
    Location
    Toronto, Canada
    Posts
    1,369
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by D. Jones:
    Also, David, please let me know why some items do not include the "quick-click" button and features and others do. You may have to scroll through several pages (depending on which store you browse) but eventually you will see one or two items that have no quick click button. Strange? Is it Amazon or my codeing of the format template.

    Thanks,
    Dennis<HR></BLOCKQUOTE>

    Your revised format file looks great.

    The standard list7.fmt format file contains {if CONDITION} {endif} statements that cause blocks of HTML to be included if the specified condition is met.

    If you look closely at your current results, you'll notice that those products that do not have a "Rating: (stars)" row also do not have a quick-click row.

    In your revised list7 format file, you added a table row for "quick click" that is before an {endif}. The {if details.reviews.AvgCustomerRating} statement is false when there is no rating so both rows are excluded. Specifically, you have:

    {if CONDITION}
    < tr> rating < /tr>
    < tr> quick-click < /tr>
    {endif}

    The fix is to move the table row after the {endif}:

    {if CONDITION}
    < tr> rating < /tr>
    {endif}
    < tr> quick-click < /tr>

    Note: In the list7 format file, the if/endif are embedded in HTML comments, < !--{if...}--> and < !--{endif}-->

    Yours truly,
    Cusimano.Com Corporation
    per: David Cusimano

  18. #18
    Member
    Join Date
    January 18th, 2005
    Posts
    50
    David, You are a talanted! I wish I knew enough about HTML to do really great work, but I know just enough to do mediocre work and get my self into trouble I can not get out of.

    Your solution worked of course, and I now have a quick-click button on every item even those without stars.

    Thanks for all your help, and suggestions.

    Dennis

  19. #19
    Member
    Join Date
    January 18th, 2005
    Posts
    50
    David,
    Question. As you know, Amazon does not have images available for all of their DVD selection. Can I introduce coding, (if statement) to supply the Amazon standard "No Image Available" gif to be displayed if and when there is no image of the product to be advertised? Let me know, and also what the if statement might look like to get the job done.

    Thanks,
    Dennis

  20. #20
    Member
    Join Date
    January 18th, 2005
    Posts
    50
    David,
    I have decided a more targeted approach in my website by incorporating Amazon.pl into other pages of my site is more appropriate. My problems is this. My site is a celebrity site, and I am placing a keyword specific script on various pages.

    For instance look at this page: http://www.diversautograph.com/Galle...s/Randall.html . Notice that the very first results in a movie which Tony Randall DOES NOT star in. Its obvious that the search function is looking for any instance of Tony AND (or) Randall. While it works most times, my veiwers are going to assume that Mr. Randall actually appears in this film when in fact he does not.

    Is their any way to search for a phrase instead of individual keywords?

    Dennis

  21. #21
    ABW Ambassador cusimano's Avatar
    Join Date
    January 18th, 2005
    Location
    Toronto, Canada
    Posts
    1,369
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by D. Jones:
    David,
    Question. As you know, Amazon does not have images available for all of their DVD selection. Can I introduce coding, (if statement) to supply the Amazon standard "No Image Available" gif to be displayed if and when there is no image of the product to be advertised? Let me know, and also what the if statement might look like to get the job done.

    Thanks,
    Dennis<HR></BLOCKQUOTE>


    Dennis,

    If you want to show a "no image available" graphic (rather than the current text "[no image]") then you have to do two things: (1) set imageWH to yes in amazon.ini, and (2) redefine what HTML to show for "no image".

    For step 1:

    Set imageWH to yes in amazon.ini. However, we typically recommend against this setting because the script has to fetch additional information thus slowing down the display of results (cache speeds up subsequent displays of the same results). The script has to fetch each product graphic (it gets stored in the amazon-imgcache image cache) and then sees if there really is one or not. If there isn't then the "no image" message is displayed.

    For step 2:

    Look in the amazon-format/library.fmt file and you will see:

    < !--format.image.none-->
    < font color="#999999" face=Verdana size=-2>[no image]< /font>
    < !--/format.image.none-->

    The above is the format code that displays the "no image" message. Redefine this format to change the "no image" message.

    One problem is that Amazon.com's "no image available" graphics are specific to each of their product categories. The graphic in their DVD section says "DVD" in the middle of it. Amazon.com does not have a generic "no image available" graphic (at least that I could find). If you're only showing DVD's (or whatever one product category) on your website, then this should be fine. Otherwise, you'll have to create your own graphic and serve it from your own website. To show Amazon.com's DVD "no image available" image use:

    < !--format.image.none-->
    < img src="http://g-images.amazon.com/images/G/01/dvd/icons/dvd-no-image.gif" width=69 height=60>
    < !--/format.image.none-->

    You can either put this in the library.fmt file (set format.library to "library" in amazon.ini) or put it into your own .fmt file and use the format= parameter to use that file.

    You don't have to add "if" statements if you use the library. The other formats already have "if" statements and use the format.image.none based on those "if" statements. Search in library.fmt for cfg.imageWH if you want to see how.

    Yours truly,
    Cusimano.Com Corporation
    per: David Cusimano

  22. #22
    ABW Ambassador cusimano's Avatar
    Join Date
    January 18th, 2005
    Location
    Toronto, Canada
    Posts
    1,369
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by D. Jones:
    David,
    I have decided a more targeted approach in my website by incorporating Amazon.pl into other pages of my site is more appropriate. My problems is this. My site is a celebrity site, and I am placing a keyword specific script on various pages.

    For instance look at this page: http://www.diversautograph.com/Galle...s/Randall.html . Notice that the very first results in a movie which Tony Randall DOES NOT star in. Its obvious that the search function is looking for any instance of Tony AND (or) Randall. While it works most times, my veiwers are going to assume that Mr. Randall actually appears in this film when in fact he does not.

    Is their any way to search for a phrase instead of individual keywords?

    Dennis<HR></BLOCKQUOTE>

    Dennis,

    If you go to Amazon.com and search for "tony randall", the same problem happens. Amazon.com's search engine (the same that drives their XML interface) is looking for keywords anywhere rather than beside each other. As long as "tony" appears anywhere and "randall" appears anywhere, Amazon.com includes the product in the results.

    I explored Amazon.com to see if I could find a browse node page dedicated to Tony Randall (and other actors/actresses) and I could not find such a page. (FYI, browse node # 139 is the top-level browse page for directors).

    One solution is to search by ASIN instead of by keyword. Explore Amazon.com and determine the ASIN numbers of the products that you want to show relating to Tony Randall. Then show results on your webpage by doing an ASIN search using either of the following two methods:

    1. Specify the list of ASIN's as part of the script parameters. Such as:

    /cgi-bin/amazon.pl?asinsearch=ASIN1,ASIN2,ASIN3,ASIN4
    (maximum of 10 ASIN's)

    /cgi-bin/amazon.pl?asinsearch=ASIN1,ASIN2,ASIN3,ASIN4&lite
    (maximum of 30 ASIN's)

    2. Specify the list of ASIN's in an ASIN file (e.g.: amazon-asin/tonyrandall.txt) and specify the ASIN filename as a parameter. Such as:

    /cgi-bin/amazon.pl?asinsearch=tonyrandall
    (note: do not include .txt or directory name)

    Note: You can include other parameters as part of the above amazon.pl URL's, such as: grid=, pagesize=, format=, etc.

    Yours truly,
    Cusimano.Com Corporation
    per: David Cusimano

  23. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Can WM be used without detail pages?
    By webworker in forum WebMerge (Fourthworld.com)
    Replies: 29
    Last Post: July 3rd, 2006, 05:58 PM
  2. AE - Is there a list of Item Attributes for use in templates
    By alkenmrs in forum Cusimano.com Scripts
    Replies: 1
    Last Post: October 27th, 2005, 04:54 PM
  3. Detail Pages
    By perudc in forum WebMerge (Fourthworld.com)
    Replies: 0
    Last Post: November 3rd, 2003, 01:53 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
  •