Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / manufacture logo not showing

manufacture logo not showing

Locked

Views: 2,241

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
6 Feb 2009, 12:27 AM
#1
ryanb4614 avatar

ryanb4614

Totally Zenned

Join Date:
Feb 2008
Posts:
556
Plugin Contributions:
0

manufacture logo not showing

1.3.8a I have uploaded my manufactures logos but i would like them to show when someone uses the manufacture sidebox and selects the manufacture, for the image and name to show on the top. Tried other post couldn't get it to work. thanks

6 Feb 2009, 2:54 AM
#3
ryanb4614 avatar

ryanb4614

Totally Zenned

Join Date:
Feb 2008
Posts:
556
Plugin Contributions:
0

Re: manufacture logo not showing

No I have them all uploaded.

Where I want them to be listed is when a customer click on the "Manufacture" Side box and select the manufacture then it gives all the products under that manufacture up on the right of the page or next to the "Name that it already shows now". Click here to see

10 Feb 2009, 3:06 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: manufacture logo not showing

I do not use the SEO add-on that you are using, but you should be able to add a function to get the manufacturers_image such as:

  function zen_get_manufacturers_image($manufacturers_id) {
    global $db;

    $manufacturers_query = "select m.manufacturers_image
                      from " . TABLE_MANUFACTURERS . " m
                      where m.manufacturers_id = '" . $manufacturers_id . "'";

    $manufacturers =$db->Execute($manufacturers_query);

    return $manufacturers->fields['manufacturers_image'];
  }

From that, when there is a manufacturers_id you could then display the image where you need it ...

10 Feb 2009, 3:58 PM
#5
ryanb4614 avatar

ryanb4614

Totally Zenned

Join Date:
Feb 2008
Posts:
556
Plugin Contributions:
0

Re: manufacture logo not showing

Thanks Ajeg where would I add this code in the product_display_defult.php?

10 Feb 2009, 4:10 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: manufacture logo not showing

I added it to the:
/includes/functions/extra_functions

creating a file like:
my_extra_functions.php

That is a self loading directory and loads after the functions_general.php file ...

10 Feb 2009, 4:39 PM
#7
ryanb4614 avatar

ryanb4614

Totally Zenned

Join Date:
Feb 2008
Posts:
556
Plugin Contributions:
0

Re: manufacture logo not showing

I get: function zen_get_manufacturers_image($manufacturers_id) { global $db; $manufacturers_query = "select m.manufacturers_image from " . TABLE_MANUFACTURERS . " m where m.manufacturers_id = '" . $manufacturers_id . "'"; $manufacturers =$db->Execute($manufacturers_query); return $manufacturers->fields['manufacturers_image']; }

Whole page enlarged, and error message on top ^^

10 Feb 2009, 4:54 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: manufacture logo not showing

You would need to write the file, such as:
/includes/functions/extra_functions/my_extra_functions.php

with the opening and closing php brackets, for example:

<?php
// my extra functions

// get manufacturers_image
  function zen_get_manufacturers_image($manufacturers_id) {
    global $db;

    $manufacturers_query = "select m.manufacturers_image
                      from " . TABLE_MANUFACTURERS . " m
                      where m.manufacturers_id = '" . $manufacturers_id . "'";

    $manufacturers =$db->Execute($manufacturers_query);

    return $manufacturers->fields['manufacturers_image'];
  }
?>
10 Feb 2009, 7:40 PM
#9
ryanb4614 avatar

ryanb4614

Totally Zenned

Join Date:
Feb 2008
Posts:
556
Plugin Contributions:
0

Re: manufacture logo not showing

I inserted that code, nothing changed no manufacture image is showing up: take a look here

10 Feb 2009, 7:45 PM
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: manufacture logo not showing

All that code will do is get the "name" of the image file when passed a valid manufactuers_id ...

You will need to add additional code to where you want this displayed ...

10 Feb 2009, 8:02 PM
#11
ryanb4614 avatar

ryanb4614

Totally Zenned

Join Date:
Feb 2008
Posts:
556
Plugin Contributions:
0

Re: manufacture logo not showing

so if i want it displayed only when the user click on the manufacture and all the items are display,
edit the product_listing.php?

    case 'PRODUCT_LIST_MANUFACTURER':
        $lc_align = '';
        $lc_text = '<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing->fields['manufacturers_id']) . '">' . $listing->fields['manufacturers_name'] . '</a>';
        break;
        case 'PRODUCT_LIST_PRICE':
        $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
        $lc_align = 'right';
        $lc_text =  $lc_price;
10 Feb 2009, 9:27 PM
#12
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: manufacture logo not showing

Yes you can see if that is where you want to display the image ...