Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Options as images


lildog

Recommended Posts

Great contrib! That's all I need for my shop. Thanks!

 

But I've discovered, that text "Available Options:" is appered for every products even if a product has no options. It happens only when setting OPTIONS_AS_IMAGES_ENABLED is enabled. To correct this goto options_images.php, find around line 15

 

	echo '<b><span class="optionsAvailable">' . TEXT_PRODUCT_OPTIONS. '</span></b>';

 

and move it a bit lower under the line

 

	if ($products_attributes['total'] > 0) {

 

So you should have

 

	if ($products_attributes['total'] > 0) {
  	  echo '<b><span class="optionsAvailable">' . TEXT_PRODUCT_OPTIONS. '</span></b>';

 

Sorry my bad english :blush:

Edited by RusNN
Link to comment
Share on other sites

Can someone show me a working version of this??

 

i am looking for a way for the options to show as the product_info image.. so they click on RED< and the product_info image changes to the red version of that product..

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

Hello

 

I have the following error when I try to add an item to my shopping cart that has attribute options available, the error is

 

Fatal error: Call to a member function on a non-object in includes/classes/shopping_cart.php on line 300

 

 

here is my code

 

$this->total += $currencies->calculate_price($attribute_price['options_values_price'], $products_tax, $qty);

 

I have just installed the Images as Options Contrib and don't now why this error is happening.

 

Cheers

Link to comment
Share on other sites

lildog.. you really should consider creating this contribution to work WITH STS since STS is a very commonly used template system.. STS allows oscommerce users to create a "template" in an html format and the define places for the php code to show which results in a unique looking site..

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

I don't use STS, so why would I port it to STS?....I didn't actually write this contib, I just cleaned it up. Unless there is a sponsorship involved ;) BTW, I like the idea of having the product main image switch to the option image clicked. A working version...unfortunately I am rebuilding my shop and it is local....works good now, though.

Link to comment
Share on other sites

Hello,

 

Our site already had the "product attribute - option type" contribution installed, and after installing the "Options as images" contribution, the attributes are not working properly. For example, the option type contribution allows customers to enter text into a text field as one of the product options, but after installing the options as images contrib, the text box is now a drop down menu and you cannot type into it.

 

I also noticed that in the admin setting for the options as images, it says that it is enabled for all of the product options, yet I never set them for as being enabled. Is there a way I can set it not to activate for one option, such as the text box attribute??

 

Please let me know what I should do. Any help would be great. Thanks!

Link to comment
Share on other sites

In the admin options as images is either on or off. But that doesn't set it on for every option, only the ones that are set in the options images section. The problem you have is that when options as images is on it by passes the original code that displays the options. I don't have option types in but your problem is likely to be solved in....catalog/options_images.php

 

I assume there was a change to the code in products.php to determine how to display the new type of text option. whatever changes you made in products.php MAY also need to be made in options_images.php.

 

lildog

Link to comment
Share on other sites

I don't use STS, so why would I port it to STS?....I didn't actually write this contib, I just cleaned it up. Unless there is a sponsorship involved ;) BTW, I like the idea of having the product main image switch to the option image clicked. A working version...unfortunately I am rebuilding my shop and it is local....works good now, though.

 

i was just asking for help,nothing more then that....since you know more about this contribution then any one else. i saw this website where the option as image is implemented in pop up page how the hell is that possible?

http://www.ativasativa.com/perfect-zen-p-1...3252b53d75e4139

Raj basnet

Kathmandu, Nepal

Link to comment
Share on other sites

i was just asking for help,nothing more then that....since you know more about this contribution then any one else. i saw this website where the option as image is implemented in pop up page how the hell is that possible?

http://www.ativasativa.com/perfect-zen-p-1...3252b53d75e4139

If I understand correctly, you need to show options as images in lightbox. I modified the catalog\options_images.php

 

Replace this

 

                 if (OPTIONS_IMAGES_CLICK_ENLARGE == 'true'){ 
                   echo '<td align="center"><a href="java script:popupWindow(\'' . tep_href_link(FILENAME_OPTIONS_IMAGES_POPUP, 'oID=' . $opti_array['id']) .'\')">' . tep_image(DIR_WS_IMAGES . 'options/' . $opti_array['thumbnail'], $opti_array['text'], OPTIONS_IMAGES_WIDTH, OPTIONS_IMAGES_HEIGHT) . '</a></td></tr>';
                 }else{
                   echo '<tr><td align="center">' . tep_image(DIR_WS_IMAGES . 'options/' . $opti_array['thumbnail'], $opti_array['text'], OPTIONS_IMAGES_WIDTH, OPTIONS_IMAGES_HEIGHT) . '</td></tr>';
                 }

 

