Hello,
I dlike to ask: if I have under concrete product (like Skoda Octavia 1.4 TSI) options like: "Options / Catalog / Type As Image" (i have 20 images). How to format these images side by side and not beneath it(i hate one column of all images, its ugly)? Can I edit a product page to create a custom format or what can I do?
This is just for options type "Image"
In the file product.tpl find the line <?php if ($option['type'] == 'image') { ?> and under that there is a table.
After making a back up of this file ovewrite the table with
Within this code " if ($i % 3 == 0) " the 3 signifies how many images side-by-side, change the number accordingly.
There might be a way to do this with css but I just make a few changes to the catalog product templateHow to format these images side by side
In the file product.tpl find the line <?php if ($option['type'] == 'image') { ?> and under that there is a table.
After making a back up of this file ovewrite the table with
Code: Select all
<table class="option-image" style="display: inline">
<tr>
<?php $i = '0'; ?>
<?php foreach ($option['option_value'] as $option_value) { ?>
<?php $i++; ?>
<td style="width: 1px;"><input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" /></td>
<td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name'] . ($option_value['price'] ? ' ' . $option_value['price_prefix'] . $option_value['price'] : ''); ?>" /></label></td>
<td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
<?php if ($option_value['price']) { ?>
(<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
<?php } ?>
</label></td>
<?php $tr = '</tr><tr>';
if ($i % 3 == 0) echo $tr; ?>
<?php } ?>
</tr>
</table>
Who is online
Users browsing this forum: No registered users and 107 guests