Zen Cart Logo
Forums / General Questions / Displaying Manufacturers

Displaying Manufacturers

Views: 872

Results 1 to 12 of 12
15 Sep 2011, 3:44 PM
#1
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Displaying Manufacturers

Does anybody know how I can display the Manufacturer name on New Products, Featured Products, Specials etc?

I don't mean on the New Products, Featured Products, Specials listings page, I mean in the boxes that appear below the homepage, product listings etc.

15 Sep 2011, 4:00 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Displaying Manufacturers

You might look at this thread:
http://www.zen-cart.com/forum/showthread.php?t=179450

Post #28 shows what to do for the New Products centerbox ...

15 Sep 2011, 4:20 PM
#3
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Displaying Manufacturers

Ok thanks Linda, will give it a go :smile:

15 Sep 2011, 5:05 PM
#4
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Displaying Manufacturers

I've given that a try and still can't get the manufacturers to display on the new products boxes. Bearing in mind that I've manipulated this code a little here's my code with your code added:

$list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsNew centeredContent back"' . ' ' . 'style="width:207px;"',
'text' => (($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $new_products->fields['products_image'], $new_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . zen_products_lookup($new_products->fields['products_id'], 'manufacturers_id')) . '">' . $manufacturers_name . '</a><br />' . '<li><a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . $new_products->fields['products_name'] . '</a></li><br />' . '<h3>' . $products_price . '</h2>');

Here's a link to the site http://www.totallydigitalonline.co.uk/NEWSITE

As you can see there's no manufacturers showing in the new products boxes on the homepage.

15 Sep 2011, 5:22 PM
#5
ajeh avatar

ajeh

Oba-san

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

Re: Displaying Manufacturers

Did you add this code above it to get the manufacturers_name for the link?

$manufacturers_name= zen_get_products_manufacturers_name($new_products->fields['products_id']);

If you look at your View Source you appear to have the link written but not the manufacturers_name ... :unsure:

15 Sep 2011, 5:39 PM
#6
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Displaying Manufacturers

No I don't want to have to enter each manufacturer name for each one. I need it to automatically pick up the manufacturer name from the product. Like when you view a category the manufacturer appears above the product image like this http://www.totallydigitalonline.co.uk/NEWSITE/index.php?main_page=index&cPath=9_31

You will see that the manufacturer name changes from product to product, in this case the first page is SONY.

So whatever the manufacturer name is I need it to automatically show it above the NEW PRODUCTS boixes in the same way as on the product listings in each category.

15 Sep 2011, 5:43 PM
#7
ajeh avatar

ajeh

Oba-san

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

Re: Displaying Manufacturers

Look at your View Source ... you will see you have the Links ... but you need "text" of some sort, such as the manufacturers name so that it can have something to click ...

Do a View Source on your home page and look for:

<!-- bof: whats_new -->

Now look at the links for the manufacturers_id within that code ... notice there is no TEXT to produce the "visual" link to the manufacturers display ...

15 Sep 2011, 6:13 PM
#8
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Displaying Manufacturers

I think i get you. So

$manufacturers_name= zen_get_products_manufacturers_name($new_products->fields['products_id']);

Picks up the name?

Sorry if I'm sounding dim :-)

15 Sep 2011, 6:14 PM
#9
ajeh avatar

ajeh

Oba-san

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

Re: Displaying Manufacturers

That is correct ... try it and see if that works better ...

15 Sep 2011, 6:59 PM
#10
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Displaying Manufacturers

Ok cool...thank you Linda

Full and final code below:

$manufacturers_name= zen_get_products_manufacturers_name($new_products->fields['products_id']);

$list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsNew centeredContent back"' . ' ' . 'style="width:207px;"',
'text' => (($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $new_products->fields['products_image'], $new_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . zen_products_lookup($new_products->fields['products_id'], 'manufacturers_id')) . '">' . $manufacturers_name . '</a><br />' . '<li><a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . $new_products->fields['products_name'] . '</a></li><br />' . '<h3>' . $products_price . '</h2>');

I take it similar can be applied to featured products and specials

15 Sep 2011, 7:35 PM
#11
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Displaying Manufacturers

Yes can be applied to featured products and specials too :smile:

Thanks again Linda:D

15 Sep 2011, 10:36 PM
#12
ajeh avatar

ajeh

Oba-san

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

Re: Displaying Manufacturers

You are most welcome ... glad that this is now working for you ... :smile: