Page 3 of 4

Re: [REQ] Each Option with a different picture

Posted: Wed Mar 24, 2010 10:54 am
by cmebd
Hi Q,

This is sounding really good :-)

A consideration/suggestion if at all possible:

Create a product using the "main" image.
Create the first option as main product (as default/selected option) that has the main image associated with it.
All other options would follow -

If this makes sense.

Above would mean, perhaps, duplicating main graphic but in the great scheme of things that should not be too much of a problem.

Cheers

Re: [REQ] Each Option with a different picture

Posted: Wed Mar 24, 2010 11:10 am
by rph
Qphoria wrote:Any ideas?
Yeah, in product.tpl I would throw in a default blank option prompting the user to make a selection. Something like:

Code: Select all

                <table style="width: 100%;">
                  <?php foreach ($options as $option) { ?>
                  <tr>
                    <td><?php echo $option['name']; ?>:<br />
                      <select name="option[<?php echo $option['option_id']; ?>]">
                        <option>Select one</option>
						<?php foreach ($option['option_value'] as $option_value) { ?>
                        <option value="<?php echo $option_value['option_value_id']; ?>"><?php echo $option_value['name']; ?>
                        <?php if ($option_value['price']) { ?>
                        <?php echo $option_value['prefix']; ?><?php echo $option_value['price']; ?>
                        <?php } ?>
                        </option>
                        <?php } ?>
                      </select></td>
                  </tr>
                  <?php } ?>
                </table>

Re: [REQ] Each Option with a different picture

Posted: Wed Mar 24, 2010 6:34 pm
by babyewok
Qphoria wrote:not an "additional" main image.. People want the main product image to change when they change the select box.

Oh I see - something that is there before you select the first option. I had just assumed it would be the first option that would show when you first view the product. Can't you use some sort of if/else statement - if the product has options with images, then show the first option image, else show the main product image?

Re: [REQ] Each Option with a different picture

Posted: Wed Mar 24, 2010 7:57 pm
by Qphoria
rph wrote:
Qphoria wrote:Any ideas?
Yeah, in product.tpl I would throw in a default blank option prompting the user to make a selection.
Well I thought of that, but I'm not sure I can do that either since the design of OpenCart's options is based on the first/default option being the "base". Meaning the Main Product Price is the price of the product with the first option. Like this example. The 50ml bottle is $50.00. If I added "Please select" there.. it might not matter, but it might cause confusion.

However, based on this, maybe cmebd is correct in assuming that the main product image should be the first option image since it would be the "base" item. In my example it would show the 50ml bottle anyway.

Maybe I'll go with this and show the main image if the first option has no picture, or switch to the first option image if it has a picture

Re: [REQ] Each Option with a different picture

Posted: Thu Mar 25, 2010 2:58 am
by rph
Qphoria wrote:Well I thought of that, but I'm not sure I can do that either since the design of OpenCart's options is based on the first/default option being the "base". Meaning the Main Product Price is the price of the product with the first option.
Sure you're not thinking of your mod? Pretty sure OpenCart considers price the base and makes all changes based on that (tax, options, etc.).

I just tested on default 1.4.4 and it does work ($485 base price). "Please Select One" is essentially a $0 option which may have to be accounted for when a choice has to be entered.

Re: [REQ] Each Option with a different picture

Posted: Thu Mar 25, 2010 1:13 pm
by Qphoria
It was a nightmare. Pretty much recoded the entire thing. But it works great.

Here's the demo:
http://www.unbannable.com/v144/index.ph ... duct_id=36

Things to see:
- "Please Choose" is added via javascript to all options for you.
- Change the options. See the image change.
- Go back to "Please Choose" or any option that doesn't have an image, and it will return to the product main image
- Trying to add to cart without selecting an option will give error and prevent it
- Hover over the main image after changing each to see the tooltip description from the option info
- Supports popup for each image
- Supports language files for the "Please Choose" and Warning message
- No other functionality is broken.

Other info:
- Automod worked perfectly in the backend
- I've changed the module status to show enabled (just for visual effect)
- I've also tested with jcarousel and it works great

Thanks rph and cmebd for the options advice. Seems to work ok

Re: [REQ] Each Option with a different picture

Posted: Fri Mar 26, 2010 9:19 am
by Qphoria
Anyone look at it yet? Good? Bad?

Re: [REQ] Each Option with a different picture

Posted: Fri Mar 26, 2010 11:21 am
by cmebd
Hi Q,

Absolutely beautiful!! Glad I was able to input something useful.

I think, maybe, Instruction for Admin to make sure that they create and option for the initial "main" image - ie in the demo version it would be "black".

Eg: I went to the site and selected the second option (storage/size) but couldn't order black as a colour option.

BTW have you intentionally changed the currency to pounds sterling?

Cheers

Re: [REQ] Each Option with a different picture

Posted: Fri Mar 26, 2010 11:36 am
by Qphoria
It's up to the store owner to worry about his own pictures. Best bet would be to use the words "IPOD" as a main image and then show the color models on options.

Don't see how the currency is relevant so I won't answer the question. ::)

Re: [REQ] Each Option with a different picture

Posted: Fri Mar 26, 2010 1:52 pm
by cmebd
Ok thanks for the information.

WRT currency - a passing comment in case you had inadvertently missed changing to US$

Re: [REQ] Each Option with a different picture

Posted: Fri Mar 26, 2010 7:41 pm
by Qphoria
why do i need to change currency on a demo store?

Re: [REQ] Each Option with a different picture

Posted: Sat Mar 27, 2010 1:35 am
by cmebd
I was actually looking on the shop site ie, Newsletter module was GBP4.78 - the demo had US$ but no big issue anyway............

Re: [REQ] Each Option with a different picture

Posted: Sat Mar 27, 2010 2:01 am
by Qphoria
oh you mean my site? I don't even have that currency enabled. Can't you switch back using the currency selector?

Re: [REQ] Each Option with a different picture

Posted: Mon Mar 29, 2010 11:51 pm
by Silver
amazing mod!!!!!!!!!

let us know when you up to your shop.

thanks

Re: [REQ] Each Option with a different picture

Posted: Tue Mar 30, 2010 11:31 pm
by Qphoria
I've added it now.

Re: [REQ] Each Option with a different picture

Posted: Thu Apr 08, 2010 12:05 pm
by Silver
Where is it ?

I searched on your website with no success.

let me know the link pls I want to buy it.

thanks

Re: [REQ] Each Option with a different picture

Posted: Thu Apr 08, 2010 12:10 pm
by Qphoria

Re: [REQ] Each Option with a different picture

Posted: Mon Apr 12, 2010 8:49 pm
by Silver
Hi, this is the same version as this ?

http://www.unbannable.com/v147/index.ph ... duct_id=36

thanks

Re: [REQ] Each Option with a different picture

Posted: Mon Apr 12, 2010 8:58 pm
by Qphoria
yes that is it

Re: [REQ] Each Option with a different picture

Posted: Tue Apr 13, 2010 11:57 pm
by rocker23
Quick question on the weights- If the main product has a weight (i.e. .5 pounds) and the option has a weight (i.e. .2) are they added together, or does the option weight override the main product weight?

Thank you