Post by bormos » Sun Nov 29, 2009 11:28 pm

Hi
I would like to display additional product images in product category. All my additional images are pictograms so it wouldnt really hurt.
This is what i have added into category.tpl

Code: Select all

 <?php if ($images) { ?>
      <div style="display: inline-block;">
        <?php foreach ($images as $image) { ?>
        <div style="display: inline-block; float: left; text-align: center; margin-left: 5px; margin-right: 2px; margin-bottom: 2px;"><img src="<?php echo $image['thumb']; ?>" />
          </div>
        <?php } ?>
      </div>
          <?php } ?>
but i have no idea how te define it in controller.
Tnx in advance.

Newbie

Posts

Joined
Wed Nov 25, 2009 3:57 am

Post by bormos » Tue Dec 01, 2009 3:07 am

Anyone an idea how to define it correctly?
I basically need to put this (taken from product.php) into product array in category.php

Code: Select all

$this->data['images'] = array();
			
			$results = $this->model_catalog_product->getProductImages($this->request->get['product_id']);
			
      		foreach ($results as $result) {
        		$this->data['images'][] = array(
          			'thumb2' => image_resize($result['image'], $this->config->get('config_image_additional_width'), $this->config->get('config_image_additional_height'))
        		);
      		}

Newbie

Posts

Joined
Wed Nov 25, 2009 3:57 am
Who is online

Users browsing this forum: No registered users and 1 guest