Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Sep 2010
    Posts
    263
    Plugin Contributions
    0

    red flag re; Category Page Layout V 1.39h

    re; Category Page Layout V 1.39h

    I've noticed that the default page layout lists my category title first, the category description and then it lists my product listing.

    Is it possible to have part of the category description displayed before the product listing and another more detailed category description showing after the product listing ?

    It's just that if my category description is too long, my product listings get scrolled off the page view and the only way to see there is a product listing is the scroll down. This means customers won't see my product images unless they scroll further down.

    I would prefer the customer saw the product listing on page load with a brief category description above and a more detailed category description below the product listing. This would help me get a more detailed category description without it all pushing down the product listing off the page view, when the category page first loads.
    Thanks,
    007

  2. #2
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: re; Category Page Layout V 1.39h

    I achived this once by splitting description using php explode.

    lots of examples about on the web.

    Your category description would be some thing like:

    This is a nice category, please broswe our products.%%You are now at the bottom of our page you can click to the next page to see more from this category.

    notice how you seperate by a unique identifier in this case - %%

    then you replace the part that outputs your category description like this:

    create a template override file here:
    includes/templates/YOUR_TEMPLATE/templates/tpl_index_categories.php

    replace this:

    PHP Code:
    <?php
      
    // categories_description
            
    if ($current_categories_description != '') {
        
    ?>
        <div id="categoryDescription" class="catDescContent"><?php echo $current_categories_description;  ?></div>
        <?php // categories_description ?>
    with this:

    PHP Code:
    <?php
      
    // categories_description
            
    if ($current_categories_description != '') {
    //added to split description
    $splitthis  $current_categories_description;
    $pieces explode("%%"$splitthis);
        
    ?>
        <div id="categoryDescription" class="catDescContent"><?php echo echo $pieces[0];  ?></div>
        <?php // categories_description ?>

    and then towards the bottom where you want the secon part simply put this:
    PHP Code:
    <?php
      
    // categories_description second part
            
    if ($current_categories_description != '') {
        
    ?>
        <div id="categoryDescription" class="catDescContent"><?php echo echo $pieces[1];  ?></div>
        <?php // categories_description ?>
    heres what we are doing:
    $splitthis = the category description variable
    $pieces = explode("%%", $splitthis); - This is splitting the data into the sections.
    echo $pieces[0]; // piece1 - this is where we echo out the piece 1
    echo $pieces[1]; // piece2 - this is where we echo out the peice 2

    %% would be placed between section 1 of your descriton and section 2 of your description.

    you can split the data and spread it around the page where ever you like.

    hope this helps.
    Phil Rogers
    A problem shared is a problem solved.

  3. #3
    Join Date
    Sep 2010
    Posts
    263
    Plugin Contributions
    0

    Default Re: re; Category Page Layout V 1.39h

    Thanks Philip, much appreciated. I will follow up in due course. One of my concerns was not having enough category details, as it's become evident to me that Google crawls these category pages and ranks them. That said I did not want to push down my product images and descriptions list further, as I was concerned it could impact sales. i.e. the immediate visual experience that contributes to some sales.
    Thanks,
    007

  4. #4
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: re; Category Page Layout V 1.39h

    that should do what you need then. so you could either move the standard code to the bottom of the page, or the method above to have some description above and some description below.

    Good luck :)
    Phil Rogers
    A problem shared is a problem solved.

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

    Default Re: re; Category Page Layout V 1.39h

    This is a nice clean method for the task - thanks for sharing! There is a mod called Short Description for Categories intended to accomplish the same thing, but I haven't looked at it to know how it works.

    One thing it does is to add a "...more info" link to the first description section. You could add a function like this by checking to see if pieces[1] is set and outputting the link tag after the first section if it is.

    One point: the second description section should not have the same id as the first. Call it id="categoryDescription2" or something.

  6. #6
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: re; Category Page Layout V 1.39h

    One thing it does is to add a "...more info" link to the first description section. You could add a function like this by checking to see if pieces[1] is set and outputting the link tag after the first section if it is.
    great idea! :o) should be easily done with a check for the pieces[1] is there and id so add $currenturl . '#moredescription' and when outputting the bottom description make sure the hash tag is outpuuted too! :o)

    One point: the second description section should not have the same id as the first. Call it id="categoryDescription2" or something.
    good point, will fail validation otherwise won't it! good spot! :o) might be worth checking if you template has any styling applied to categoryDescription and iff so add categoryDescription2 to it also.

    :)
    Phil Rogers
    A problem shared is a problem solved.

  7. #7
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: re; Category Page Layout V 1.39h

    Quote Originally Posted by gjh42 View Post
    This is a nice clean method for the task - thanks for sharing! There is a mod called Short Description for Categories intended to accomplish the same thing, but I haven't looked at it to know how it works.
    i think when i came up with this i looked at using that mod myself but decided not to as it changed files in the admin and extra db entries i think. I'm a bit of a minimalist!! hehe
    Phil Rogers
    A problem shared is a problem solved.

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

    Default Re: re; Category Page Layout V 1.39h

    Yes, a whole new table or table field if not absolutely necessary doesn't make sense to me either. Of course there are people who can't or won't remember to add %% dividers, but just want to enter the two description sections in separate text boxes.

  9. #9
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: re; Category Page Layout V 1.39h

    Very true! Oh well a solution for everyone
    Phil Rogers
    A problem shared is a problem solved.

  10. #10
    Join Date
    Sep 2010
    Posts
    263
    Plugin Contributions
    0

    Default Re: re; Category Page Layout V 1.39h

    Quote Originally Posted by gjh42 View Post
    This is a nice clean method for the task - thanks for sharing! There is a mod called Short Description for Categories intended to accomplish the same thing, but I haven't looked at it to know how it works.
    I just tried to get this v 1.51 mod working for V 1.39 but failed.

    "Warning: require(index_filters/default_filter.php) [function.require]: failed to open stream: No such file or directory in {my shopping site}/includes/modules/pages/index/main_template_vars.php on line 191"

    The mod was updated for v1.51, so not sure if that means it won't work for versions under 1.50, but the instructions suggest that you are on your own for prior versions. i.e.. "We offer no advice for ZenCart versions prior to that."

    Anyone out there with ZenCart v1.39 had any success with this mod? I might try one of the lower versions. Perhaps the 1.37 mod.
    Last edited by HeyIts007; 6 Jul 2014 at 04:05 AM.
    Thanks,
    007

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v139h Contact Us Page Honey Pot Implementation On v1.39h
    By lindasdd in forum General Questions
    Replies: 1
    Last Post: 24 Sep 2015, 12:54 PM
  2. v138a Category Page Layout
    By raws4581 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 17 Jan 2013, 04:46 PM
  3. Product Listing display page / category page layout change question
    By cgarforth in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 16 Dec 2010, 02:37 PM
  4. Change Category Page Layout to New Products Layout
    By tonemap in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 22 Jan 2010, 11:30 PM
  5. Front page or main page layout - start with certain category
    By gloerick in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 16 Aug 2009, 07:07 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