emceebee Posted November 24, 2009 Share Posted November 24, 2009 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 Quote Link to comment Share on other sites More sharing options...
bkellum Posted November 28, 2009 Share Posted November 28, 2009 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. Quote Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE Link to comment Share on other sites More sharing options...
mghay Posted December 29, 2009 Share Posted December 29, 2009 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 Quote Link to comment Share on other sites More sharing options...
maxemus Posted January 4, 2010 Share Posted January 4, 2010 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 Quote Link to comment Share on other sites More sharing options...
RusNN Posted January 11, 2010 Share Posted January 11, 2010 (edited) 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 January 11, 2010 by RusNN Quote Link to comment Share on other sites More sharing options...
wauziweb.de Posted January 23, 2010 Share Posted January 23, 2010 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 Quote Link to comment Share on other sites More sharing options...
wauziweb.de Posted January 24, 2010 Share Posted January 24, 2010 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! Quote Link to comment Share on other sites More sharing options...
rawaby88 Posted February 12, 2010 Share Posted February 12, 2010 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 Quote Link to comment Share on other sites More sharing options...
RusNN Posted February 12, 2010 Share Posted February 12, 2010 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 . "'"); rawaby88 1 Quote Link to comment Share on other sites More sharing options...
rawaby88 Posted February 13, 2010 Share Posted February 13, 2010 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 Quote Link to comment Share on other sites More sharing options...
lgayle Posted March 25, 2010 Share Posted March 25, 2010 (edited) Can someone please help me I am having problem with this error Warning: Division by zero in shop/catalog/options_images.php on line 66 and that line reads if ($count%OPTIONS_IMAGES_NUMBER_PER_ROW == 0) { Edited March 25, 2010 by lgayle Quote Link to comment Share on other sites More sharing options...
mvigil514 Posted April 23, 2010 Share Posted April 23, 2010 Hello All, I am using Options as Images v1.2. I have looked through the forums and have not been able to make this work. I am trying to change the sort order in the admin section to sort by products_options_values_name. Currently, we have many (500+) option values for one option and they are sorted by options_values_id. I have tried adding "order by products_options_values_name" at the end of $query2, but it does not seem to work. Maybe someone with more PHP/MySQL knowledge can figure this out. Below is the relevant section of code. I can post the entire file if needed. <td valign="top" width="75%"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_NAME; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_ID; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_IMAGE; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_IMAGE_NAME; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_DIMENSIONS; ?></td> </tr> <?php $query1 = tep_db_query("select * from " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " where products_options_id = '" . $options_id . "'" ); //First find all the products options values that belong to the selected product option while ($result1 = tep_db_fetch_array($query1)) { $products_options_values_id = $result1['products_options_values_id']; //Now pull their details from the database $query2 = tep_db_query ("select * from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where products_options_values_id = '" . $products_options_values_id . "' and language_id = '" .$language_id . "'"); while ($result2 = tep_db_fetch_array($query2)) { $products_options_values_name = $result2 ['products_options_values_name']; $products_options_values_id = $result2 ['products_options_values_id']; $products_options_values_thumbnail = $result2['products_options_values_thumbnail']; $products_options_values_dimensions = $result2['products_options_values_dimensions']; if ($HTTP_GET_VARS['cID'] == $products_options_values_id){ $selected_value['name'] = $products_options_values_name; $selected_value['id'] = $products_options_values_id; $selected_value['image'] = $products_options_values_thumbnail; $selected_value['dimensions'] = $products_options_values_dimensions; $selected_value['id'] = $products_options_values_id; } if ( (isset($selected_value['id'])) && ($products_options_values_id == $selected_value['id']) ) { echo ' <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . tep_href_link(FILENAME_OPTIONS_IMAGES, '&cID=' . $products_options_values_id . '&box_id=' . $options_id . '&action=edit') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . tep_href_link(FILENAME_OPTIONS_IMAGES, '&cID=' . $products_options_values_id . '&box_id=' . $options_id ) . '\'">' . "\n"; } ?> <td class="dataTableContent"><?php echo $products_options_values_name ?></td> <td class="dataTableContent"><?php echo $products_options_values_id ?></td> <td class="dataTableContent" align="center"><?php echo tep_image(DIR_WS_CATALOG_IMAGES . 'options/' . $products_options_values_thumbnail, $products_options_values_name, OPTIONS_IMAGES_WIDTH, OPTIONS_IMAGES_HEIGHT) ?></td> <td class="dataTableContent"><?php echo $products_options_values_thumbnail ?></td> <td class="dataTableContent"><?php echo $products_options_values_dimensions ?></td> </tr> <?php } } ?> Thanks in advance for any consideration. Michael Quote Link to comment Share on other sites More sharing options...
pilotdave Posted June 19, 2010 Share Posted June 19, 2010 Hello all, Great contribution! I have an oscommerce site in which a customer needs to be able to select an image for a few different options, and each image option will have many images to choose from (example: choosing an emblem for the product, selecting a font style for the product - shown as an image, etc.). I was wondering if there is a way to have the image options to select from on a pop-up page, instead of showing all of the image options on the product info page? That way a customer can click on an attribute and a pop-up page will appear with all of the image attributes with radio buttons - this will keep the product info page cleaner. Any advice is appreciated. Thanks! Quote Link to comment Share on other sites More sharing options...
powerdrive Posted November 9, 2010 Share Posted November 9, 2010 Great contribution. Is there a way to let customers select more than one option? In a way that they would go into the cart as multiple items, one for each option they selected? I'd very much appreciate any help, even if it's just to say it can't be done. Kind regards, Power Drive Quote Link to comment Share on other sites More sharing options...
98stratos Posted January 25, 2016 Share Posted January 25, 2016 I am looking for assistance with this contrib "Options as Images"......if there is anyone still alive on this 6 year old thread I am keeping my eyes on it..... thanks.... Quote Link to comment Share on other sites More sharing options...
♥14steve14 Posted April 7, 2017 Share Posted April 7, 2017 I have just uploaded a package that allows this addon to be used with the bootstrap gold version. To make it simpler to do I did have to remove a few features such as the number of images per row as that is now controlled by bootstrap on different devices, and also the pop up image as I never used it or saw the point of it. This greatly reduced the number of available tables that had to be changes thus simplifying the code. The admin side has been left alone apart from the removal of the un-needed sql code for the two options that were removed. The instructions have also been updated and are hopefully correct, as very little needed to be changed. What needs to be done next is to modularise the whole package and make it into a module once the base code has been updated for the product info page. Quote REMEMBER BACKUP, BACKUP AND BACKUP Link to comment Share on other sites More sharing options...
♥Tsimi Posted April 8, 2017 Share Posted April 8, 2017 @@14steve14 Do you have a screenshot as to how it would look on the product page? Quote Link to comment Share on other sites More sharing options...
♥14steve14 Posted April 9, 2017 Share Posted April 9, 2017 It looks pretty much like it did before. The way it is set up it has a maximum of 6 images across the screen on larger screens and goes down to two across screens on small screens. Screenshot below burt and Tsimi 2 Quote REMEMBER BACKUP, BACKUP AND BACKUP Link to comment Share on other sites More sharing options...
♥Tsimi Posted April 22, 2017 Share Posted April 22, 2017 (edited) @@14steve14 You might wanna check this new package out. Screenshot is inside the package. Edited April 22, 2017 by Tsimi Quote Link to comment Share on other sites More sharing options...
♥14steve14 Posted April 22, 2017 Share Posted April 22, 2017 @@Tsimi I will take a look, but by the looks of it, it uses a drop down menu which is what I was trying to avoid. My customers are not the brightest and when I had just a drop down menu I had so many complaints that they received the wrong items. Having to click below an image stopped the complaints. Still I may give it a go again. Quote REMEMBER BACKUP, BACKUP AND BACKUP Link to comment Share on other sites More sharing options...
♥Tsimi Posted August 5, 2018 Share Posted August 5, 2018 @14steve14 Hi Steve I had another look at this Options as Images and I was able to improve the install process. Now it can be installed without core code changes at all. I also changed the looks of it to more modern style as shown in many shop demos. Just color tiles without any text or radio buttons. Now you can click on the image to select it. It might not be what everyone likes or needs but it wouldn't be all too hard to change it back as it was or change the style to a more individual matching layout. Here the package: Options_as_Images BS v2.2.zip I might upload it to the apps section but it would need more testing to make sure all corners are covered so to speak. I don't have 54234234 images to see how it brakes to a new row so if you or anyone out there wants to give this a go and report back I'd appreciate it. yeno 1 Quote Link to comment Share on other sites More sharing options...
♥14steve14 Posted August 7, 2018 Share Posted August 7, 2018 @Tsimi I am getting a latest version store ready, so will give it a go when I get time and test it for you. Thanks for having a lok at this. Quote REMEMBER BACKUP, BACKUP AND BACKUP Link to comment Share on other sites More sharing options...
yeno Posted July 19, 2019 Share Posted July 19, 2019 Hi, @Tsimi the languages bug solved. catalog/admin/options_images.php fixed: (int)$languages_id instead of $language_id (lines 87, 122, 194) Deleted temporary line 12: $language_id = '1'; options_images.php Tsimi 1 Quote Link to comment Share on other sites More sharing options...
yeno Posted July 20, 2019 Share Posted July 20, 2019 @Tsimi some changes and improvements (Options_as_Images BS v2.2a) 1) Defined new constants (languages) Defined constants TEXT_SELECT_CATEGORY and TEXT_ENABLED_CATEGORIES catalog/admin/options_images.php changed lines 73-75, 194catalog/admin/includes/languages/options_images.php added: define ('TEXT_SELECT_CATEGORY', 'Select an option category to edit: '); define ('TEXT_ENABLED_CATEGORIES', 'You currently have Options as Images enabled for the following options categories: '); 2) The full width thumbnails area (col-sm-12) This change makes the page shorter if there is a lot of thumbnails. catalog/includes/modules/content/product_info/ cm_pi_options_images.php (line 82) find: $options_images_output .= '<div class="col-sm-9">'; replace with: $options_images_output .= '<div class="col-sm-12">'; 3) CSS - separation of content and design Inline styles removed. Added to the installation instruction. catalog/includes/modules/content/product_info/templates/tpl_cm_pi_options_images.php 4) <h4> caption hidden if not used catalog/includes/modules/content/product_info/templates/tpl_cm_pi_options_images.php find: <h4 class="h3"><?php echo MODULE_CONTENT_PI_OI_HEADING_TITLE; ?></h4> <?php echo $options_images_output; ?> replace with: <?php if(defined(MODULE_CONTENT_PI_OI_HEADING_TITLE)) { echo' <h4 class="h3">' . MODULE_CONTENT_PI_OI_HEADING_TITLE .'</h4>'. PHP_EOL; } echo $options_images_output; ?> 5) Zoom Just CSS, other files are not affected. /* Options as images BOF */ /* Remove input from document flow */ label > input{ position: absolute; } /* IMAGE STYLES */ label > input + img { cursor: pointer; border: 2px solid transparent; } label > input + img:hover { -webkit-box-shadow: 1px 1px 5px 3px rgba(0,0,0,0.75); -moz-box-shadow: 1px 1px 5px 3px rgba(0,0,0,0.75); box-shadow: 1px 1px 5px 3px rgba(0,0,0,0.75); border: none; } /* (RADIO CHECKED) IMAGE STYLES */ label > input:checked + img { border: 2px solid #00d502; } /* ZOOM */ .cm-pi-options-images label:not(.control-label) { padding: 0px; transition: transform .33s; margin: 0 auto; max-width: 50vw; } .cm-pi-options-images label:not(.control-label):hover { z-index: 9; transform: scale(2.5); max-width: 100%; /* (Note: if the zoom is too large, it will go outside of the viewport) */ /* Maximum zoom scale should by 2.5 to be able to click the next thumbnail */ } /* Options as images block */ .cm-pi-options-images { margin-top: 0rem; margin-bottom: 5rem; } /* Options as images caption */ .cm-pi-options-images h4, .cm-pi-options-images h4.h3 { /* .h3 is not need but because of compatibility with older versions */ font-size: 110%; } /* Options labels */ .cm-pi-options-images .control-label { margin-top: 1rem; } /* Options as images EOF */ ToDo 1. Full width thumbnails without zoom for mobile devices 2. Bootstrap 4 form class="was-validated" to mark labels (products_options_name) of empty options which are required. May need to change the file catalog/product_info.php - add class to the form on line 46 (BS Frozen) Options_as_Images_BS_v2.2a.zip Quote Link to comment Share on other sites More sharing options...
yeno Posted July 26, 2019 Share Posted July 26, 2019 Options as images GitHub Repository (since @Tsimi modular version 2.2) https://github.com/yenoyen/oscommerce-Options-as-images cupidare 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.