Post by luizccm » Sun Nov 06, 2011 12:03 am

Hello,
in Admin Area, Option, I creat 1 options. In option created, i creat one option and select image. I doing upload the imagem and save. In one Product, I select Options, search of option created, select and save. In front and, the image not show. Other options (Select, Radio, Checkbox) work fine, but image not show with option of product.
Thanks,
Luiz O0

Newbie

Posts

Joined
Sat Nov 05, 2011 11:53 pm

Post by JVladaJ » Sun Dec 11, 2011 6:29 pm

Same problem here.
Do you already have a solution? If so, can you give me a advice please :)

Newbie

Posts

Joined
Sun Dec 11, 2011 6:27 pm

Post by Daniel » Mon Dec 12, 2011 10:06 am

you need to select image and not option.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by maurotto » Thu Dec 15, 2011 8:50 am

Daniel wrote:you need to select image and not option.
sorry daniel
i've get same problem, but i dont understand, when i put an option in Catalog----> Options-----> Colors--- i write red for example and i select an image red. In front when i buy that items i'd get an option Colors with checkbox called red and an image red?

Newbie

Posts

Joined
Mon Dec 12, 2011 2:48 am

Post by Qphoria » Thu Dec 15, 2011 9:34 am

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.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by maurotto » Thu Dec 15, 2011 7:12 pm

perfect. thx a lot

Newbie

Posts

Joined
Mon Dec 12, 2011 2:48 am

Post by npublic » Tue Dec 27, 2011 2:57 pm

Hello,

I have tried to create the options with images but it doesn't work for me, not even using the configuration shown in the attached image. Can you advice?

Thanks

http://www.redsewingbox.com Yarn and crafts supplies


Newbie

Posts

Joined
Sat Mar 19, 2011 9:24 pm

Post by vicky_vale_71 » Tue Jan 31, 2012 6:58 pm

Hello,
I don't know what wenwenzi's going on about - that obviously went right over my head (-?)

- anyway - thanks Daniel and Qphoria for pointing out how to use this function - works a treat! - Loving Opencart more and more everyday ;D

Is there anyway of making the the option thumbnails a bit bigger or adding a pop up image when selected/hovered over?

I'm a newbie so would be happy to buy an extension to do this, But I am learning more and more about code so if the answer is in a coding change, would be most grateful if it were explained in an idiot proof way.

Lovin the whole Opencart community ;D ;D

Newbie

Posts

Joined
Fri Jan 06, 2012 1:49 am

Post by steller007 » Sun Feb 19, 2012 4:42 am

Hey All I tried selecting the image option and then uploading images for that option, I then went to the product and added that option but I still don't see it on my product page. Does anybody know why?

Newbie

Posts

Joined
Wed Feb 15, 2012 12:13 am

Post by Renato Frota » Mon Feb 20, 2012 1:51 am

Did you put enough quantity for this option specific in the product options?

New member

Posts

Joined
Wed Aug 31, 2011 1:21 pm

Post by jakemccaig » Mon Feb 20, 2012 9:13 am

I am having the same exact problem, I set up the option, added the images and applied the option to the product and is says available options but does not give any options to choose.

Newbie

Posts

Joined
Mon Feb 20, 2012 9:11 am

Post by Jaer007ll » Mon Feb 20, 2012 3:27 pm

Image
thank you very much.

Newbie

Posts

Joined
Thu Feb 09, 2012 2:50 pm

Post by steller007 » Mon Feb 20, 2012 4:52 pm

Hey renato,

I did but it is still not showing up. I then tried making this option to a file type to see if it would show up on the product page and it does but as an upload option, but when I change it to image and then go to the specific product and add that as an option it does not show up on the products page. I have made this option a required field so on the products page it doesn't let me add the products to the cart because I have not selected a color (image option), but the thing is that I can't because I don't see the field on products page.

Any help?

Newbie

Posts

Joined
Wed Feb 15, 2012 12:13 am

Post by Renato Frota » Mon Feb 20, 2012 9:32 pm

Are you using custom theme? The theme should have support for image options.

If it's not being shown in the default theme, then it's because you have not added enough quantity for this image option in the product data. I'm saying about that screen where you link this image option to the product itself, and you can select if each image will cost +/- than a product without the options. There are also a quantity field. If you select to monitor the stock, it should be set to 1+ to be shown in the product page.

New member

Posts

Joined
Wed Aug 31, 2011 1:21 pm

Post by Bg-foxx » 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.
Last edited by i2Paq on Fri Feb 24, 2012 4:22 pm, edited 1 time in total.
Reason: Code-tags added

New member

Posts

Joined
Wed Feb 22, 2012 7:55 am

Post by steller007 » Wed Feb 22, 2012 8:49 am

Thank you so much... This did the job.....SO GRATEFUL

Quick question though- Is there a way so make those images bigger?

Newbie

Posts

Joined
Wed Feb 15, 2012 12:13 am

Post by steller007 » Thu Feb 23, 2012 8:00 am

Anyone?

Newbie

Posts

Joined
Wed Feb 15, 2012 12:13 am

Post by elsewhere » Fri Feb 24, 2012 11:47 am

steller007 wrote:Anyone?
image sizes for options are defined in /catalog/controller/product/product.php
look for around line 253

Code: Select all

foreach ($option['option_value'] as $option_value) {
						if (!$option_value['subtract'] || ($option_value['quantity'] > 0)) {
							$option_value_data[] = array(
								'product_option_value_id' => $option_value['product_option_value_id'],
								'option_value_id'         => $option_value['option_value_id'],
								'name'                    => $option_value['name'],
								'image'                   => $this->model_tool_image->resize($option_value['image'], 50, 50),
								'price'                   => (float)$option_value['price'] ? $this->currency->format($this->tax->calculate($option_value['price'], $product_info['tax_class_id'], $this->config->get('config_tax'))) : false,
								'price_prefix'            => $option_value['price_prefix']
							);
						}
					}
just change the resize values from 50,50 to what ever you want.
i would suggest using a vqmod

as a side note i've actually just release a mod for this almost. instead of an additional image that changes with the selection, this allows for images in the dropdown itself.
Any options that are "select" based can have images associated via the standard admin interface. These will then be displayed as image dropdowns on the product pages that use these options.
Also allows for css styling of your drop-downs.

This will re-skin the dropdowns that dont use images as well
http://www.opencart.com/index.php?route ... on_id=5137

Newbie

Posts

Joined
Mon Feb 06, 2012 11:18 pm
Location - Philadelphia

Post by Pauline135 » Fri Feb 24, 2012 3:53 pm

ImageThank you so much...

Newbie

Posts

Joined
Thu Feb 23, 2012 3:51 pm

Post by jetswebstudio » Wed Mar 14, 2012 12:35 pm

Bg-foxx, just wanted to say thank you for providing that fix. It worked like a charm. ;D

Newbie

Posts

Joined
Fri Dec 09, 2011 8:54 am
Who is online

Users browsing this forum: No registered users and 29 guests