Hello,
my problem was that i wanted to use image option as "checkbox" not as "radio". the sollution was easy but i wish to know is there any chance to make that choices as 2-3column table not in a single one.
Thanks in advance
It would seem like the logical thing would be if there is an image for an option regardless of type it should be used/displayed.
When I saw that image option type I figured it was a way for a customer to provide an image.
I would use that type, however I need customers to select multiple options as the product is a build your own kit kinda thing.
So I need check boxes that show the images beside them. I'm going through and looking at the default template (which we are using) and found the spot in Products.tpl and tried to add some code to display an image, but the template seems to behave like the code isn't even there.
I am using 1.5.4 however and not 1.5.1.3 like the title has here, but it's the closest topic that already exists.
Thanks,
When I saw that image option type I figured it was a way for a customer to provide an image.
I would use that type, however I need customers to select multiple options as the product is a build your own kit kinda thing.
So I need check boxes that show the images beside them. I'm going through and looking at the default template (which we are using) and found the spot in Products.tpl and tried to add some code to display an image, but the template seems to behave like the code isn't even there.
I am using 1.5.4 however and not 1.5.1.3 like the title has here, but it's the closest topic that already exists.
Thanks,
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.
Hi, i have qwestion about thesame Image Options. I ned to do shoes sizes as images and use it in options. Evberything goes nice eksept that radio cirkle before the shown image. Is there any posibility to remove that circle and use only images.
I came to a answer for my qwestion with this kinde of modifikation in product.tpl code
<input style="display:none;" 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']; ?>" />
With "display:none;" i just removed that litle circle for selecting the right image, but now came other problem, i cant see what i have selected. Thta cirkle was for image selection.
Is there a way to remove that cirkle and highlight the selected image. I just wuont to see only images and have posibility to see witch of them is selected.
I came to a answer for my qwestion with this kinde of modifikation in product.tpl code
<input style="display:none;" 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']; ?>" />
With "display:none;" i just removed that litle circle for selecting the right image, but now came other problem, i cant see what i have selected. Thta cirkle was for image selection.
Is there a way to remove that cirkle and highlight the selected image. I just wuont to see only images and have posibility to see witch of them is selected.
i am new for opencart, i dont have coding knowledge , please share the exact location and line number
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 />
No, as the templates for version 2 are a bit different. Have you tried using the radio or checkbox options? As you can set images with these.
Who is online
Users browsing this forum: No registered users and 72 guests