If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / Show manufacturer image within product_info_display

Show manufacturer image within product_info_display

Started by shop_suey on 7 Mar 2024, 10:26 AM · Views: 1,565

Results 1 to 11 of 11
7 Mar 2024, 10:26 AM
#1
shop_suey avatar

shop_suey

Zen Follower

Join Date:
Feb 2014
Location:
Germany
Posts:
375
Plugin Contributions:
0

Post #1 by shop_suey

Has anyone already inserted the (uploaded) manufacturer image next to manufacturer name at product_info_display?

roller-aus-blech.de
Selling on eBay? Use the fee calculator: https://webconcept.one/en/ebay-fee-calculator/

9 Mar 2024, 9:18 AM
#2
shop_suey avatar

shop_suey

Zen Follower

Join Date:
Feb 2014
Location:
Germany
Posts:
375
Plugin Contributions:
0

Post #2 by shop_suey

Here my code so far. It's picking up the wrong image. Anyone an idea how to adjust this?

<?php echo '<div class="manufacturer-product-info-display">' . zen_image(DIR_WS_IMAGES, $manufacturers_image) . '</div>' ; ?>

Attachment 20496

roller-aus-blech.de
Selling on eBay? Use the fee calculator: https://webconcept.one/en/ebay-fee-calculator/

10 Mar 2024, 8:49 AM
#3
shop_suey avatar

shop_suey

Zen Follower

Join Date:
Feb 2014
Location:
Germany
Posts:
375
Plugin Contributions:
0

Post #3 by shop_suey

I have tried three possibilities but none works.

<?php echo '<div class="">' . zen_image(DIR_WS_IMAGES . $manufacturer_image) . '</div>'; ?>
<?php echo '<div class="">' . zen_image(DIR_WS_IMAGES . $manufacturer_image->fields['manufacturers_image']) . '</div>'; ?>
<?php echo '<div class="">' . zen_image(DIR_WS_IMAGES . $manufacturer_info_sidebox->fields['manufacturers_image']) . '</div>'; ?>

roller-aus-blech.de
Selling on eBay? Use the fee calculator: https://webconcept.one/en/ebay-fee-calculator/

10 Mar 2024, 10:47 AM
#4
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,761
Plugin Contributions:
56

Post #4 by swguy

The variable $manufacturers_image isn't set. You need to set it.

   $manufacturers_image = zen_get_products_manufacturers_image($_GET['products_id']);
   echo '<div class="manufacturer-product-info-display">' . zen_image(DIR_WS_IMAGES . $manufacturers_image, $manufacturers_name, SMALL_IMAGE_HEIGHT, SMALL_IMAGE_WIDTH) . '</div>' ;

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

10 Mar 2024, 11:28 AM
#5
shop_suey avatar

shop_suey

Zen Follower

Join Date:
Feb 2014
Location:
Germany
Posts:
375
Plugin Contributions:
0

Post #5 by shop_suey

Thank you very much!

roller-aus-blech.de
Selling on eBay? Use the fee calculator: https://webconcept.one/en/ebay-fee-calculator/

21 Jul 2024, 12:47 PM
#6
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Post #6 by delia

oh man that is so simple! Thanks, Scott and Shop Suey!

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

21 Jul 2024, 12:48 PM
#7
shop_suey avatar

shop_suey

Zen Follower

Join Date:
Feb 2014
Location:
Germany
Posts:
375
Plugin Contributions:
0

Post #7 by shop_suey

It works like a charm and is super nice when you don't use boxes at all like me.

roller-aus-blech.de
Selling on eBay? Use the fee calculator: https://webconcept.one/en/ebay-fee-calculator/

21 Jul 2024, 1:01 PM
#8
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Post #8 by delia

exactly - new site template is no sideboxes. I've had fun coming up with jquery dropdowns instead!

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

22 Jul 2024, 1:45 PM
#9
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Post #9 by delia

That image is generating this deprecated warning on 8.3.8:

#1 /includes/functions/functions_strings.php(335): preg_replace()
#2 /includes/functions/html_output.php(192): zen_clean_html()
#3 /includes/templates/classicBasic/templates/tpl_product_info_display.php(155): zen_image()
#4 /includes/modules/pages/product_info/main_template_vars.php(140): require('/home/xxxxxx/...')
#5 /includes/templates/classicBasic/common/tpl_main_page.php(108): require('/home/xxxxxx/...')
#6 /index.php(94): require('/home/oldtradi/...')
--> PHP Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /includes/functions/functions_strings.php on line 335.

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

22 Jul 2024, 6:33 PM
#10
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Post #10 by delia

cancel that - the error is in admin

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

23 Jul 2024, 2:53 PM
#11
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Post #11 by delia

and it's not admin. I had to remove this completely due to the warnings. php 8.2.2 v 2.0.1

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo