Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Setting Up Your Zen Cart Products / Setting Up Categories, Products, Attributes / How to change the no picture image to default to the manufacturer image?

How to change the no picture image to default to the manufacturer image?

Locked

Started by aaabarnone on 14 Oct 2010, 5:10 PM · Views: 1,296

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
14 Oct 2010, 5:10 PM
#1
aaabarnone avatar

aaabarnone

New Zenner

Join Date:
Oct 2010
Posts:
2
Plugin Contributions:
0

Post #1 by aaabarnone

I checked the FAQs and even searched the forums but I haven't found this. I'm running ZC 1.3.8a. Is there a way I can make no image to default to the manufacturer image for the product? I know I can simply select the Manufacturer image as the image but is there a way to make it default to the correct manufacturer image?

15 Oct 2010, 3:41 PM
#2
ajeh avatar

ajeh

Oba-san

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

Post #2 by ajeh

You could customize where the image is pulled ...

Example, for the Product _info page you would need to edit the:
/includes/modules/pages/product_info/main_template_vars.php

and change the section:

  if ($product_info->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == '1') {
    $products_image = PRODUCTS_IMAGE_NO_IMAGE;
  } else {
    $products_image = $product_info->fields['products_image'];
  }

to look up the Manufacturers Image instead of using the PRODUCTS_IMAGE_NO_IMAGE ...

This would need to be done in quite a few places as the image function does not know the products_id so it cannot be done in just 1 location ...

NOTE: It might be easier to add the image individually to the products rather than touch all that code ...

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!

17 Oct 2010, 6:21 PM
#3
aaabarnone avatar

aaabarnone

New Zenner

Join Date:
Oct 2010
Posts:
2
Plugin Contributions:
0

Post #3 by aaabarnone

Thanks ajeh,

I was afraid the reason someone hadn't thought of it was that it was more trouble than it was worth. I guess I'll stick to doing it manually until some person who likes to right add-ons makes one or a choice gets put in to use no image or manufacturers image as default. :wink: