0

I am developing a magento website for a company solely selling jumpers. each jumper can have three images,

image 1: jumper with no model image 2. male model wearing jumper image 3: female model wearing jumper

some jumpers will have all 3 and some will have either the base image and either the male or female image

On the homepage i display the jumper images with no model.

I want to create 2 categories (male , female)

when lets say the male category page is selected, i would like to show the male images in this page.

any ideas how i would do this?

Nikhil_K_R
  • 2,383
  • 5
  • 27
  • 51
molleman
  • 2,934
  • 16
  • 61
  • 92

1 Answers1

0

One of the quickest ways I can think of to accomplish this, if you dont want to create duplicate product is:

In Admin -> Product -> Image Tab

Always select 'thumbnail' on a female pic and 'small_image' for a male (you could also create you own image type see below)

in /app/design/frontend/default/contempospace/template/catalog/product/list.phtml

if([category == female])
     <img src="<?php echo $this->helper('catalog/image')->init($_product, 'thumbnail')->resize(170, 174); ?>
else
     <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(170, 174); ?>

You could also add a new image type, one for male and female.

How to add a new image type in Magento :

Go Admin -> Catalog -> Attribute -> Manage Attribute

Then create a new attribute of 'Media Image' for 'Catalog Input Type for Store Owner'

See How to get access to custom Image Attribute in list.phtml in Magento

Community
  • 1
  • 1
MagePal Extensions
  • 17,646
  • 2
  • 47
  • 62