Jump to content
lildog

Options as images

Recommended Posts

Good News for anyone using STS Template System and want to add this contribution on their store.

 

After installing the latest version of Options As Images , the admin was working perfectly and images were being added to attributes but the actual product page would not work at all. I realised there was a conflict between this contribution and STS.

 

I have got this contribution to work with STS now perfectly and I am currently putting the contribution together to upload in the next couple of days. The installation takes less than 3 minutes and if you already have this installed then only a few files need changing else if you are intalling it as a new contribution then follow the instructions with the package.

 

Please PM me if you want to know my progress and also let me know problems you are having with STS and this contribution.

 

Thanks


Unique skins and accessories for your media player device - iPod / iPhone / PSP / Nintendo / Xbox - www.iangel.co.uk

Share this post


Link to post
Share on other sites

hi,

I cant download the "other contrib compatibility" file.

I have attribute Sets Plus installed, and the products_attributes.php doesnt display correct

 

Can you post the file here please...

 

thanks

Share this post


Link to post
Share on other sites

I installed everything as instructed, but when I enable Options as Images, on the product page, my color swatches do not load, and the Buy Button disappears at the bottom of the page. I am also using the SPPC Hide attributes from customer groups contribution, so I'm not sure if that's causing the problem. Has anyone heard of this problem?

Edited by lilpenny1316

Share this post


Link to post
Share on other sites
I installed everything as instructed, but when I enable Options as Images, on the product page, my color swatches do not load, and the Buy Button disappears at the bottom of the page. I am also using the SPPC Hide attributes from customer groups contribution, so I'm not sure if that's causing the problem. Has anyone heard of this problem?

 

 

I am having a similar issue. By enabling 'Options as images' contribution, all the code which is to execute after [include ('options_images.php');] on product_info.php page stops working. Any ideas why is this happening?

Share this post


Link to post
Share on other sites
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?

 

hi, I was wondering whether you could advise me how you make the options as images work in your product_info.php.

 

here is my QT Pro code in product_info.php

 

//++++ QT Pro: Begin Changed code

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="smallText">

<?php

//++++ QT Pro: End Changed Code

?>

<table border="0" cellspacing="0" cellpadding="2" align="right">

<tr>

<td align="right" class="smallText">

 

 

<?php

$small_image = $product_info['products_image'];

$popup_image = $product_info['products_image_lrg'];

if ($popup_image == '')

$popup_image = $small_image;

echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $popup_image) . '" target="_blank" rel="lightbox[' . $product_info['products_name'] . ']" title="' . $product_info['products_name'] . '">' . tep_image(DIR_WS_IMAGES . $small_image, $product_info['products_name'], ULT_THUMB_IMAGE_WIDTH, ULT_THUMB_IMAGE_HEIGHT, 'hspace="1" vspace="1"') . '<br/>' . tep_image_button('image_enlarge.gif', TEXT_CLICK_TO_ENLARGE) . '</a>';

?>

</td>

</tr>

</table>

<?php

}

?>

 

<p><?php echo stripslashes($product_info['products_description']); ?></p>

<?php

//++++ QT Pro: Begin Changed code

if (tep_not_null($product_info['products_image'])) {

?>

</td>

</tr>

</table>

<?php

}

 

<?php

//Options as Images. This whole php clause needs to be added

if (OPTIONS_AS_IMAGES_ENABLED == 'true') include ('options_images.php');

?>

//++++ QT Pro: End Changed Code

$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");

$products_attributes = tep_db_fetch_array($products_attributes_query);

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

//++++ QT Pro: Begin Changed code

$products_id=(preg_match("/^\d{1,10}(\{\d{1,10}\}\d{1,10})*$/",$HTTP_GET_VARS['products_id']) ? $HTTP_GET_VARS['products_id'] : (int)$HTTP_GET_VARS['products_id']);

require(DIR_WS_CLASSES . 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN . '.php');

$class = 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN;

$pad = new $class($products_id);

echo $pad->draw();

//++++ QT Pro: End Changed Code

}

?>

</td>

</tr>

 

I install this contribution. everything is working except the product_info.php. I will be quite happy even it only shows the option images without the select function.

 

thanks very much,

 

Iris

Share this post


Link to post
Share on other sites

Just downloaded and tried to install this contribution on this date 02/08/09;

 

included are the following steps for manual file changes:

 

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

 

The code for stylesheet changes in category "G" is in category "F", and NO code changes for the file listed in F above are included; ie, the code changes for "F" above seem to be left out.

Share this post


Link to post
Share on other sites

Also, the docs say:

 

2. Now copy all the new files into their respective folders. You should have the following files to copy:

 

/catalog/options_images.php

/catalog/options_images_popup.php

/catalog/admin/options_images.php

/catalog/admin/includes/languages/english/options_images.php

/catalog/images/options (this one is empty at start)

 

but a file present in the package is left out of the list above:

 

/catalog/includes/languages/english/options_images.php

Share this post


Link to post
Share on other sites

Also, instructions for catalog/product_info.php are as follows:

 

 

A./catalog/product_info.php, find these lines:

 

 

Next, LOOK FOR:

 

<td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>
 <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td>
 </tr>
<?php
  }
?>
	  </table>
<?php

}

 

now add after:

 

//Options as Images. Add the curly bracket as shown on the next line
}
?>

<?php
//Options as Images. This whole php clause needs to be added
if (OPTIONS_AS_IMAGES_ENABLED == 'true') include ('options_images.php'); 
?>

 

