Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Options as images


63 replies to this topic

#1 lildog

  • Community Member
  • 605 posts
  • Real Name:Todd
  • Gender:Male
  • Location:Sunny Florida

Posted 06 October 2008, 18:24

This is the supoort thread for Options as images contrib:Contributions Page

lildog

#2 RusNN

  • Community Member
  • 191 posts
  • Real Name:Peter
  • Gender:Male
  • Location:Russia

Posted 11 October 2008, 06:53

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, 11 October 2008, 06:54.


#3 lindsayanng

  • Community Member
  • 4,258 posts
  • Real Name:Lindsay
  • Gender:Female
  • Location:Milford, Connecticut U.S.A.

Posted 11 October 2008, 07:09

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!!

#4 lmjacques

  • Community Member
  • 99 posts
  • Real Name:Lyndon
  • Gender:Male
  • Location:United Kingdom

Posted 18 October 2008, 21:34

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

#5 giftshopnepal

  • Community Member
  • 17 posts
  • Real Name:Raj basnet

Posted 23 October 2008, 19:29

View Postlildog, on Oct 6 2008, 06:24 PM, said:

This is the supoort thread for Options as images contrib:Contributions Page

lildog

CAN YOU PLEASE TELL ME HOW TO IMPLEMENT THIS IN STS? I TRIED AS MUCH AS I CAN BUT IT DIDN'T WORK.
Raj basnet
Kathmandu, Nepal

#6 lildog

  • Community Member
  • 605 posts
  • Real Name:Todd
  • Gender:Male
  • Location:Sunny Florida

Posted 24 October 2008, 01:07

I don't know what STS is so I have no need to implement it there........

#7 lindsayanng

  • Community Member
  • 4,258 posts
  • Real Name:Lindsay
  • Gender:Female
  • Location:Milford, Connecticut U.S.A.

Posted 24 October 2008, 01:25

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!!

#8 lildog

  • Community Member
  • 605 posts
  • Real Name:Todd
  • Gender:Male
  • Location:Sunny Florida

Posted 26 October 2008, 23:47

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.

#9 fantasyembroidery

  • Community Member
  • 19 posts
  • Real Name:Norma

Posted 27 October 2008, 06:13

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!

#10 lildog

  • Community Member
  • 605 posts
  • Real Name:Todd
  • Gender:Male
  • Location:Sunny Florida

Posted 28 October 2008, 00:45

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

#11 giftshopnepal

  • Community Member
  • 17 posts
  • Real Name:Raj basnet

Posted 29 October 2008, 13:23

View Postlildog, on Oct 27 2008, 12:47 AM, said:

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

#12 RusNN

  • Community Member
  • 191 posts
  • Real Name:Peter
  • Gender:Male
  • Location:Russia

Posted 04 November 2008, 11:19

View Postgiftshopnepal, on Oct 29 2008, 04:23 PM, said:

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.

#13 fantasyembroidery

  • Community Member
  • 19 posts
  • Real Name:Norma

Posted 09 November 2008, 21:21

View Postlildog, on Oct 27 2008, 04:45 PM, said:

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!

#14 moezbud

  • Community Member
  • 55 posts
  • Real Name:Moez

Posted 10 November 2008, 17:07

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

#15 moezbud

  • Community Member
  • 55 posts
  • Real Name:Moez

Posted 11 November 2008, 15:57

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

#16 lildog

  • Community Member
  • 605 posts
  • Real Name:Todd
  • Gender:Male
  • Location:Sunny Florida

Posted 11 November 2008, 16:45

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




View Postmoezbud, on Nov 10 2008, 09:07 AM, said:

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


#17 lildog

  • Community Member
  • 605 posts
  • Real Name:Todd
  • Gender:Male
  • Location:Sunny Florida

Posted 11 November 2008, 16:53

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



View Postmoezbud, on Nov 11 2008, 07:57 AM, said:

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


#18 moezbud

  • Community Member
  • 55 posts
  • Real Name:Moez

Posted 11 November 2008, 17:46

View Postlildog, on Nov 11 2008, 05:53 PM, said:

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

#19 voided

  • Community Member
  • 327 posts
  • Real Name:Luigi Fumagalli
  • Gender:Male
  • Location:Montreal, Canada

Posted 11 November 2008, 18:05

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, 11 November 2008, 18:07.

Designrfix.com | Graphic Design Inspiration & Web Design Resources - @designrfix

#20 robyna

  • Community Member
  • 14 posts
  • Real Name:robyna
  • Gender:Not Telling

Posted 24 November 2008, 10:58

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