Manufacturer's Logo

Locked

Views: 1,672

Results 1 to 20 of 22
This thread is locked. New replies are disabled.
29 Mar 2010, 6:05 PM
#1
autoace avatar

autoace

Totally Zenned

Join Date:
Jun 2009
Posts:
618
Plugin Contributions:
0

Manufacturer's Logo

On the tpl_product_info_display page:

How can I replace the text: 'Manufactured by:' under the Model Number with the mfr's logo image and make it a link that goes to the mfr's page with all of their products listed?

Similar to the mfr's sidebox that displays the image and then a text link to the page with all of their products listed.

Thank you,
autoace

30 Mar 2010, 10:00 AM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Manufacturer's Logo

While the technicalities may be possible, I feel I have to query the logic...

I am not a fan of external links off a sidebox... Your site then becomes a "railway junction" for through-traffic, rather than a destination or "end-point".

Getting people INTO your site is exceptionally challenging, and then you openly invite them to depart. I just don't see the logic of this.

The respected Forrester Research Group showed many years ago that there is a likelihood of just 8% that visitors who leave your site will return to it.

So, for every 100 people who take an external link, 92 won't come back.

It's far more to the point that the manufacturers (who normally don't sell retail) should be providing links to YOUR SITE - not the other way around.

Anyway, if you are set on getting rid of valuable, hard-earned visitors, I'm sure someone will show you how to do this...

20 years a Zencart User

30 Mar 2010, 10:06 AM
#3
twaddle avatar

twaddle

Banned

Join Date:
Jul 2009
Location:
Prague, Czech Republic
Posts:
478
Plugin Contributions:
0

Re: Manufacturer's Logo

schoolboy:

While the technicalities may be possible, I feel I have to query the logic...

I am not a fan of external links off a sidebox... Your site then becomes a "railway junction" for through-traffic, rather than a destination or "end-point".

Getting people INTO your site is exceptionally challenging, and then you openly invite them to depart. I just don't see the logic of this.

The respected Forrester Research Group showed many years ago that there is a likelihood of just 8% that visitors who leave your site will return to it.

So, for every 100 people who take an external link, 92 won't come back.

It's far more to the point that the manufacturers (who normally don't sell retail) should be providing links to YOUR SITE - not the other way around.

Anyway, if you are set on getting rid of valuable, hard-earned visitors, I'm sure someone will show you how to do this...
I couldn't be 100% sure, but I think he means a link to the manufacturers page within his own site, no? I could be wrong though... often am :blush:

30 Mar 2010, 10:34 AM
#4
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Manufacturer's Logo

Twaddle:

I couldn't be 100% sure, but I think he means a link to the manufacturers page within his own site, no? I could be wrong though... often am :blush:

Reading David's post again, you could be right, actually...

20 years a Zencart User

30 Mar 2010, 8:00 PM
#5
autoace avatar

autoace

Totally Zenned

Join Date:
Jun 2009
Posts:
618
Plugin Contributions:
0

Re: Manufacturer's Logo

schoolboy:

Reading David's post again, you could be right, actually...

In fact, he is right!

I want the Mfr's logo to go to their page ON MY SITE with all their products listed.

Again, instead of the TEXT being displayed, I want the Mfr's logo to be displayed and that the logo is a link pointing to their page ON MY SITE with all their products listed.

This way there should be no confusion! Does anybody know how to do that?

Thank you,
autoace

30 Mar 2010, 8:43 PM
#6
ajeh avatar

ajeh

Oba-san

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

Re: Manufacturer's Logo

This will give you the logo:

zen_image(DIR_WS_IMAGES . zen_get_products_manufacturers_image((int)$_GET['products_id']))

You just have to decide where you want it in your templates and overrides file ...

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!

31 Mar 2010, 12:53 PM
#7
autoace avatar

autoace

Totally Zenned

Join Date:
Jun 2009
Posts:
618
Plugin Contributions:
0

Re: Manufacturer's Logo

Ajeh:

This will give you the logo:

zen_image(DIR_WS_IMAGES . zen_get_products_manufacturers_image((int)$_GET['products_id']))

> 
> You just have to decide where you want it in your templates and overrides file  ...

Ajeh,

Thank you, worked great! :smile:  I put it on the product info page, right where the text would have been (commented out that line).

Only question now is how do I make that a link to the Mfrs page ON MY SITE, with all their product listed?

Thank you,
autoace

31 Mar 2010, 2:37 PM
#8
ajeh avatar

ajeh

Oba-san

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

Re: Manufacturer's Logo

Look at how the sidebox works to pull up all the products from a single manufacturer ...

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!

31 Mar 2010, 2:49 PM
#9
autoace avatar

autoace

Totally Zenned

Join Date:
Jun 2009
Posts:
618
Plugin Contributions:
0

Re: Manufacturer's Logo

Ajeh:

Look at how the sidebox works to pull up all the products from a single manufacturer ...

Ok, will do.

Can you give me the pathing to sidebox file - still learning ZC! Have not worked much yet with the sideboxes. Thanks for your help.

Thank you,
autoace

31 Mar 2010, 3:04 PM
#10
autoace avatar

autoace

Totally Zenned

Join Date:
Jun 2009
Posts:
618
Plugin Contributions:
0

Re: Manufacturer's Logo

autoace:

Ok, will do.

Can you give me the pathing to sidebox file - still learning ZC! Have not worked much yet with the sideboxes. Thanks for your help.

Sorry, forgot that I can get the path from the admin area. Thanks.

Thank you,
autoace

31 Mar 2010, 3:17 PM
#11
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Manufacturer's Logo

it is probably in: includes/modules/sideboxes (or) includes/templates/template_default/sideboxes .

... and you get to it via FTP

20 years a Zencart User