So it should look like:

 

	 <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>
 <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td>
 </tr>
<?php
  }
?>
	  </table>
<?php

}

//Options as Images. Add the curly bracket as shown on the next line
}
?>

<?php
//Options as Images. This whole php clause needs to be added
if (OPTIONS_AS_IMAGES_ENABLED == 'true') include ('options_images.php'); 
?>

 

This resulted in an extra php end tag "?>" for the version of oscommerce I'm running, ie, osCommerce 2.2 Milestone 2

Update 051112, since the very next code after insertion is such an php end tag,

 

which means it has to be removed, or the last php end tag from the insert code above should not be inserted to avoid duplicate tags after insertion.

Share this post


Link to post
Share on other sites
Just downloaded and tried to install this contribution on this date 02/08/09;

 

included are the following steps for manual file changes:

 

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

 

The code for stylesheet changes in category "G" is in category "F", and NO code changes for the file listed in F above are included; ie, the code changes for "F" above seem to be left out.

 

Apparently this is just a documentation error, and no code changes need to be done in category "F" above since without any changes to said "/catalog/includes/languages/product_info.php",

 

the contributions seems to be working as intended.

Share this post


Link to post
Share on other sites

...and it works with a little change:

 

catalog/options_images.php

if ($products_options_name['products_options_images_enabled'] == 'false'){

change to

if (OPTIONS_AS_IMAGES_ENABLED == 'false'){

Share this post


Link to post
Share on other sites

I was expecting my product attribute pictures to be displayed in rows but for some reason i cannot for the life of me figure out its only straight up and down no matter what i set max number of images per row too it only puts them in a straight line I feel im being a retard but ive managed to hack around the code i needed to change so far for everything else i just cant seem to find the issue with this, any help woud be greatly appreciated since i have 20-30 images needing to be displayed having it in a single column(is up and down i think) is rough

Edited by Gooch

Share this post


Link to post
Share on other sites

Hi there!

 

I am what I would consider an OsC noob. In attempt to get this contribution working I have run into a snag - probably something small I am over looking. This is the error I am getting when I click on Options as Images (in the Admin panel - Admin>Catalog>Options as Images):

 

 

Fatal error: Call to undefined function tep_db_query() in /home/content/s/e/a/seagoddess/html/eshop/admin/options_images.php on line 17

 

 

Here is the code that I have in my options_images.php file (located in admin dir, lines 17 through 20):

 

$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
   $products_attributes = tep_db_fetch_array($products_attributes_query);
   if ($products_attributes['total'] > 0) {
     echo '<b><span class="optionsAvailable">' . TEXT_PRODUCT_OPTIONS. '</span></b>';

 

 

I have gone through every piece of support here and in the packages and have not found anything to help. DB is setup using the included .sql file from package v1.7. Perhaps I have overlooked it, and if I have I apologize. Any and all help is greatly appreciated!!

 

 

 

jtg.

 

 

Edit:

 

 

I just checked the display of the product_info.php page on the front-end and found this error (not sure if they are related):

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/content/s/e/a/seagoddess/html/eshop/includes/functions/database.php on line 99

 

 

Thanks!!!!

Edited by worldclique

Share this post


Link to post
Share on other sites
I installed everything as instructed, but when I enable Options as Images, on the product page, my color swatches do not load, and the Buy Button disappears at the bottom of the page. I am also using the SPPC Hide attributes from customer groups contribution, so I'm not sure if that's causing the problem. Has anyone heard of this problem?

 

Hi there,

 

I've installed the contrib today and in the admin everything is working fine. It took me a while to figure it out that I have to change the language ID to my own ID i'm using but ok...

 

But I have the problem that after setting Options as Images to enable, everything stopped after the code of options_images.php. I have no buy button, I have no right column and no footer.

 

And also the attributes without images aren't shown anymore. That's the biggest problem: I have attributes WITHOUT images and want to have attributes WITH images, but it seems the script isn't wokring with both at the same time.

 

I've tried everything, including looking through the layout of the page (I thought that was the problem of not showing the button and right column) but nothing seems to be working fine.

 

Is there anybody who can solve this problem for me? I'm working with the latest version 1.7.1

 

I've figured out that the old version 1.6.3 is working (it's showing a pulldown menu with the attributes, but no images), but that's not working with images good.

 

Kind regards,

 

Marcus A. Kaptein

Share this post


Link to post
Share on other sites
Good News for anyone using STS Template System and want to add this contribution on their store.

 

After installing the latest version of Options As Images , the admin was working perfectly and images were being added to attributes but the actual product page would not work at all. I realised there was a conflict between this contribution and STS.

 

I have got this contribution to work with STS now perfectly and I am currently putting the contribution together to upload in the next couple of days. The installation takes less than 3 minutes and if you already have this installed then only a few files need changing else if you are intalling it as a new contribution then follow the instructions with the package.

 

Please PM me if you want to know my progress and also let me know problems you are having with STS and this contribution.

 

Thanks

 

I just came across this support thread and noticed the pleas to get this add-on to work with STS.

 

There is NO SPECIAL MODIFICATIONS NEEDED! STS will work perfectly with this add-on from the get go.

 

However, if you are wanting to take advantage of the more advanced features of STS such as the Product_info Content Templates, then you will need to know some PHP to create your extra variables to use in your template (just as you would anyother add-on that makes changes to the original product_info.php and you want to use content templates).


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×