Results 1 to 9 of 9
  1. #1
    Join Date
    May 2014
    Posts
    64
    Plugin Contributions
    0

    Default Product Description At BOTTOM

    ZC 1.5.6a (PHP 5.6... should be upgrading soon by web hosting)

    I do wonder if there is a way to put product description to the bottom.
    I found the code at /templates/custom/templates/tpl_index_categories.php

    PHP Code:
    <?php
    // categories_description
        
    if ($current_categories_description != '') {
    ?>
    <div id="categoryDescription" class="catDescContent"><?php echo $current_categories_description;  ?></div>
    <?php // categories_description ?>
    I tried to move around, but it seems that it was not able to load due to another PHP file is loaded right after for subcategories grid.

    PHP Code:
    <!-- BOF: Display grid of available sub-categories, if any -->
    <?php
      
    if (PRODUCT_LIST_CATEGORY_ROW_STATUS == 0) {
        
    // do nothing
      
    } else {
        
    // display subcategories
    /**
     * require the code to display the sub-categories-grid, if any exist
     */
       
    require($template->get_template_dir('tpl_modules_category_row.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_category_row.php');
      }
    ?>
    <!-- EOF: Display grid of available sub-categories -->
    P.S. If not possible to swap around (as I tried to swap and it ended up not even process the description code at all...) Is there a way to hide text only for mobile based on width in CSS (like media query)?

  2. #2
    Join Date
    Jul 2012
    Posts
    13,837
    Plugin Contributions
    16

    Default Re: Product Description At BOTTOM

    Could you please clarify on what screen you are wanting to move content? Is it as what appears to be when a listing of product is displayed, is it on the main page, is it the sequence of content when looking at a product's information, etc...

    Answer to all of the questions is yes it is possible to move the content and to also put in media type css such that certain things are hidden based on screen resolution.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  3. #3
    Join Date
    May 2014
    Posts
    64
    Plugin Contributions
    0

    Default Re: Product Description At BOTTOM

    So basically, I wanted to move around category descriptions in category page... like this image: https://i.imgur.com/IfrACwK.png

    I came up with 2 options:
    1. Move to the bottom -> https://i.imgur.com/0biCi7T.png
    2. Hidden in mobile format (and possibly also hide all left sideboxses for mobile) -> https://i.imgur.com/DxRJ4I5.png

    I tried to swap in tpl_index_categories.php and it was simply did not work as intended (no description showed up after I tried to move the description section to the bottom)!

    I'm sure there is a way... but how to do it properly without breaking whole Zen Cart's engine.

  4. #4
    Join Date
    Jul 2012
    Posts
    13,837
    Plugin Contributions
    16

    Default Re: Product Description At BOTTOM

    Go to configuration->product listing. Then identify the sequence of each characteristic that you want displayed. Use a 0 to hide a characteristic for all views.

    For mobile hiding, need to have/know what css characteristic to reference and then the resolution at which that is to occur and what device type possibly it is to occur (mobile, tablet, all).
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  5. #5
    Join Date
    May 2014
    Posts
    64
    Plugin Contributions
    0

    Default Re: Product Description At BOTTOM

    So it seems there is no way to move the "Category Description" to the bottom?
    Based on your answer, it seems I can only do the "Option 2?"
    I could not find where to set the description to the bottom on the settings... https://i.imgur.com/9ZgIQcH.png

  6. #6
    Join Date
    Jul 2012
    Posts
    13,837
    Plugin Contributions
    16

    Default Re: Product Description At BOTTOM

    Quote Originally Posted by PanZC2020 View Post
    So it seems there is no way to move the "Category Description" to the bottom?
    Based on your answer, it seems I can only do the "Option 2?"
    I could not find where to set the description to the bottom on the settings... https://i.imgur.com/9ZgIQcH.png
    So the title of this thread is incorrect then? You don't want to position the product description, you want to reposition the category description...

    The category description is provided in:
    includes/templates/YOUR_TEMPLATE/templates/tpl_index_product_listing.php when at a category branch that has just product.

    Specifically this code section applies:
    Code:
    <?php
    // categories_description
        if ($current_categories_description != '') {
    ?>
    <div id="indexProductListCatDescription" class="content"><?php echo $current_categories_description;  ?></div>
    <?php } // categories_description ?>
    If you take that code chunk and move it below the call to show the product listed below, then the description would appear below the product, but before possible groupings such as featured, new, or specials.

    Code:
    <?php
    /**
     * require the code for listing products
     */
     require($template->get_template_dir('tpl_modules_product_listing.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_modules_product_listing.php');
    ?>
    By the way, in any posting of code above, if there are hash tags, I apologize as I copied and pasted the code, sometimes spaces turn into hash tags. It is not on purpose and I doubt I'd have time to edit them before the posting timeout completes.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  7. #7
    Join Date
    May 2014
    Posts
    64
    Plugin Contributions
    0

    Default Re: Product Description At BOTTOM

    Dammit, you are right! My brain must be so off that I put the wrong title!

    So I did what you suggested... and my guesses were right!

    It works on categories with "Product Listing" (the category without another subcategory).
    https://i.imgur.com/GUpo2iG.png

    However, on categories with subcategories, which was where I WANTED to make subscriptions at the bottom, it did NOT work!
    https://i.imgur.com/G3VQOn6.png

    So my bet is on tpl_index_categories.php, which was I typed out on first post!

  8. #8
    Join Date
    Jul 2012
    Posts
    13,837
    Plugin Contributions
    16

    Default Re: Product Description At BOTTOM

    Quote Originally Posted by PanZC2020 View Post
    ZC 1.5.6a (PHP 5.6... should be upgrading soon by web hosting)

    I do wonder if there is a way to put product description to the bottom.
    I found the code at /templates/custom/templates/tpl_index_categories.php

    PHP Code:
    <?php
    // categories_description
        
    if ($current_categories_description != '') {
    ?>
    <div id="categoryDescription" class="catDescContent"><?php echo $current_categories_description;  ?></div>
    <?php // categories_description ?>
    I tried to move around, but it seems that it was not able to load due to another PHP file is loaded right after for subcategories grid.

    PHP Code:
    <!-- BOF: Display grid of available sub-categories, if any -->
    <?php
      
    if (PRODUCT_LIST_CATEGORY_ROW_STATUS == 0) {
        
    // do nothing
      
    } else {
        
    // display subcategories
    /**
     * require the code to display the sub-categories-grid, if any exist
     */
       
    require($template->get_template_dir('tpl_modules_category_row.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_category_row.php');
      }
    ?>
    <!-- EOF: Display grid of available sub-categories -->
    P.S. If not possible to swap around (as I tried to swap and it ended up not even process the description code at all...) Is there a way to hide text only for mobile based on width in CSS (like media query)?
    Quote Originally Posted by PanZC2020 View Post
    Dammit, you are right! My brain must be so off that I put the wrong title!

    So I did what you suggested... and my guesses were right!

    It works on categories with "Product Listing" (the category without another subcategory).
    https://i.imgur.com/GUpo2iG.png

    However, on categories with subcategories, which was where I WANTED to make subscriptions at the bottom, it did NOT work!
    https://i.imgur.com/G3VQOn6.png

    So my bet is on tpl_index_categories.php, which was I typed out on first post!
    Well, that was sort of why I was confused and then thought perhaps the wrong terminology was being used to discuss products.

    So, now that have squared that away that on the categories page where multiple sub-categories are shown, it is desired to move the parent categories description around, can you explain what you meant or rather saw as an issue when moving that snippet about the category description to just below/after the category grid area? I would expect that the category description would still be assigned what it was before that code, but perhaps it gets reassigned in that code section? If so, then just need another variable that is not touched during that processing so that the description content remains...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  9. #9
    Join Date
    May 2014
    Posts
    64
    Plugin Contributions
    0

    Default Re: Product Description At BOTTOM

    After a lot frustration of testing codes on my own... and thought I may have to customize my codes...
    I came back to Zen Cart's forum and look at my topic again... then scroll down to very bottom.
    https://i.imgur.com/Wy8H0qO.png

    It turned out... there was an exact topic like this back in 2010!
    https://www.zen-cart.com/showthread....bottom-of-page

    and their solution back then, somehow still work!
    https://www.zen-cart.com/showthread....562#post670562

    For better explanation though, I put into an image!
    Just swap the description code from top to bottom of the category's grid!
    https://i.imgur.com/OWIJG20.png

    That should do it!
    https://i.imgur.com/CFJDvOx.png

 

 

Similar Threads

  1. Replies: 143
    Last Post: 11 Jul 2017, 08:22 AM
  2. v139h Short Description problems - no description on product list page
    By jgold723 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 24 Oct 2014, 05:52 AM
  3. Add more info link to product listing description when description is truncated
    By MaureenT in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 16 Sep 2010, 05:44 PM
  4. Moving Category Description to bottom of page.
    By falero in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 9 Jul 2010, 12:53 AM
  5. Product_Listing Description on Top of Image, Price on Bottom
    By sitebeaconseo in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 31 Jan 2009, 06:56 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