Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2010
    Location
    Richmond, Virginia, United States
    Posts
    114
    Plugin Contributions
    0

    Default Can't get product images to display on main page

    Hi,

    I'm upgrading (finally!) from 1.3.9 to 1.5.4 and am having a heck of a time going about it. Currently my issue is the following:

    On my main page, I have the New Products listed (they work fine) and, under them, the Upcoming Products in the center column. I want both boxes to be identical -- that is, the products will be displayed with their respective images, like they currently are on my old site.

    But for whatever reason, the Upcoming Products all appear with the no_picture.gif image instead of the book cover of the product. The correct images are on my server, and when you click on the products to go to the product page, you see the right image. But I can't for the life of me figure out why they aren't appearing on the front page.

    The code I'm using is this:

    <?php

    for($i=0, $row=0; $i < sizeof($expectedItems); $i++, $row++) {
    $rowClass = (($row / 2) == floor($row / 2)) ? "rowEven" : "rowOdd";
    echo ' <div class="centerBoxContentsUpdated centeredContent back">' . "\n";
    echo ' <a href="' . zen_href_link(zen_get_info_page($expectedItems[$i]['products_id']), 'cPath=' . $productsInCategory[$expectedItems[$i]['products_id']] . '&products_id=' . $expectedItems[$i]['products_id']) . '"> ' . zen_image(DIR_WS_IMAGES . $expectedItems[$i]['products_image'], $expectedItems[$i]['products_name'], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT) . '</a><br clear=all /><strong><a href="' . zen_href_link(zen_get_info_page($expectedItems[$i]['products_id']), 'cPath=' . $productsInCategory[$expectedItems[$i]['products_id']] . '&products_id=' . $expectedItems[$i]['products_id']) . '">' . $expectedItems[$i]['products_name'] . '</a></strong><br clear=all />' . zen_get_products_manufacturers_name($expectedItems[$i]['products_id']) . '<br clear=all />' . "\n";
    echo ' ' . zen_date_short($expectedItems[$i]['date_expected']) . '<br clear=all /><br clear=all /></div>' . "\n";
    }
    ?>

    Also, as a side note, the Upcoming Products won't list in descending order by release date, but I can figure that out (I hope). This is a more pressing issue.

    If anyone can help, I would much appreciate it.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Can't get product images to display on main page

    The code I'm using is this:
    From or into what file?
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jan 2010
    Location
    Richmond, Virginia, United States
    Posts
    114
    Plugin Contributions
    0

    Default Re: Can't get product images to display on main page

    It's from a file called tpl_modules_products_coming_soon.php

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Can't get product images to display on main page

    What is the purpose of the edit?
    Did you also edit the new products file?

    What happens if you remove your edited template files for the server(these are copies in your template - right?)
    Supplied code does not call out images but they are displayed in stock form
    Code:
    <?php
        for($i=0, $row=0; $i < sizeof($expectedItems); $i++, $row++) {
          $rowClass = (($row / 2) == floor($row / 2)) ? "rowEven" : "rowOdd";
          echo '  <tr class="' . $rowClass . '">' . "\n";
          echo '    <td ><a href="' . zen_href_link(zen_get_info_page($expectedItems[$i]['products_id']), 'cPath=' . $productsInCategory[$expectedItems[$i]['products_id']] . '&products_id=' . $expectedItems[$i]['products_id']) . '">' . $expectedItems[$i]['products_name'] . '</a></td>' . "\n";
          echo '    <td align="right" >' . zen_date_short($expectedItems[$i]['date_expected']) . '</td>' . "\n";
          echo '  </tr>' . "\n";
        }
    ?>
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Jan 2010
    Location
    Richmond, Virginia, United States
    Posts
    114
    Plugin Contributions
    0

    Default Re: Can't get product images to display on main page

    When I remove the file from the server, the default is that the products display in a list with the title and release date. That isn't what I want -- I want the cover images displayed.

    The purpose of the edit is to display the covers, and not just a list of upcoming titles.

  6. #6
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,685
    Plugin Contributions
    9

    Default Re: Can't get product images to display on main page

    in the future, use the code tags (code with square brackets around it; and /code to end; again with square brackets). it makes easier to read! (it also would help to do some indents!)

    Code:
    <?php
    
    for($i=0, $row=0; $i < sizeof($expectedItems); $i++, $row++) {
    $rowClass = (($row / 2) == floor($row / 2)) ? "rowEven" : "rowOdd";
    echo ' <div class="centerBoxContentsUpdated centeredContent back">' . "\n";
    echo ' <a href="' . zen_href_link(zen_get_info_page($expectedItems[$i]['products_id']), 'cPath=' . $productsInCategory[$expectedItems[$i]['products_id']] . '&products_id=' . $expectedItems[$i]['products_id']) . '"> ' . zen_image(DIR_WS_IMAGES . $expectedItems[$i]['products_image'], $expectedItems[$i]['products_name'], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT) . '</a><br clear=all /><strong><a href="' . zen_href_link(zen_get_info_page($expectedItems[$i]['products_id']), 'cPath=' . $productsInCategory[$expectedItems[$i]['products_id']] . '&products_id=' . $expectedItems[$i]['products_id']) . '">' . $expectedItems[$i]['products_name'] . '</a></strong><br clear=all />' . zen_get_products_manufacturers_name($expectedItems[$i]['products_id']) . '<br clear=all />' . "\n";
    echo ' ' . zen_date_short($expectedItems[$i]['date_expected']) . '<br clear=all /><br clear=all /></div>' . "\n";
    }
    ?>
    can you post the html output by your code? ideally one (or a couple) copies of the <div class="centerBoxContentsUpdated centeredContent back">' would be helpful.

    actually, i'm pretty sure your problem is probably where the $expectedItems object is created. if you track down where that SQL statement is constructed, i'm pretty sure the field: products_image is not in that SQL statement. if you add it there, it should work fine.

    good luck!
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  7. #7
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,685
    Plugin Contributions
    9

    Default Re: Can't get product images to display on main page

    yeah, that's it...

    look in modules/upcoming_products.php

    there are 2 querys there have begin with

    $expected_query

    after p.master_categories_id, add p.products_image and i'm pretty sure you should be all good to go.

    in addition, you can change your sort order in both of those queries. add an:

    order by products_date_available

    and you can solve that problem as well.

    good luck!
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

 

 

Similar Threads

  1. v151 Main Page: Display all product images/price?
    By Sellerz in forum General Questions
    Replies: 3
    Last Post: 18 Nov 2012, 12:18 AM
  2. Image Handler: Can not get image to display on product info page
    By weezee in forum Setting Up Categories, Products, Attributes
    Replies: 8
    Last Post: 24 Oct 2010, 04:31 AM
  3. How can I make Product Model display in the main Product Information page?
    By ttmb33 in forum Customization from the Admin
    Replies: 1
    Last Post: 6 Dec 2009, 10:29 AM
  4. Can't get product name to appear under image on Main page
    By mes7000 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 12 Oct 2008, 05:40 AM
  5. Product Info Display page: Main content floats over images in IE 6 + 7
    By erwin208 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 4 Mar 2007, 01:20 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR