Post by klavi » Mon Mar 19, 2012 4:53 am

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 :)

Newbie

Posts

Joined
Mon Mar 19, 2012 4:06 am

Post by koritsaki » Mon May 28, 2012 12:14 am

Hello, I have the same problem in my shop.
I need the options images to show when someones chooses the colour option.
I use the shoppica theme, and the previous solution makes an error... any help?

Newbie

Posts

Joined
Fri Mar 16, 2012 10:17 pm

Post by DefconRhall » Wed Nov 21, 2012 1:49 pm

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,

New member

Posts

Joined
Thu Aug 30, 2012 11:00 am

Post by DefconRhall » Wed Nov 21, 2012 2:40 pm

DefconRhall wrote:but the template seems to behave like the code isn't even there.
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.

New member

Posts

Joined
Thu Aug 30, 2012 11:00 am

Post by TimesArrow » Fri Jan 25, 2013 5:19 am

Qphoria wrote:He means choose the "image" option type:
Image

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.
thank you! works fine for me!

Newbie

Posts

Joined
Sun Dec 02, 2012 7:13 am

Post by OnNets » Wed Jan 30, 2013 5:59 pm

How do you modify the image's radio option into checkbox in product option?

Thank you

New member

Posts

Joined
Wed Jan 06, 2010 5:53 pm

Post by as5era » Wed Nov 19, 2014 6:22 am

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.

Newbie

Posts

Joined
Fri Jan 24, 2014 1:55 am

Post by sureshopencart » Wed Aug 31, 2016 11:19 pm

i am new for opencart, i dont have coding knowledge , please share the exact location and line number


Posts

Joined
Tue Apr 26, 2016 5:29 pm

Post by pashasho » Sun Oct 22, 2017 3:05 am

Bg-foxx wrote:
Wed Feb 22, 2012 8:04 am
If 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:

Code: Select all

(<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
            <?php } ?>
          </label>
          <br />
          <?php } ?>
        </div>
        <br />
Immediately after the <br /> insert this code:

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 />
This is the missing code that prevents your CUSTOM template from displaying the images/swatches. Hope that helps.
can I use this code with OC 2.3.0.2?

Newbie

Posts

Joined
Wed Mar 15, 2017 5:08 pm

Post by ADD Creative » Mon Oct 23, 2017 7:39 pm

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.

ADD Creative - Web development and e-commerce development, Milton Keynes or Christchurch, UK
ADD Filtration - HVAC Panel Filters, Bag Filters and HEPA Filters


Active Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Who is online

Users browsing this forum: No registered users and 9 guests