Results 1 to 14 of 14

Thread: Dan's AWS Script

  1. #1
    Roll Tide! mobilebadboy's Avatar
    Join Date
    Apr 2004
    Location
    Mobile, AL
    Posts
    428

    Dan's AWS Script

    I've got 2 questions. I've been using this script in pretty much it's raw form for a while, but now I'm trying to use it for something new. 2 things I'd like to do that I can't figure out is:

    1) How to get Features for products. I've tried altering the Authors foreach code, the ratings code and even the code Dan posted in Incka's thread about the authors. None have worked. I've added mention of it in the loop through <Details>.

    2) How can I format the Product Description to a little more readable format? Right now it just pulls it and spits it out in a chunk with no paragraph breaks or anything. Can I get this a little more legible?

    Thanks.

    I actually have some other questions, but I think if I can get the Features figured out, I can get the other stuff I want taken care of.
    Shawn Kerr .com

  2. #2
    Registered GCT13's Avatar
    Join Date
    Aug 2003
    Location
    NYC
    Posts
    480
    Hi mobilebadboy,


    Question 1) - you're on the right track with Features trying to duplicate the Authors functionality. First you need to figure out the XML tag name for each individual feature (I think it's "Feature"), and then create the appropriate variable within the big IF statement where all the tag names/variables are set. Hint - copy and paste the author line and adjust as neccessary.

    To display the Features, yeah use the author's foreach loop and adjust the variable names.

    Note the thread I had with incka won't work for you, because incka is using a different script.


    Question 2) - for the product description, you basically get what you get from Amazon. Sometimes the description does include html markup to make the text more readable.


    Hope that helps, give me a shout if you get it working or have further questions,

    Dan
    ....

  3. #3
    Roll Tide! mobilebadboy's Avatar
    Join Date
    Apr 2004
    Location
    Mobile, AL
    Posts
    428
    Waha! It was Feature, I was using Features. Teaches me for trying to do simple things with very, very little sleep. Now I'm hoping the same thing will closely work with Accessories and whatnot.

    Thanks for the script(s) by the way. I'm too lazy and too busy to figure this stuff out, and Mr Rats script just has too much in it to deal with (although it's thorough, I'll give him that). This is right in the middle and perfect for me.
    Shawn Kerr .com

  4. #4
    Roll Tide! mobilebadboy's Avatar
    Join Date
    Apr 2004
    Location
    Mobile, AL
    Posts
    428
    Alright. I always wondered why I couldn't justify align the product description. Viewing the source, Amazon does indeed output <p> tags they just don't add line breaks. A simple str_replace gives me my line breaks and justified paragraphs. Oh I'm happy.
    Shawn Kerr .com

  5. #5
    Roll Tide! mobilebadboy's Avatar
    Join Date
    Apr 2004
    Location
    Mobile, AL
    Posts
    428
    Is there a way to limit the results to 5 instead of the default 10 per page? I tried changing a few things, but it seems the default code is going to display 10 results no matter what.
    Shawn Kerr .com

  6. #6
    Administrator Chris's Avatar
    Join Date
    Feb 2003
    Location
    East Lansing, MI USA
    Posts
    7,055
    Sure. I do it on some homepages (top 5 items).
    Chris Beasley - My Guide to Building a Successful Website[size=1]
    Content Sites: ABCDFGHIJKLMNOP|Forums: ABCD EF|Ecommerce: Swords Knives

  7. #7
    Roll Tide! mobilebadboy's Avatar
    Join Date
    Apr 2004
    Location
    Mobile, AL
    Posts
    428
    Yeah, that's what I'm wanting to do for all the categories on a new site I'm working on, I just haven't figured out how to accomplish it.

    By the way, I'm not sure if you're still working on it or not, but there's alot of errors and incorrect results on your new garden supply site. Thought I'd point it out either way if you were done with it and didn't know.
    Shawn Kerr .com

  8. #8
    Administrator Chris's Avatar
    Join Date
    Feb 2003
    Location
    East Lansing, MI USA
    Posts
    7,055
    What do you mean?
    Chris Beasley - My Guide to Building a Successful Website[size=1]
    Content Sites: ABCDFGHIJKLMNOP|Forums: ABCD EF|Ecommerce: Swords Knives

  9. #9
    Roll Tide! mobilebadboy's Avatar
    Join Date
    Apr 2004
    Location
    Mobile, AL
    Posts
    428
    One problem I noticed was if you click the page links at the bottom here:

    http://www.discountgardensupply.net/market/Sales/2/

    But it doesn't seem to do it on every page. That's the only one I actually noticed it on.

    And I can't remember on which page I was, but when I clicked the flowers and shrubs link in the menu, I ended up getting results for grills and such. it had /market/flowers.php instead of just /flowers.php.
    Last edited by mobilebadboy; 05-08-2004 at 08:41 AM.
    Shawn Kerr .com

  10. #10
    Administrator Chris's Avatar
    Join Date
    Feb 2003
    Location
    East Lansing, MI USA
    Posts
    7,055
    Originally posted by mobilebadboy
    One problem I noticed was if you click the page links at the bottom here:

    http://www.discountgardensupply.net/market/Sales/2/

    But it doesn't seem to do it on every page. That's the only one I actually noticed it on.

    And I can't remember on which page I was, but when I clicked the flowers and shrubs link in the menu, I ended up getting results for grills and such. it had /market/flowers.php instead of just /flowers.php.
    How did you get to the first page? That URL should not exist.
    Chris Beasley - My Guide to Building a Successful Website[size=1]
    Content Sites: ABCDFGHIJKLMNOP|Forums: ABCD EF|Ecommerce: Swords Knives

  11. #11
    Roll Tide! mobilebadboy's Avatar
    Join Date
    Apr 2004
    Location
    Mobile, AL
    Posts
    428
    I don't remember. I was just randomly clicking through the site. If I run across it again I'll let you know.
    Shawn Kerr .com

  12. #12
    Roll Tide! mobilebadboy's Avatar
    Join Date
    Apr 2004
    Location
    Mobile, AL
    Posts
    428
    I got sidetracked. If someone can clue me on [how to do] this, I'd appreciate it. I've put a hold on building this new site so I don't have to edit a bunch of pages twice.

    Originally posted by mobilebadboy
    Is there a way to limit the results to 5 instead of the default 10 per page? I tried changing a few things, but it seems the default code is going to display 10 results no matter what.
    Shawn Kerr .com

  13. #13
    Senior Member chromate's Avatar
    Join Date
    Aug 2003
    Location
    UK
    Posts
    2,348
    I forget the specifics, but you are right, the default array returned will always be 10 items. What you do is just iterate through the array only 5 places...

    for ($i=0; $i < 5; $i++) {
    // where $products is your product array returned by amazon...
    echo $products[$i][whatever]
    }

    Get the idea?

    So, just go through 5 instead of saying $i < count($pruducts) which would give you all ten because the array returned by amazon (we're calling it $products in this example) will contain 10 as you've noticed.

  14. #14
    Roll Tide! mobilebadboy's Avatar
    Join Date
    Apr 2004
    Location
    Mobile, AL
    Posts
    428
    Ah, thanks. That worked, well for some reason I had to set it to 9? 5 returned 3 products, 7 returned 4. At least I was originally looking at the right line. Now after I eventually get to sleep I can get back to work again.
    Shawn Kerr .com

Similar Threads

  1. User comments script
    By Westech in forum General Management Issues
    Replies: 18
    Last Post: 01-17-2005, 05:44 AM
  2. Flash MX 2004 Action Script confusion!!
    By DTOXX in forum Graphics & Multimedia
    Replies: 23
    Last Post: 11-10-2004, 09:30 PM
  3. AWS PHP script problems
    By tempyyyst in forum Advertising & Affiliate Programs
    Replies: 8
    Last Post: 04-04-2004, 07:12 AM
  4. Anybody found a shopping cart script to use with AWS?
    By RockNRollPig in forum Advertising & Affiliate Programs
    Replies: 7
    Last Post: 02-18-2004, 06:44 PM
  5. Redirect script with statistics, graphs, etc
    By emke in forum Website Programming & Databases
    Replies: 7
    Last Post: 05-20-2003, 03:44 AM

Bookmarks

Posting Permissions

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