to this

 

                 if (OPTIONS_IMAGES_CLICK_ENLARGE == 'true'){ 
// Allow Lightbox J Query for OaI
                   echo '<td align="center"><a href="' . tep_href_link(DIR_WS_IMAGES . 'options/' . $opti_array['thumbnail']) . '" target="_blank" rel="prettyOverlay[gallery]" title="' . $opti_array['text'] . '">' . tep_image(DIR_WS_IMAGES . 'options/' . $opti_array['thumbnail'], $opti_array['text'], OPTIONS_IMAGES_WIDTH, OPTIONS_IMAGES_HEIGHT) . '</a></td></tr>';
                   //echo '<td align="center"><a href="java script:popupWindow(\'' . tep_href_link(FILENAME_OPTIONS_IMAGES_POPUP, 'oID=' . $opti_array['id']) .'\')">' . tep_image(DIR_WS_IMAGES . 'options/' . $opti_array['thumbnail'], $opti_array['text'], OPTIONS_IMAGES_WIDTH, OPTIONS_IMAGES_HEIGHT) . '</a></td></tr>';
// Allow Lightbox J Query for OaI
                 }else{
                   echo '<tr><td align="center">' . tep_image(DIR_WS_IMAGES . 'options/' . $opti_array['thumbnail'], $opti_array['text'], OPTIONS_IMAGES_WIDTH, OPTIONS_IMAGES_HEIGHT) . '</td></tr>';
                 }

 

 

This is for prettyPhoto 2.2.2 mod of lightbox.

Link to comment
Share on other sites

In the admin options as images is either on or off. But that doesn't set it on for every option, only the ones that are set in the options images section. The problem you have is that when options as images is on it by passes the original code that displays the options. I don't have option types in but your problem is likely to be solved in....catalog/options_images.php

 

I assume there was a change to the code in products.php to determine how to display the new type of text option. whatever changes you made in products.php MAY also need to be made in options_images.php.

 

lildog

 

I'm still having problems with using the "option type" contrib with the "option as images" contribution. I took a look at the files lildog mentioned, but I couldn't find out what was causing the problem. I still can't get the options as images contribution to not affect the "text" option feature from the option type contribution. In the admin for "option as images", I have it selected so that it will not activate for the "text" input attribute, but it still changes the text field to a drop down box.

 

What can I do to prevent the option as images contribution from setting the "Text Field" attribute as a "selection box"?? There was an earlier contribution which was supposed to allow the "options as images" contrib to work with the "option types" contribution, but it didn't work for me. It looks like it was never updated to work with the newer releases.

 

Any advice would be great Thanks!

Link to comment
Share on other sites

Dumb install question.....

 

Everything installed OK. But when I go to the "Attributes Images Manager" under the "options as images" selection in Admin, when I click edit, I get nothing.... it never takes me to the next page to upload my images.

 

Can anyone tell me if I missed something in the install?

 

Thanks!

 

Moez

Link to comment
Share on other sites

Lildog,

I was wondering if you might be able to help give me some guidance on this one since it looks like you might be familiar with the two contributions that I'm having a small conflict with.

 

I installed the Options as Images contribution and got it working well. Next, I installed the Attributes Sets Plus contribution. All of the parts work except for one thing. It is diplaying the picture and price from the first occurance for every attribute in the attribute set. So, if I have Red, White and Blue in my set, the product page is displaying the Red picture three times.

 

Would you have any idea where I could look to help it bump through the set correctly?

 

Thanks,

Moez

Link to comment
Share on other sites

Moez,

Try creating at least two different sets. And when you get to the Attributes Images Manager select a different set than what is chosen in the pull down. And click edit. Does that work? if not you missed something in the install. If it does work please let me know.

 

lildog

 

 

 

 

Dumb install question.....

 

Everything installed OK. But when I go to the "Attributes Images Manager" under the "options as images" selection in Admin, when I click edit, I get nothing.... it never takes me to the next page to upload my images.

 

Can anyone tell me if I missed something in the install?

 

Thanks!

 

Moez

Link to comment
Share on other sites

Off hand...go back to the attributes images page and make sure the options are still set correctly. Also go to the attributes sets page and make sure the set still looks correct. If those are still correct in the admin then the info SHOULD be correct in the db and your problem is most likely in product info page. On options_images.php you can narrow it down by seeing what the sql query is returning, you can use a print_r statment. If the sql query returns the correct info, the problem will be the loop that goes through the query, and displays each.

 

lildog

 

 

 

Lildog,

I was wondering if you might be able to help give me some guidance on this one since it looks like you might be familiar with the two contributions that I'm having a small conflict with.

 

I installed the Options as Images contribution and got it working well. Next, I installed the Attributes Sets Plus contribution. All of the parts work except for one thing. It is diplaying the picture and price from the first occurance for every attribute in the attribute set. So, if I have Red, White and Blue in my set, the product page is displaying the Red picture three times.

 

