Results 1 to 10 of 10
  1. #1
    Join Date
    Oct 2006
    Location
    At Home
    Posts
    370
    Plugin Contributions
    0

    Default How to customize 'New Products' page?

    I need to customize the 'new products' page. I want the product descriptions to be placed underneath the price rather than the product image.

    Which file should I edit?

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: How to customize 'New Products' page

    The description is the one thing that is not customizable in admin for the New listing page. You can move it by editing
    /includes/templates/your_template/templates/tpl_modules_products_new_listing.php.
    Find this section:
    PHP Code:
                      if ($disp_sort_order->fields['configuration_key'] == 'PRODUCT_NEW_LIST_PRICE') {
                        echo $display_products_price;
                      }
                      if ($disp_sort_order->fields['configuration_key'] == 'PRODUCT_NEW_LIST_WEIGHT') {
                        echo $display_products_weight;
                      }
                      if ($disp_sort_order->fields['configuration_key'] == 'PRODUCT_NEW_LIST_DATE_ADDED') {
                        echo $display_products_date_added;
                      }
                      $disp_sort_order->MoveNext();
                    }
                  ?>
                </td>
              </tr>
    <?php if (PRODUCT_NEW_LIST_DESCRIPTION != 0) { ?>
              <tr>
                <td colspan="3" valign="top" class="main">
                  <?php
                    
    echo $display_products_description;
                  
    ?>
                </td>
              </tr>
    <?php ?>
    and move this line
    echo $display_products_description;
    to just below this
    echo $display_products_price;
    adding . '<br />' at the end.

    Delete the original description section:

    <?php if (PRODUCT_NEW_LIST_DESCRIPTION != 0) { ?>
    <tr>
    <td colspan="3" valign="top" class="main">
    <?php
    echo $display_products_description;
    ?>
    </td>
    </tr>
    <?php } ?>
    PHP Code:
                      if ($disp_sort_order->fields['configuration_key'] == 'PRODUCT_NEW_LIST_PRICE') {
                        echo 
    $display_products_price;
                        echo 
    $display_products_description '<br />';
                      }
                      if (
    $disp_sort_order->fields['configuration_key'] == 'PRODUCT_NEW_LIST_WEIGHT') {
                        echo 
    $display_products_weight;
                      }
                      if (
    $disp_sort_order->fields['configuration_key'] == 'PRODUCT_NEW_LIST_DATE_ADDED') {
                        echo 
    $display_products_date_added;
                      }
                      
    $disp_sort_order->MoveNext();
                    }
                  
    ?>
                </td>
              </tr> 

  3. #3
    Join Date
    Oct 2006
    Location
    At Home
    Posts
    370
    Plugin Contributions
    0

    Default Re: How to customize 'New Products' page

    I have customized the tpl_modules_products_new_listing.php file but then the descriptions totally disappear.

    Here's my code:

    PHP Code:
     if ($disp_sort_order->fields['configuration_key'] == 'PRODUCT_NEW_LIST_PRICE') {

                        echo $display_products_price;
                        echo $display_products_description . '<br />';

                      }

                      if ($disp_sort_order->fields['configuration_key'] == 'PRODUCT_NEW_LIST_WEIGHT') {

                        echo $display_products_weight;

                      }

                      if ($disp_sort_order->fields['configuration_key'] == 'PRODUCT_NEW_LIST_DATE_ADDED') {

                        echo $display_products_date_added;

                      }

                      $disp_sort_order->MoveNext();

                    }

                  ?>

                </td>

              </tr>


              <tr>

                <td colspan="3"><hr /></td>

              </tr>

    <?php

          $products_new
    ->MoveNext();

        }

      } else {

    ?>

              <tr>

                <td class="main" colspan="2"><?php echo TEXT_NO_NEW_PRODUCTS?></td>

              </tr>

    <?php

      
    }

    ?>

    </table>

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: How to customize 'New Products' page

    Which side do you have the price displayed on? The above will only work for the right column. To make it work for either column, add the echo line in the same place in the first group of echo statements.

  5. #5
    Join Date
    Oct 2006
    Location
    At Home
    Posts
    370
    Plugin Contributions
    0

    Default Re: How to customize 'New Products' page

    The image is on the left and the name, price, weight etc are on the right side of it. The description is underneath all of them.

    I have moved the 'echo $display_products_description' code as you pointed but it still missing. I'm not sure what's going on but it's not there when I move it.


  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: How to customize 'New Products' page

    That code is about as simple as you can get. If you have
    PHP Code:
                      if ($disp_sort_order->fields['configuration_key'] == 'PRODUCT_NEW_LIST_PRICE') {
                        echo 
    $display_products_price;
                        echo 
    $display_products_description '<br />';
                      } 
    in both groups of output, I don't know what could be preventing it from working.
    Maybe try doing the copied code on a fresh copy of the file, and leave the original code at the bottom. That should give the description in both locations, which may help in diagnosis.

  7. #7
    Join Date
    Oct 2006
    Location
    At Home
    Posts
    370
    Plugin Contributions
    0

    Default Re: How to customize 'New Products' page

    Thanks! Somehow it works now.

    Can you help me on one more thing. I want to remove the more info text under the image. There are too many MORE_INFO_TEXT in tpl_modules_products_new_listing.php file. I'm not sure which one can I remove.

  8. #8
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: How to customize 'New Products' page

    Your best bet on that is to redefine the MORE_INFO_TEXT constant in the language file - you can set it to nothing ( define('MORE_INFO_TEXT'=''); ), or whatever you want it to read. Use the Developers Toolkit in admin to find the file & line number to change, and be sure to change the /your_template/ copy of the file, or make a /your_template/ copy and edit that one.

    If products have attributes, you can only get a more info button, not an add to cart, so you want to be aware of that while editing. Clicking the product name or image will still get you to the info page, so that may be ok for you.

  9. #9
    Join Date
    Oct 2006
    Location
    At Home
    Posts
    370
    Plugin Contributions
    0

    Default Re: How to customize 'New Products' page

    There are TWO 'more info' in new products page. I want to remove the 'more info' that is located right after the description. Not the one underneath the product image.

    Actually I want it to look exactly like 'categories page'. How?
    Last edited by miles; 22 Jul 2008 at 03:11 AM.

  10. #10
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: How to customize 'New Products' page

    Can you post a link to your site?

 

 

Similar Threads

  1. Customize the New Products Page
    By zc_fan in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 28 Sep 2010, 05:11 PM
  2. How to customize product display on main page? (ie New Products, Featured...)
    By UnrealPHD.com in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 8 Jun 2010, 10:52 AM
  3. How to customize "All Products Page"?
    By sfklaas in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 7 Jun 2008, 07:15 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
  •  
disjunctive-egg