Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Options as images


63 replies to this topic

#41 bkellum

  • Community Member
  • 4,892 posts
  • Real Name:Bill Kellum
  • Gender:Male
  • Location:Chicago

Posted 17 May 2009, 01:09

If anyone is wanting to use Options as Images with Lightbox2,

Then in catalog/options_images.php file,
Find:
 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>';
}

Replace with:
			   /*   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>';
				  }*/
					if (OPTIONS_IMAGES_CLICK_ENLARGE == 'true'){ // Allow Lightbox2
					echo '<td align="center"><a href="' . tep_href_link(DIR_WS_IMAGES . 'options/' . $opti_array['thumbnail']) . '" target="_blank" rel="lightbox" 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 Lightbox2
					}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>';
				   }

Bill Kellum

Sounds Good Productions
STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

#42 giftshopnepal

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

Posted 27 May 2009, 08:06

View PostRusNN, on Nov 4 2008, 11:19 AM, said:

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.


Thanks a lot, but it's not what I am looking for.

I have more then 50 Color options so showing it the proudct info page goes longer.

Now my idea is

To provide the drop down menu for colors. And putting the link like View colors or see colors in the product info page, so when the customer click on that link they will see the Pop up window with the colors,
selecting the colors over there should directly change the color in the product info dropdown.

i hope this is clear now, please let me know how to do this
Raj basnet
Kathmandu, Nepal

#43 RalfThomas

  • Community Member
  • 13 posts
  • Real Name:Ralf Thomas

Posted 29 June 2009, 12:49

Hello,

what for an ID i must enter for German in option_images.php

Gruss

#44 kenz

  • Community Member
  • 157 posts
  • Real Name:kensley

Posted 02 July 2009, 16:03

Hello, I'm new to using Options as images. I have a vanilla install of rc2a and I have already ran into some trouble. for Options as images v1.7.1 there is a conflicting situation going on when its enabled and im on the product_info.php page. My product info page is blank in the middle of the page with broken client side code all around it on the sides.

I then figured its worth a shot to download v1.6 sense it says RIGHT ON on the contribution - "+ works with osc RC2a", but after opening the readme.txt, there is no installation instructions for getting this going with rc2a. Yet there are clear instructions for getting it going with previous versions of osc.

Any help will be a blessing :D

thanks
kenz

#45 kenz

  • Community Member
  • 157 posts
  • Real Name:kensley

Posted 02 July 2009, 16:41

View Postkenz, on Jul 2 2009, 12:03 PM, said:

Hello, I'm new to using Options as images. I have a vanilla install of rc2a and I have already ran into some trouble. for Options as images v1.7.1 there is a conflicting situation going on when its enabled and im on the product_info.php page. My product info page is blank in the middle of the page with broken client side code all around it on the sides.

I then figured its worth a shot to download v1.6 sense it says RIGHT ON on the contribution - "+ works with osc RC2a", but after opening the readme.txt, there is no installation instructions for getting this going with rc2a. Yet there are clear instructions for getting it going with previous versions of osc.

Any help will be a blessing :D

thanks
kenz

Can one of the developers of this contribute please speak up. It seems like this tool is a major down fall from here. I just need to know - does this work with RC2A or not? and if so - where do we get tested and approved instructions for it because they are NOT on the contribution's home page.

thanks in advance

#46 eljuani

  • Community Member
  • 1 posts
  • Real Name:Juan Irusta

Posted 07 July 2009, 23:53

Hi!
If anyone got this working with STS and the product_info template it would be of great help and I would build you a statue in the backyard of my house

#47 cemfundog

  • Community Member
  • 27 posts
  • Real Name:brian pearce
  • Gender:Male
  • Location:california

Posted 13 July 2009, 08:28

I added this contrib and now the 'buy now' buttons do not work. I love this contrib buy the way but I can't figure out why all of a sudden the buy now buttons on any page other than my product info page just take you to the details page rather than adding the product to cart like it used to. I am also using the shopping cart as pop-up contrib on my product info page which will pop up a little window once you have added the product to cart allowing the buyer to purchase immediately or continue shopping. Doubt this is a problem but thought I should mention it. Every product on my home page has a buy now button and a details button. I need to fix the buy now button ASAP.

Please Help!!!!
Any help at all would be greatly appreciated...Thank you all so much for contributing this stuff and for your help.

Let me know if there is anything else you need to help figure this out.

My existing site is at www.evantics.com

#48 TChou

  • Community Member
  • 1 posts
  • Real Name:T.Chou

Posted 07 September 2009, 01:29

View Postkenz, on Jul 2 2009, 11:03 AM, said:

