my problem was that i wanted to use image option as "checkbox" not as "radio". the sollution was easy

Thanks in advance

Made it into a vqmod and the code works, but this should still be included by default in my opinion. Makes no sense to have the option there, be pulling in the data, but just not displaying it.DefconRhall wrote:but the template seems to behave like the code isn't even there.
thank you! works fine for me!Qphoria wrote:He means choose the "image" option type:
The image field does also show for SELECT and RADIO option types, but this appears to be by mistake. The actual image only shows on the product page if you choose the "IMAGE" option type.
can I use this code with OC 2.3.0.2?Bg-foxx wrote: ↑Wed Feb 22, 2012 8:04 amIf the images still don't show after going through the steps above, AND if you are using a custom template (not the default), you need to find this file: catalog/view/CUSTOM-TEMPLATE/template/product/product.tpl
Find this code around line 108:
Immediately after the <br /> insert this code:Code: Select all
(<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </label> <br /> <?php } ?> </div> <br />
This is the missing code that prevents your CUSTOM template from displaying the images/swatches. Hope that helps.Code: Select all
<?php } ?> <?php if ($option['type'] == 'image') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <b><?php echo $option['name']; ?>:</b><br /> <table class="option-image"> <?php foreach ($option['option_value'] as $option_value) { ?> <tr> <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> </tr> <?php } ?> </table> </div> <br />
Users browsing this forum: No registered users and 14 guests