Would you have any idea where I could look to help it bump through the set correctly?

 

Thanks,

Moez

Link to comment
Share on other sites

Off hand...go back to the attributes images page and make sure the options are still set correctly. Also go to the attributes sets page and make sure the set still looks correct. If those are still correct in the admin then the info SHOULD be correct in the db and your problem is most likely in product info page. On options_images.php you can narrow it down by seeing what the sql query is returning, you can use a print_r statment. If the sql query returns the correct info, the problem will be the loop that goes through the query, and displays each.

 

lildog

 

 

DOH! OK.... thanks.... the attributes page was not set correctly as you mentioned.

 

The sad thing is, I've been a programmer for 20 years (old, clunky mainframe COBOL). I'm always harping about how people need to check the obvious things first.... and, here I go.

 

Thanks a lot, Lildog! I really appreciate your help!

 

Moez

Link to comment
Share on other sites

you can see a working version here : http://www.velvetego.com/dior-sunglasses-s...r-2-s-p-767.htm

 

I'm working on a new site and i think I'll try pete's popup window thing this time (too many attributes to list on the product page)

 

btw, anyone knows of some other way to list a large number of attributes? (possibly on the product page itself this time) hmm.... is there a way to have categories of attributes or is that what attributes sets does? :)

Edited by voided
Designrfix.com | Graphic Design Inspiration & Web Design Resources - @designrfix
Link to comment
Share on other sites

  • 2 weeks later...

Hi,

thanks for a great contribution!

 

My shop stocks items in many different patterns, which are not all available most of the time.

I'm trying to combine this with QTpro but the conflicting codes on product_info.php are beyond my skill.

so, my compromise is this:

i want to remove the radio buttons from under the images, so that just the attribute images appear, without the option to select them

 

so the customer can see all the options as images, but select them from the dropdown list supplied by QTPRo.

 

what i need to know is what code do i have to change in order to remove the checkboxes.

 

hope u can help me

thanks

robyn

Link to comment
Share on other sites

i want to remove the radio buttons from under the images, so that just the attribute images appear, without the option to select them

 

ok

ive managed to do this by removing this code:

><input type="radio" name ="id[' . $products_options_name['products_options_id'] . ']" value="' . $opti_array['id'] . '" ' . $checkedd . ' /

 

 

from this file: options_images.php

 

now i just need to get rid of the dropdown list for the other attributes which dont have options_images activated. that still appears twice: once on top, added by "QTPRo", and again under the attribute images table. <_<

 

any clues?

Link to comment
Share on other sites

Hi @ all,

 

I've got som Problems with that plugin. When I insert some Attibutes e.g. Clor: titanium/black & titanium/white & titanium/pastelgreen & titanium/pastelred

none of these atributes are beeing displayed in the "Image as Option" Section. It stays blank.

 

And the productinfo.php

 

Warning: require(includes/languages/german/FILENAME_OPTIONS_IMAGES) [function.require]: failed to open stream: No such file or directory in /var/kunden/webs/KD00000/umbra/options_images.php on line 13

Fatal error: require() [function.require]: Failed opening required 'includes/languages/german/FILENAME_OPTIONS_IMAGES' (include_path='.:/usr/share/php:/usr/share/pear') in /var/kunden/webs/KD00000/umbra/options_images.php on line 13

 

P.s. i changed the language value from "1" to "2"(german)

 

Thnk's 4 your help. Hope you understand my problems

Link to comment
Share on other sites

And the productinfo.php

 

Warning: require(includes/languages/german/FILENAME_OPTIONS_IMAGES) [function.require]: failed to open stream: No such file or directory in /var/kunden/webs/KD00000/umbra/options_images.php on line 13

Fatal error: require() [function.require]: Failed opening required 'includes/languages/german/FILENAME_OPTIONS_IMAGES' (include_path='.:/usr/share/php:/usr/share/pear') in /var/kunden/webs/KD00000/umbra/options_images.php on line 13

 

P.s. i changed the language value from "1" to "2"(german)

 

Thnk's 4 your help. Hope you understand my problems

 

I fixed that problem i changed

in options_images.php on line 13

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_OPTIONS_IMAGES);

 

to

 

require('includes/languages/german/options_images.php');

 

But still got the problem in the Admin Menu

Link to comment
Share on other sites

  • 2 weeks later...

Hello

I just installed Options as images contrib.

 

When I hit the insert button in the Products Attributes area I get

 

1136 - Column count doesn't match value count at row 1

 

insert into products_attributes values (null, '556', '1', '3', '0', '+')

 

[TEP STOP]

 

in an new window

 

I think it is some misconfiguration in the table. I'm not sure what to look for. Can any one help?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...