Hello, I'm new to using Options as images. I have a vanilla install of rc2a and I have already ran into some trouble. for Options as images v1.7.1 there is a conflicting situation going on when its enabled and im on the product_info.php page. My product info page is blank in the middle of the page with broken client side code all around it on the sides.

I then figured its worth a shot to download v1.6 sense it says RIGHT ON on the contribution - "+ works with osc RC2a", but after opening the readme.txt, there is no installation instructions for getting this going with rc2a. Yet there are clear instructions for getting it going with previous versions of osc.

Any help will be a blessing :D

thanks
kenz



I realize this was asked several months ago, but I figured I'd chime in. I'm using a heavily modified Options as Images version 1.0 and was having the same problem in IE, but Firefox worked ok. It turns out there was some javascript at the top of the page and when I moved it to the bottom of the page after the PHP closing tags, everything worked fine in IE and FF.

#49 escroft

  • Community Member
  • 2 posts
  • Real Name:rob croft

Posted 11 September 2009, 10:07

Hello,

I have installed the 'options as images' contributions as per the instructions, BUT, when I try to upload a product option onto my site I get the following problem ;

Available Options: 1146 - Table 'escroft_v1.TABLE_PRODUCTS_ATTRIBUTES_SETS_TO_PRODUCTS' doesn't exist

SELECT pov.products_options_values_id, pov.products_options_values_name, pov.products_options_values_thumbnail, pa.options_values_price, pa.price_prefix , pase.sort_order FROM products_attributes pa, TABLE_PRODUCTS_ATTRIBUTES_SETS_TO_PRODUCTS pas2pa, TABLE_PRODUCTS_ATTRIBUTES_SETS pas, TABLE_PRODUCTS_ATTRIBUTES_SETS_ELEMENTS pase, products_options_values pov WHERE pa.products_id = '28' AND pa.options_id = '' AND pas2pa.products_id = pa.products_id AND pas.products_attributes_sets_id = pas2pa.products_attributes_sets_id AND pas.products_options_id = pa.options_id AND pase.products_attributes_sets_id = pas.products_attributes_sets_id AND pase.options_values_id = pa.options_values_id AND pov.products_options_values_id = pa.options_values_id AND pov.language_id = '1' ORDER BY pase.sort_order, pa.options_values_id

[TEP STOP]

Does anyone have any suggestions how I can solve this problem???

thanks

Edited by escroft, 11 September 2009, 10:09.


#50 axioma

  • Community Member
  • 154 posts
  • Real Name:yesid borislov

Posted 14 October 2009, 00:42

does it work with rc2a?.... because i have too many errors warnings etc.... i used the version from andes1 1.5 and worked so good but it was for ms2...

#51 emceebee

  • Community Member
  • 1 posts
  • Real Name:Patrick

Posted 24 November 2009, 08:26

Hey everyone,

ive installed the option as images contr., but i cannot see the uploaded image in product info.
I see only the Radio Button an the name ive given.

I hope you understand me, my english is terrible :D


greets,
Patrick

#52 bkellum

  • Community Member
  • 4,892 posts
  • Real Name:Bill Kellum
  • Gender:Male
  • Location:Chicago

Posted 28 November 2009, 04:41

View Postaxioma, on 14 October 2009, 00:42, said:

does it work with rc2a?.... because i have too many errors warnings etc.... i used the version from andes1 1.5 and worked so good but it was for ms2...


I had no issues installing this on RC2a by merging in the Options as Images code manually.[img]http://forums.oscommerce.com/public/style_emoticons/default/thumbsup.gif[/img]
Bill Kellum

Sounds Good Productions
STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

#53 mghay

  • Community Member
  • 33 posts
  • Real Name:Mike Haylett

Posted 29 December 2009, 16:11

V2.0 failed to work. Perhaps it's because I did not amend a file:
Instructions say:

"5. Now you need to edit some existing files:

A. /catalog/product_info.php.
B. /admin/includes/languages/english.php
C. /admin/includes/boxes/catalog.php
D. /admin/includes/filenames.php
E. /catalog/includes/filenames.php
F. /catalog/includes/languages/product_info.php
G. catalog/stylesheet.css
"

but there is no update data for item F. /catalog/includes/languages/product_info.php

I get the message:

Warning: require(includes/languages/english/options_images.php) [function.require]: failed to open stream: No such file or directory in C:\xampp\htdocs\laine\options_images.php on line 13

