Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16
  1. #11
    Join Date
    May 2008
    Posts
    11
    Plugin Contributions
    0

    Default Re: Main Category - sub heading sort - is it possible?

    Ok, I have applied as per your instructions - but the printer names are still appearing as before. Details of the code below:

    // subheadings - gjh42 20080617
    $section_check = $categories->fields['categories_name'];
    $section_header = '';
    if (in_array($section_check,explode(",",'HP Deskjet,HP Digital,HP Fax,HP Officejet,HP Photo,HP PSC'))) {
    $col = 0;
    $row ++;
    switch ($section_check) {
    case "HP Deskjet":
    $section_header = 'Hewlett Packard Deskjet Series Printer Cartridges';
    break;
    case "HP Digital":
    $section_header = 'HP Digital Copier Cartridges';
    break;
    case "HP Fax":
    $section_header = 'HP Fax Printer Cartridges';
    break;
    case "HP Officejet":
    $section_header = 'HP Officejet Ink Cartridges';
    break;
    case "HP Photo":
    $section_header = 'HP Photosmart Printer Inks';
    break;
    case "HP PSC":
    $section_header = 'HP Printer/Scanner/Copier Cartridges';
    break;
    case "HP Cartridges":
    $section_header = 'HP Ink Cartridges by References';
    break;
    } //switch
    $list_box_contents[$row][$col] = array('params' => 'class="sectionHeader" style="width: 100%;"',
    'text' => $section_header);
    $row ++;
    } //if
    // /subheadings
    $list_box_contents[$row][$col] = array('params' => 'class="categoryListBoxContents"' . ' ' . 'style="width:' . $col_width . '%;"',
    'text' => '<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . zen_image(DIR_WS_IMAGES . $categories->fields['categories_image'], $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br />' . $categories->fields['categories_name'] . '</a>');

    Can you see where I've gone wrong?

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

    Default Re: Main Category - sub heading sort - is it possible?

    For debugging, add an echo statement after this line:
    $section_check = $categories->fields['categories_name'];

    echo 'name is ' . $section_check;

    Does it output anything? The right thing?

    Is the first category name really "HP Deskjet" and not "HP Deskjet 123" or some model number?

    OK, it looks like it is "HP Deskjet 450". You need to use the exact name of the first subcat in the section - it won't match a partial name.
    Last edited by gjh42; 21 Jun 2008 at 12:30 AM.

  3. #13
    Join Date
    May 2008
    Posts
    11
    Plugin Contributions
    0

    Default Re: Main Category - sub heading sort - is it possible?

    Brilliant - works a treat, I was thinking I just had to state the first two words of the category name - Thanks

    How would I change the font style for 'sectionHeader' - just to make them stand out a bit more?

  4. #14
    Join Date
    May 2008
    Posts
    11
    Plugin Contributions
    0

    Default Re: Main Category - sub heading sort - is it possible?

    Glenn - wondering if you can help with customisation I need to do on the product pages?

    I've started a new thread here

    Thanks again for all your help so far.

    Kind regards,
    John

  5. #15
    Join Date
    Oct 2004
    Posts
    1,045
    Plugin Contributions
    0

    Default Re: Main Category - sub heading sort - is it possible?

    I have implemented this mod, but how can I get the subcategories images to show up? Right now, it just shows the section header, and then the subcategories names in each section, but doesn't display the subcategory image.

    Thanks!
    Danielle

  6. #16
    Join Date
    Oct 2004
    Posts
    1,045
    Plugin Contributions
    0

    Default Re: Main Category - sub heading sort - is it possible?

    Quote Originally Posted by Danielle View Post
    I have implemented this mod, but how can I get the subcategories images to show up? Right now, it just shows the section header, and then the subcategories names in each section, but doesn't display the subcategory image.

    Thanks!
    Nevermind I tried on another site and it worked great, just something buggy in the first site's template.

    Great little mod!
    Danielle

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v151 Display images of Sub-Sub category in Main page while navigating.
    By Javier Romero in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 3 May 2013, 10:02 AM
  2. Replies: 1
    Last Post: 1 May 2013, 10:20 PM
  3. sub category heading displays differently
    By usr50 in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 15 Apr 2011, 09:34 PM
  4. Display category heading & sub-category
    By g_force in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 30 Jun 2009, 05:40 PM

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