31 Mar 2010, 3:21 PM
#12
autoace avatar

autoace

Totally Zenned

Join Date:
Jun 2009
Posts:
618
Plugin Contributions:
0

Re: Manufacturer's Logo

Ajeh,

Ok, took a look at manufacturers.php and I believe it is this code that pulls the mfr info from the db, not sure tho :dontgetit

if ($show_manufacturers) {

// only check products if requested - this may slow down the processing of the manufacturers sidebox
  if (PRODUCTS_MANUFACTURERS_STATUS == '1') {
    $manufacturer_sidebox_query = "select distinct m.manufacturers_id, m.manufacturers_name
                            from " . TABLE_MANUFACTURERS . " m
                            left join " . TABLE_PRODUCTS . " p on m.manufacturers_id = p.manufacturers_id
                            where m.manufacturers_id = p.manufacturers_id and p.products_status= 1
                            order by manufacturers_name";
  } else {
    $manufacturer_sidebox_query = "select m.manufacturers_id, m.manufacturers_name
                            from " . TABLE_MANUFACTURERS . " m
                            order by manufacturers_name";
  }

Am I right?

Thank you,
autoace

31 Mar 2010, 3:30 PM
#13
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Manufacturer's Logo

Try this... it might work:

<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturer_info_sidebox->fields['manufacturers_id']) . '">' . zen_image(DIR_WS_IMAGES . zen_get_products_manufacturers_image((int)$_GET['products_id'])) . '</a>

NOTE:

BACKUP the original php file before you insert this.

If it does not work, revert to the backup.

20 years a Zencart User

31 Mar 2010, 3:42 PM
#14
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Manufacturer's Logo

This may be a bit better:

<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturer_info_sidebox->fields['manufacturers_id']) . '"><img-src="' . zen_image(DIR_WS_IMAGES . zen_get_products_manufacturers_image((int)$_GET['products_id'])) . '"></a> 

20 years a Zencart User

31 Mar 2010, 3:46 PM
#15
autoace avatar

autoace

Totally Zenned

Join Date:
Jun 2009
Posts:
618
Plugin Contributions:
0

Re: Manufacturer's Logo

schoolboy:

Try this... it might work:

<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturer_info_sidebox->fields['manufacturers_id']) . '">' . zen_image(DIR_WS_IMAGES . zen_get_products_manufacturers_image((int)$_GET['products_id'])) . '</a>

> 
> NOTE:
> 
> BACKUP the original php file before you insert this.
> 
> If it does not work, revert to the backup.

Thank you, tried it, but it breaks the page after the bread crumbs.  (made backup)

I am going to run the debug tool first, before I restore the backup, to see if this will work with some tweaking.

Thank you,
autoace

31 Mar 2010, 3:47 PM
#16
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Manufacturer's Logo

Did you see my second version?

20 years a Zencart User

31 Mar 2010, 4:04 PM
#17
autoace avatar

autoace

Totally Zenned

Join Date:
Jun 2009
Posts:
618
Plugin Contributions:
0

Re: Manufacturer's Logo

schoolboy:

Did you see my second version?

Ok, first - your first code did work, I messed up the implementation - couple of typos from making comments. It did show the link but as I said not correctly.

Secondly, with your second code, nothing shows up. HOWEVER
Am I suppose to put <?php echo ..... ?> on either side of the code?

Thank you,
autoace

31 Mar 2010, 5:19 PM
#18
ajeh avatar

ajeh

Oba-san

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

Re: Manufacturer's Logo

Another way to do this that might work bit better for you as it does not try to show an image if there isn't a manufacturers_id set is to use:

  <?php echo (($flag_show_product_info_manufacturer == 1 and zen_get_products_manufacturers_image((int)$_GET['products_id']) != '' ) ? '<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $product_info->fields['manufacturers_id']) . '">' . zen_image(DIR_WS_IMAGES . zen_get_products_manufacturers_image((int)$_GET['products_id'])) . '</a>' : ''); ?>

You may need to adapt that depending on how you are using it ...

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!

31 Mar 2010, 5:36 PM
#19
autoace avatar

autoace

Totally Zenned

Join Date:
Jun 2009
Posts:
618
Plugin Contributions:
0

Re: Manufacturer's Logo

Ajeh:

Another way to do this that might work bit better for you as it does not try to show an image if there isn't a manufacturers_id set is to use:

<?php echo (($flag_show_product_info_manufacturer == 1 and zen_get_products_manufacturers_image((int)$_GET['products_id']) != '' ) ? '<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $product_info->fields['manufacturers_id']) . '">' . zen_image(DIR_WS_IMAGES . zen_get_products_manufacturers_image((int)$_GET['products_id'])) . '</a>' : ''); ?>
> 
> You may need to adapt that depending on how you are using it ...

Ajeh, works great!! :smile:

Exactly what I wanted, thank you!

Thank you,
autoace

31 Mar 2010, 5:38 PM
#20
autoace avatar

autoace

Totally Zenned

Join Date:
Jun 2009
Posts:
618
Plugin Contributions:
0

Re: Manufacturer's Logo

Ajeh:

Another way to do this that might work bit better for you as it does not try to show an image if there isn't a manufacturers_id set is to use:

<?php echo (($flag_show_product_info_manufacturer == 1 and zen_get_products_manufacturers_image((int)$_GET['products_id']) != '' ) ? '<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $product_info->fields['manufacturers_id']) . '">' . zen_image(DIR_WS_IMAGES . zen_get_products_manufacturers_image((int)$_GET['products_id'])) . '</a>' : ''); ?>
> 
> You may need to adapt that depending on how you are using it ...

Is there a way to control the Mfrs logo image size?  For example, if I wanted to make it smaller?

Thank you,
autoace