Fatal error: require() [function.require]: Failed opening required 'includes/languages/english/options_images.php' (include_path='.;C:\xampp\php\pear\') in C:\xampp\htdocs\laine\options_images.php on line 13


Now, Line 13 is:

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

so I think this indicates there is an options_images file missing - files with that name in catalog/ and admin/.../languages/ but not catalog/.../languages/ (?)

Can't see any sign of one from earlier versions, either, so is this why so many other people had trouble?

I really would like this to work since it is just what I need but it's getting too time consuming and irritating. Any pointers in the right direction much appreciated.

Mike

#54 maxemus

  • Community Member
  • 106 posts
  • Real Name:Raphael Muscarelle
  • Gender:Male

Posted 04 January 2010, 18:58

Have any of you wanted to have the sort order actually work. well here is the fix. one stipulation this script is for options as images along with attribute sets contrib installed together. so if you have both installed this should work for you. Make sure you back up so you can go back if this don't work for you.

Replace in catalog/options_images.php

-----find------
$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pov.products_options_values_thumbnail, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' order by pov.products_options_values_name asc");

-----Replace with------
$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pov.products_options_values_thumbnail, pa.options_values_price, pa.price_prefix, pase.sort_order from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov, " . TABLE_PRODUCTS_ATTRIBUTES_SETS_ELEMENTS . " pase where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' and pase.options_values_id = pa.options_values_id order by pase.sort_order asc");

Hope this helps a lot. Donations would be great when I get that sort of things up and running

#55 RusNN

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

Posted 11 January 2010, 13:35

Congrats! The time is come and it is come. :D
New addon allow Options As Images contribution work together with QTPro.

Features:
* Class pad_base is now automatically supports OaI contrib
* Unlimited number of options as images on one product at a time
* Allow to mix options as images with normal options on one product at a time
* Allow to track stock of options as images
* Allow to track stock of normal options
* Allow to mix tracked and nontracked options on one product at a time
Well, its allow to mix all above in every combination. Seems to me that's all work fine.

Addon is based on Options As Images 1.7.1, including fix by trikinuke

Not many time to test, seems work fine. See later wat's happened. I'm not a PHP or javascript programmer, so it it a good field for optimization and bla-bla-bla. But I completely haven't time to do this. Same for help to anybody. So, if you need help email me or PM. I may not looking for your request on the forum. By the way, if you don't need help, its great! :-"

Edited by RusNN, 11 January 2010, 13:43.


#56 wauziweb.de

  • Community Member
  • 11 posts
  • Real Name:Thorsten
  • Gender:Male

Posted 23 January 2010, 21:56

Hi folks,
no errors but unfortunately no function because the drop down list to select a category is empty!!!
(And yes there are categories to select!)

THX for help in advance
Thorsten

#57 wauziweb.de

  • Community Member
  • 11 posts
  • Real Name:Thorsten
  • Gender:Male

Posted 24 January 2010, 16:42

in options_images.php at line:
$options_query = tep_db_query("select * from " . TABLE_PRODUCTS_OPTIONS . " where language_id='" . $language_id . "'");

$language_id hold wrong id!!!
put in manualy the correct id...

now it works perfect - THX!

#58 rawaby88

  • Community Member
  • 14 posts
  • Real Name:mahmoud

Posted 12 February 2010, 14:17

View Postwauziweb.de, on 24 January 2010, 16:42, said:

in options_images.php at line:
$options_query = tep_db_query("select * from " . TABLE_PRODUCTS_OPTIONS . " where language_id='" . $language_id . "'");

$language_id hold wrong id!!!
put in manualy the correct id...

now it works perfect - THX!

hi i have the same problem can u plz help

how i can change the correct id
i try it this but not working

$options_query = tep_db_query("select * from " . TABLE_PRODUCTS_OPTIONS . " where language_id='" . $language_id . "1"); :(
thx

#59 RusNN

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

Posted 12 February 2010, 16:57

What version of OaI do you using?

In all cases the $language_id is wrong, because it must be $languages_id (-s letter were forgotten).
So, try query

$options_query = tep_db_query("select * from " . TABLE_PRODUCTS_OPTIONS . " where language_id='" . $languages_id . "'");


#60 rawaby88

  • Community Member
  • 14 posts
  • Real Name:mahmoud

Posted 13 February 2010, 15:21

View PostRusNN, on 12 February 2010, 16:57, said:

What version of OaI do you using?

In all cases the $language_id is wrong, because it must be $languages_id (-s letter were forgotten).
So, try query

$options_query = tep_db_query("select * from " . TABLE_PRODUCTS_OPTIONS . " where language_id='" . $languages_id . "'");

thanks alot
i have the last version and i change all
$language_id
to
$languages_id
i think it's 3 or 4 to change and it's working thx alot

cheer