Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Options as images


  • You cannot reply to this topic
63 replies to this topic

#21 robyna

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

Posted 24 November 2008, 12:21

View Postrobyna, on Nov 24 2008, 08:58 AM, said:

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?

#22 Waiti

  • Community Member
  • 17 posts
  • Real Name:Alexandre Jedamzik

Posted 24 November 2008, 12:44

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

#23 Waiti

  • Community Member
  • 17 posts
  • Real Name:Alexandre Jedamzik

Posted 24 November 2008, 13:08

Quote

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

#24 maxemus

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

Posted 06 December 2008, 20:34

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?

#25 tjoppru

  • Community Member
  • 18 posts
  • Real Name:Traci

Posted 10 December 2008, 15:48

I cannot get any images to display. Do you need to install another contribution to get the pics to appear? If I turn off the Options as images then a dropdown box appears but when it is enabled nothing appears.

Thanks for your help

#26 tjoppru

  • Community Member
  • 18 posts
  • Real Name:Traci

Posted 10 December 2008, 16:21

Never mind I had missed uploading one of the files.

#27 hussein_787

  • Community Member
  • 15 posts
  • Real Name:Hussein
  • Gender:Male

Posted 11 December 2008, 16:16

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

#28 l0l0l0l

  • Community Member
  • 2 posts
  • Real Name:miguel

Posted 17 December 2008, 22:07

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

#29 lilpenny1316

  • Community Member
  • 8 posts
  • Real Name:SanHan

Posted 26 December 2008, 17:39

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, 26 December 2008, 17:40.


#30 muhammad_barki

  • Community Member
  • 50 posts
  • Real Name:Muhammad Barki

Posted 30 December 2008, 17:04

View Postlilpenny1316, on Dec 26 2008, 05:39 PM, said:

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?

#31 irismoxy

  • Community Member
  • 2 posts
  • Real Name:Iris Mo

Posted 08 February 2009, 07:53

View Postrobyna, on Nov 24 2008, 01:21 PM, said:

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

#32 volau

  • Community Member
  • 25 posts
  • Real Name:DP WIEBE

Posted 09 February 2009, 03:46

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.

#33 volau

  • Community Member
  • 25 posts
  • Real Name:DP WIEBE

Posted 09 February 2009, 05:15

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

#34 volau

  • Community Member
  • 25 posts
  • Real Name:DP WIEBE

Posted 09 February 2009, 05:50

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.

#35 volau

  • Community Member
  • 25 posts
  • Real Name:DP WIEBE

Posted 09 February 2009, 06:00

View Postvolau, on Feb 8 2009, 09:46 PM, said:

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.

#36 rusky

  • Community Member
  • 30 posts
  • Real Name:Akeem

Posted 25 February 2009, 18:57

...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'){


#37 Gooch

  • Community Member
  • 65 posts
  • Real Name:Chris

Posted 17 March 2009, 01:33

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, 17 March 2009, 01:34.


#38 worldclique

  • Community Member
  • 5 posts
  • Real Name:J Gonz

Posted 06 April 2009, 19:05

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, 06 April 2009, 19:18.


#39 marcusdesign

  • Community Member
  • 142 posts
  • Real Name:Marcus A. Kaptein
  • Gender:Male
  • Location:Netherlands

Posted 23 April 2009, 18:31

View Postlilpenny1316, on Dec 26 2008, 07:39 PM, said:

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

#40 bkellum

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

Posted 17 May 2009, 00:53

View Posthussein_787, on Dec 11 2008, 11:16 AM, said:

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