Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Jan 2004
    Posts
    38
    Plugin Contributions
    0

    Default Manufacturer description

    Is there an add-on available that will allow a manufacturer's description field that behaves like the category description field? ...I need to give manufacturer information above the product list just as I can do for categories...I need help!!

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Manufacturer description

    Not that I know off. You would need to add a manufacturers description to the manufacturers_info table and code to maintain it to the manufacturers page in admin, then extract it in the pages/index/main_template_vars.php when $_GET['manufacturers_id'} is set and then display it in tpl_index_product_list.php.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Aug 2006
    Posts
    133
    Plugin Contributions
    0

    Default Re: Manufacturer description

    Quote Originally Posted by kuroi View Post
    then extract it in the pages/index/main_template_vars.php when $_GET['manufacturers_id'} is set and then display it in tpl_index_product_list.php.
    So far I've got the back end working but I'm unsure how to extract the info and display it in the catalog. Extraction and display has been the most confusing part for me in learning the Zen Cart code base. (I'm a PHP newbie -- WordPress had me fooled in how easy it would be to hack Zen's DB/core and display the data!)

    Would you please point me to (file > line number) or show me (file > )) some other file's code that extracts this info?

    Thanks!

  4. #4
    Join Date
    Mar 2008
    Posts
    26
    Plugin Contributions
    0

    image problem Re: Manufacturer description

    hi,.. can anyone help me on my manufacturer page? the images are not showing.. Kindly refer to this link
    http://www.bestmilagechip.com/index....ain_page=index

    Its not showing.. tnx ahead.. :)

  5. #5
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Manufacturer description

    Quote Originally Posted by guysoul View Post
    hi,.. can anyone help me on my manufacturer page? the images are not showing..
    This is thread hijacking. You issue is different to the problem that we are trying to solve in this thread, and the intervention serves only to confuse the issue. please start a new thread for your problem.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  6. #6
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Manufacturer description

    Quote Originally Posted by cartguin View Post
    Would you please point me to (file > line number) or show me (file > )) some other file's code that extracts this info?
    The exact line numbers would depend upon which version of Zen Cart you are using. But basically to extract from the database you would look for the includes/modules/pages/index/main_template_vars.php and if $_GET['manufacturers_id'] is set add an additional entry to the $select_column_list variable just after the switch statement towards the bottom of the file.

    You would then output it in the includes/templates/YOUR_TEMPLATE/templates/tpl_index_product_list.php file but the line number would depend upon where you wanted to position it.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  7. #7
    Join Date
    Aug 2006
    Posts
    133
    Plugin Contributions
    0

    Default Re: Manufacturer description

    Okay, I am finally back to this. And sorry that I still do not understand. Data extraction and its display confuses me. If there is another core 1.3.8a file that does all this, with line numbers pointing to each part, I am pretty sure I can solve it from there.
    Quote Originally Posted by kuroi View Post
    ...if $_GET['manufacturers_id'] is set add an additional entry to the $select_column_list variable just after the switch statement towards the bottom of the file.
    1. How would I tell if $_GET['manufacturers_id'] is set or not?
    2. What additional entry would need to be added?
    3. And what is a switch statement?

    Quote Originally Posted by kuroi View Post
    You would then output it in . . . /tpl_index_product_list.php
    Right. I get that. What I don't get is:
    • What code outputs the info I need to display?


    Thanks for any further help.

  8. #8
    Join Date
    Aug 2006
    Posts
    133
    Plugin Contributions
    0

    Default Re: Manufacturer description

    Here is a solution which adds the manufacturer's image, name and description. Works with 1.3.8a.

    1. DOWNLOAD and INSTALL manufacturer_about-1.2.7 (direct link to zen cart archives zip file)

    2. OPEN includes\templates\TEMPLATE_DEFAULT\templates\tpl_index_product_list.php (or your version of it)

    3. FIND
    Code:
    <h1 id="productListHeading"><?php echo $breadcrumb->last(); ?></h1>
    4. REPLACE WITH*
    Code:
    <?php
      if (isset($_GET['manufacturers_id']) && $_GET['manufacturers_id'] > 0) {
        $chk_manufacturers_image_query = "select m.manufacturers_image, m.manufacturers_name, m.manufacturers_id
                          from " . TABLE_MANUFACTURERS . " m
                          where m.manufacturers_id = " . $_GET['manufacturers_id'];
        $chk_manufacturers_image = $db->Execute($chk_manufacturers_image_query);
                          
    echo '<div id="mfrInfo"><div class="floatLeft"><a href="' . zen_href_link(FILENAME_MANUFACTURERS_ABOUT, 'manufacturers_about_id=' . $chk_manufacturers_image->fields['manufacturers_id']) . '">' . zen_image(DIR_WS_IMAGES . $chk_manufacturers_image->fields['manufacturers_image']) . '</a><h1 class="about"><a href="' . zen_href_link(FILENAME_MANUFACTURERS_ABOUT, 'manufacturers_about_id=' . $chk_manufacturers_image->fields['manufacturers_id']) . '">' . $chk_manufacturers_image->fields['manufacturers_name'] . '</a></h1></div>'; 
      }  
    ?>
    
    <?php
      if (isset($_GET['manufacturers_id']) && $_GET['manufacturers_id'] > 0) {
        $chk_manufacturers_about_query = "select mi.manufacturers_about
                          from " . TABLE_MANUFACTURERS_INFO . " mi
                          where mi.manufacturers_id = " . $_GET['manufacturers_id'];
        $chk_manufacturers_about = $db->Execute($chk_manufacturers_about_query);
                          
    echo '<div class="text">' . $chk_manufacturers_about->fields['manufacturers_about'] . '</div></div>
    <div><img src=images/pixel_trans.gif width="100%" height="10px" /></div>'; 
      }  
    ?>
    5. Edit CSS as necessary. I left the img spacer HTML in there because they work best for me to maintain a more rigid (pixel) flow.

    *You may not want to replace Zen's more standardized H1 code. If so, remove the following:
    Code:
    <h1 class="about"><a href="' . zen_href_link(FILENAME_MANUFACTURERS_ABOUT, 'manufacturers_about_id=' . $chk_manufacturers_image->fields['manufacturers_id']) . '">' . $chk_manufacturers_image->fields['manufacturers_name'] . '</a></h1>

  9. #9
    Join Date
    Feb 2008
    Posts
    1,336
    Plugin Contributions
    1

    Default Re: Manufacturer description

    Sorry to bump this post up but I have been trying to play arround with this mod but can't get it to do what I want.

    I got this mod to work as explained above. But what I am trying to display the manufacturer description on the product display page under the productDetailsList. I will be switching my product display page to Tabs so it will be nice to display the manufacturer description under that tab.

    I noticed the kuri is been helpful in giving information about creating this mod. It would be great if I can get a reply from him or anybody else that know how I can get this working.

    I don't really care about the sidebox that came with this mod.

    The code I have been working with is:
    Code:
    <?php
      if (isset($_GET['manufacturers_id']) && $_GET['manufacturers_id'] > 0) {
        $chk_manufacturers_image_query = "select m.manufacturers_image, m.manufacturers_name, m.manufacturers_id
                          from " . TABLE_MANUFACTURERS . " m
                          where m.manufacturers_id = " . $_GET['manufacturers_id'];
        $chk_manufacturers_image = $db->Execute($chk_manufacturers_image_query);
                          
    echo '<div id="mfrInfo"><div class="floatLeft"><a href="' . zen_href_link(FILENAME_MANUFACTURERS_ABOUT, 'manufacturers_about_id=' . $chk_manufacturers_image->fields['manufacturers_id']) . '">' . zen_image(DIR_WS_IMAGES . $chk_manufacturers_image->fields['manufacturers_image']) . '</a><h1 class="about"><a href="' . zen_href_link(FILENAME_MANUFACTURERS_ABOUT, 'manufacturers_about_id=' . $chk_manufacturers_image->fields['manufacturers_id']) . '">' . $chk_manufacturers_image->fields['manufacturers_name'] . '</a></h1></div>'; 
      }  
    ?>
    
    <?php
      if (isset($_GET['manufacturers_id']) && $_GET['manufacturers_id'] > 0) {
        $chk_manufacturers_about_query = "select mi.manufacturers_about
                          from " . TABLE_MANUFACTURERS_INFO . " mi
                          where mi.manufacturers_id = " . $_GET['manufacturers_id'];
        $chk_manufacturers_about = $db->Execute($chk_manufacturers_about_query);
                          
    echo '<div class="text">' . $chk_manufacturers_about->fields['manufacturers_about'] . '</div></div>
    <div><img src=images/pixel_trans.gif width="100%" height="10px" /></div>'; 
      }  
    ?>

  10. #10
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Manufacturer description

    You haven't actually told us what the problem you are having, and even then, it can be very difficult to debug snippets of code out of context, but things that occur to me are:
    1. prefix where you use $_GET['manufacturers_id'] (as opposed to just testing that it is set) with (int) for security reasons
    2. add "LIMIT 1" to your SQL to ensure that you are returning a single record.
    3. The manufacturers_info lookup should also contain a condition that matches the language to that currently in the languages SESSION variable.
    4. I notice that the code that you have posted opens 4 DIVs, but only closes 3.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Manufacturer Description/About
    By Nick1973 in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 19 May 2013, 10:07 PM
  2. editing manufacturer description
    By xplosiv in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 27 Nov 2011, 06:35 AM
  3. Manufacturer Description
    By autoace in forum Customization from the Admin
    Replies: 1
    Last Post: 29 Sep 2011, 12:22 PM
  4. adding manufacturer description
    By liquidlead in forum Setting Up Categories, Products, Attributes
    Replies: 12
    Last Post: 26 May 2009, 02:58 AM
  5. Manufacturer's description
    By HumDaddy in forum General Questions
    Replies: 2
    Last Post: 13 Mar 2008, 07:58 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