Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / How to link on other products of the same manufacture in product info?

How to link on other products of the same manufacture in product info?

Locked
This thread is locked. New replies are disabled.
10 May 2009, 1:24 PM
#1
neboztik avatar

neboztik

New Zenner

Join Date:
Jan 2009
Location:
Czech Republic
Posts:
59
Plugin Contributions:
0

Post #1 by neboztik

Hi, I have trouble with linking on other product of the same manufacture in product_info. I tried to make code on my own by copying the code from manufacturers_info side box but it doesn´t work. When I click on the link it links me on the main page. I am very weak in PHP but for most of you it shouldn´t be big deal.

There is code that I´ve made so far:

<?php echo (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '<li>' . TEXT_PRODUCT_MANUFACTURER . '<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturer->fields['manufacturers_id']) . '">' . $manufacturers_name . '</a></li>' : '') . "n"; ?> 
10 May 2009, 5:04 PM
#2
ajeh avatar

ajeh

Oba-san

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

Post #2 by ajeh

You have the right idea, but the values being used for the manufacturers_id are not referenced the same way with:
$manufacturer->fields['manufacturers_id']

The manufacturers_id is available on the products_info with:
$product_info->fields['manufacturers_id']

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

10 May 2009, 5:43 PM
#3
neboztik avatar

neboztik

New Zenner

Join Date:
Jan 2009
Location:
Czech Republic
Posts:
59
Plugin Contributions:
0

Post #3 by neboztik

Ajeh:

You have the right idea, but the values being used for the manufacturers_id are not referenced the same way with:
$manufacturer->fields['manufacturers_id']

The manufacturers_id is available on the products_info with:
$product_info->fields['manufacturers_id']

Thx very much it works! :clap:

11 May 2009, 2:54 AM
#4
ajeh avatar

ajeh

Oba-san

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

Post #4 by ajeh

Thank you for the update and for posting your attempted solution to this as others have asked the same question before and get lost on make these links work ...

It is always a help to know the solution ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!