Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2007
    Posts
    27
    Plugin Contributions
    0

    Default Display manufacturer instead of category on product page

    When I click on one of the products it displays the category as a link to products in that category. I want it, instead, to display the manufacturer with a link to all the products by that manufacturer.

    Here is the url: http://www.pedxshoes.com/index.php?m...&products_id=3

    You can see where it says "Shoes". I want it to say "John Fluevog" which is the manufacturer. I turned on the "show manufacturer" in admin but that just puts a line in the description.

    many thanx,
    Justin

  2. #2
    Join Date
    Feb 2007
    Posts
    1,704
    Plugin Contributions
    0

    Default Re: Display manufacturer instead of category on product page

    if you are maining the shoes link above the pic there is a way you can do this quite easyly.

    in admin config/product display there is a button to turn product manufacture name on and off, turn this back on.

    this will probally display the manufacture name at the bottom.

    then you need to edit the file tpl_product_info_display in your temple file or default template file and move the code

    Code:
    <!--bof Product details list  -->
    <?php if ( (($flag_show_product_info_model == 1 and $products_model != '') or ($flag_show_product_info_weight == 1 and $products_weight !=0) or ($flag_show_product_info_quantity == 1) or ($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name))) ) { ?>
    <ul id="productDetailsList" class="floatingBox back">
      <?php echo (($flag_show_product_info_model == 1 and $products_model !='') ? '<li>' . TEXT_PRODUCT_MODEL . $products_model . '</li>' : '') . "\n"; ?>
      <?php echo (($flag_show_product_info_weight == 1 and $products_weight !=0) ? '<li>' . TEXT_PRODUCT_WEIGHT .  $products_weight . TEXT_PRODUCT_WEIGHT_UNIT . '</li>'  : '') . "\n"; ?>
      <?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>'  : '') . "\n"; ?>
      <?php echo (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '<li>' . TEXT_PRODUCT_MANUFACTURER . $manufacturers_name . '</li>' : '') . "\n"; ?>
    </ul>
    <br class="clearBoth" />
    <?php
      }
    ?>
    <!--eof Product details list -->
    to lines 30 or somewhere up to top of the listing.

    thats a basic way of doing it.

  3. #3
    Join Date
    Feb 2007
    Posts
    1,704
    Plugin Contributions
    0

    Default Re: Display manufacturer instead of category on product page

    you could also try just adding the code

    Code:
      <?php echo (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '<li>' . TEXT_PRODUCT_MANUFACTURER . $manufacturers_name . '</li>' : '') . "\n"; ?>
    to the top like above and see if that work, or if you still want the link to work make acobination of the exsisting link code and replace the code that brings in the text shoes and replace with the cide that brings in the manufactures name.

    iv not tried this my self but you could try, just make a copy of the exsisting tpl_product_info_display file then you wont ######## anyhing up as you can just delete the modiefed file and put the old on back

  4. #4
    Join Date
    Nov 2007
    Posts
    195
    Plugin Contributions
    2

    Default Re: Display manufacturer instead of category on product page

    With the standard template defaults there is no way to do this, so you will have to edit the code directly

    In /includes/templates/YOURTEMPLATE/templates there should be a file called tpl_product_info_display.php. If it is not there copy the file from /includes/templates/template_default/templates into that directory, that will mean you can undo this without any hassle.

    Now hackety, hack hack hack change the code around line 25 which says
    PHP Code:
    <!--bof Category Icon -->
    <?php if ($module_show_categories != 0) {?>
    <?php
    /**
     * display the category icons
     */
    require($template->get_template_dir('/tpl_modules_category_icon_display.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_category_icon_display.php'); ?>
    <?php 
    ?>
    <!--eof Category Icon -->
    to
    PHP Code:
    <!--bof Category Icon -->
    <?php if ($module_show_categories != 0) {?>
    <?php
    /**
     * display the category icons
     */
    define"SWITCH_CATEGORY_FOR_MANUFACTURER"true );

    if( (int)
    $product_info->fields["manufacturers_id"] != ) {
      
    $manufacturerLink '<a href="' zen_href_linkFILENAME_DEFAULT'manufacturers_id=' $product_info->fields["manufacturers_id"] ) . '">' TEXT_PRODUCT_MANUFACTURER $manufacturers_name '</a>';
    } else {
       
    $manufacturerLink TEXT_PRODUCT_MANUFACTURER "No manufacturer specified";
    }

    if( 
    SWITCH_CATEGORY_FOR_MANUFACTURER ){?>
    <div align="<?php echo $align?>" id="manufacturerName" class="manufacturerName"><?php echo $manufacturerLink?></div>
    <?php
    } else {
      require(
    $template->get_template_dir('/tpl_modules_category_icon_display.php',DIR_WS_TEMPLATE$current_page_base,  'templates'). '/tpl_modules_category_icon_display.php');
    }}
    ?>
    <!--eof Category Icon -->
    Setting true to false in the code above reverts to default behaviour.

  5. #5
    Join Date
    Feb 2007
    Posts
    1,704
    Plugin Contributions
    0

    Default Re: Display manufacturer instead of category on product page

    lol i was just playing around with that code above but you beat me to it

  6. #6
    Join Date
    Nov 2007
    Posts
    195
    Plugin Contributions
    2

    Default Re: Display manufacturer instead of category on product page

    Quote Originally Posted by kitcorsa View Post
    lol i was just playing around with that code above but you beat me to it
    Them's the breaks!

  7. #7
    Join Date
    Nov 2007
    Posts
    27
    Plugin Contributions
    0

    Default Re: Display manufacturer instead of category on product page

    wow. great responses. Thank you so much. worked perfectly.

 

 

Similar Threads

  1. Display manufacturer logos instead of list
    By aself in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 15 Apr 2013, 11:36 PM
  2. Manufacturers Logo in Manufacturer Page instead of Category Image
    By jeanjeanitaly in forum General Questions
    Replies: 0
    Last Post: 1 Nov 2010, 11:27 PM
  3. Display Manufacturer instead of Category
    By phastings in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 10 Feb 2010, 11:53 PM
  4. Manufacturer URL on the Product Display page
    By PaulineNMU in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 27 Dec 2006, 05:44 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