Results 1 to 8 of 8
  1. #1
    Join Date
    Jul 2020
    Location
    USA
    Posts
    88
    Plugin Contributions
    0

    Default Upcoming Product Center Box Layout

    157c
    fuzztrip.com

    Is there a way to change the layout of the upcoming product to match the other center boxes? It also shows no image. I'm assuming I'm missing something. Thanks!

    Click image for larger version. 

Name:	scrnli_10_30_2021_9-38-27 AM.jpg 
Views:	48 
Size:	32.1 KB 
ID:	19780

    Click image for larger version. 

Name:	scrnli_10_30_2021_9-38-16 AM.jpg 
Views:	43 
Size:	7.2 KB 
ID:	19781

  2. #2
    Join Date
    Jul 2020
    Location
    USA
    Posts
    88
    Plugin Contributions
    0

    Default Re: Upcoming Product Center Box Layout

    In admin/configuration I have New, Featured, All and Index Listing. There is not a Upcoming Listing to modify. Is it somewhere else or is Upcoming Listing meant to be text only? Anyone using this, do images show for the Upcoming Listing in the center box? I get text/links only. Thanks!

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Upcoming Product Center Box Layout

    you can modify

    includes/templates/YOUR_TEMPLATE/templates/tpl_modules_upcoming_products.php

    and adjust to taste.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  4. #4
    Join Date
    Jul 2020
    Location
    USA
    Posts
    88
    Plugin Contributions
    0

    Default Re: Upcoming Product Center Box Layout

    Quote Originally Posted by swguy View Post
    you can modify

    includes/templates/YOUR_TEMPLATE/templates/tpl_modules_upcoming_products.php

    and adjust to taste.
    Okay, so there is not a method similar to the other center boxes. I can stop looking for it lol. Modifying the template to work like the others would be over my head. I'll probably change the heading title from the Featured center box to Upcoming etc and make it work that way. Thanks!

  5. #5
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default Re: Upcoming Product Center Box Layout

    If not present in your custom template copy

    includes/modules/upcoming_products.php
    to
    includes/modules/responsive0clone/upcoming_products.php

    and

    includes/templates/template_default/templates/tpl_modules_upcoming_products.php
    to
    includes/templates/responsive0clone/templates/tpl_modules_upcoming_products.php

    Open
    includes/modules/responsive0clone/upcoming_products.php
    change lines 26 and 44

    from
    PHP Code:
    $expected_query "SELECT p.products_id, pd.products_name, products_date_available AS date_expected, p.master_categories_id 
    to
    PHP Code:
    $expected_query "SELECT p.products_id, pd.products_name, products_date_available AS date_expected, p.master_categories_id, p.products_image 
    Open
    includes/templates/responsive0clone/templates/tpl_modules_upcoming_products.php
    change lines 17 to 20

    from
    PHP Code:
    <tr>
      <th scope="col" id="upProductsHeading"><?php echo TABLE_HEADING_PRODUCTS?></th>
      <th scope="col" id="upDateHeading"><?php echo TABLE_HEADING_DATE_EXPECTED?></th>
    </tr>
    to
    PHP Code:
    <tr>
      <th scope="col" id="upcomingProducts-tableProductHeading"><?php echo TABLE_HEADING_PRODUCTS?></th>
      <th scope="col" id="upcomingProducts-tableDateHeading"><?php echo TABLE_HEADING_IMAGE?></th>
      <th scope="col" id="upcomingProducts-tableDateHeading"><?php echo TABLE_HEADING_DATE_EXPECTED?></th>
    </tr>
    And add the following after the now line 26 (previous to the above addition line 25)

    PHP Code:
    echo '<td class="" >' zen_image(DIR_WS_IMAGES $expectedItems[$i]['products_image'], SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT) . '</td>' "\n"
    You should now have this (lines 22-31)

    PHP Code:
    <?php
        
    for($i=0$row=0$n=sizeof($expectedItems); $i<$n$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>' zen_image(DIR_WS_IMAGES $expectedItems[$i]['products_image'], SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT) . '</td>' "\n";
          echo 
    '    <td class="text-right" >' zen_date_short($expectedItems[$i]['date_expected']) . '</td>' "\n";
          echo 
    '  </tr>' "\n";
        }
    ?>
    Now the image should be displayed.

  6. #6
    Join Date
    Jul 2020
    Location
    USA
    Posts
    88
    Plugin Contributions
    0

    Default Re: Upcoming Product Center Box Layout

    Thank you for this! The images do show but they are full size. Also I can't figure out how to match the layout of the other center boxes

  7. #7
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default Re: Upcoming Product Center Box Layout

    You should change the <table><tr><td> tags with <div>, and add styling to have them like the others.
    You may need/want to remove the <th> group alltogether, and add a wrapper <div>

    Don't know your template, hence can't give better suggestions.

    As per the image size you could control it by the styling.

  8. #8
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,144
    Plugin Contributions
    11

    Default Re: Upcoming Product Center Box Layout

    Tables should only be used for data. Using them to present upcoming products is probably not going to get by the checkers. And, IF really used for data, they should have the proper information in order to not violate accessibility.
    https://www.w3.org/WAI/tutorials/tables/

 

 

Similar Threads

  1. Center Categories Box column layout
    By adowty in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 13 Jun 2011, 03:07 PM
  2. main page product center box layout help please
    By kites in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 17 Apr 2010, 06:58 PM
  3. Upcoming Product Box Background Color
    By dragon03kf in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 10 Jun 2009, 09:39 AM
  4. Replies: 3
    Last Post: 5 Jul 2007, 06:20 AM
  5. Help with center box layout
    By inhome in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 24 Mar 2007, 07:18 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