RichSM Posted July 4, 2009 Posted July 4, 2009 Nope. That's not ok... :D That great contribution isn't too hard to merge. You missed one line: You need to change your $cart->add_cart() (Where QPBPP changes are also made) FROM: $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id'])) + $HTTP_POST_VARS['cart_quantity'], $HTTP_POST_VARS['id']); TO: $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $real_ids))+$HTTP_POST_VARS['cart_quantity'], $real_ids); That should do it... (Explanation: $HTTP_POST_VARS['id'] contains the attributes array, which is replaced by $real_ids so that the uploads can be added to this array) This is because the Upload (and Text) option VALUES are input by the customer! (The value is the given text, or the file) You just need the Options for Text, Textarea and Uploads. (However, the Option-Value "0 - CUSTOMER-INPUT" has to be set! (Should be done automatically)) Nice one Zappo! What I have done since your last suggestion was to go back and strip the case 'add_product' of other contributions. Just left it with your code as it was and it worked! Now, uploaded files are correctly displayed in the Cart and with the eye link. Thanks for the lead! I will go and make your suggested changes and see how it goes. Many many thank Zappo! Rich Quote
Guest Posted July 5, 2009 Posted July 5, 2009 Problem with Previous files if using more than one upload field 2nd drop down list is doubled. I am using the original code supplied with contribution, Anyone know how to correct this? Quote
Zappo Posted July 6, 2009 Author Posted July 6, 2009 (edited) Problem with Previous files if using more than one upload field2nd drop down list is doubled. I forgot to add a line (resetting the dropdown)... Here's what to do: in catalog/includes/modules/option_types.php FIND: //BOF - Zappo - Option Types v2 - Added dropdown with previously uploaded files (around line 110) beneath it ADD: if ($old_uploads == true) unset($uploaded_array); That should to the trick! (This will of course be added to the next OptionTypes release) Edited July 6, 2009 by Zappo Quote Like Eek said... It never hurts to help!----------------------------------------
Guest Posted July 6, 2009 Posted July 6, 2009 I forgot to add a line (resetting the dropdown)... Here's what to do: in catalog/includes/modules/option_types.php FIND: //BOF - Zappo - Option Types v2 - Added dropdown with previously uploaded files (around line 110) beneath it ADD: if ($old_uploads == true) unset($uploaded_array); That should to the trick! (This will of course be added to the next OptionTypes release) Thanks for your quick response and this contribution. Your fix above works like a charm Thanks again Quote
RichSM Posted July 6, 2009 Posted July 6, 2009 Nope. That's not ok... :D That great contribution isn't too hard to merge. You missed one line: You need to change your $cart->add_cart() (Where QPBPP changes are also made) FROM: $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id'])) + $HTTP_POST_VARS['cart_quantity'], $HTTP_POST_VARS['id']); TO: $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $real_ids))+$HTTP_POST_VARS['cart_quantity'], $real_ids); That should do it... (Explanation: $HTTP_POST_VARS['id'] contains the attributes array, which is replaced by $real_ids so that the uploads can be added to this array) This is because the Upload (and Text) option VALUES are input by the customer! (The value is the given text, or the file) You just need the Options for Text, Textarea and Uploads. (However, the Option-Value "0 - CUSTOMER-INPUT" has to be set! (Should be done automatically)) I applied the change and it worked beautifully! Further up this page, I read that you are working or planned on working on a new contribution "Products as Options" which will enable tracking product options as products. Sounds great. Myself and a lot more people than you can imagine will appreciate such a contribution, if you can pull it off. I can imagine it will be a great task. Zappo, once again Thanks. Quote
Zappo Posted July 6, 2009 Author Posted July 6, 2009 1 - I applied the change and it worked beautifully! 2 - I read that you are working or planned on working on a new contribution "Products as Options" 3 - Myself and a lot more people than you can imagine will appreciate such a contribution, if you can pull it off. I can imagine it will be a great task. 4 - Zappo, once again Thanks. 1 - Nice! I'll be using SPPC/QPBPP myself (When I'm done with the rest) 2 - I'm ALMOST done... Need some (ok... a lot of) cleaning up, and some kind of readme... Then I'll release it. 3 - Good to know it'll probably be appreciated! 4 - My pleasure. Quote Like Eek said... It never hurts to help!----------------------------------------
Guest Posted July 7, 2009 Posted July 7, 2009 This contribution is built on top of osCommerce 2.2rc2a.It is an update/upgrade/revision/compilation of the following contributions: * Option Type Feature v3 (Originally by Chandra Roukema) * Option Type File Feature v.8 (Originally by Matt Fletcher) * AJAX Attribute Manager v2.8.6 ((Almost unchanged) Originally by Sam West) * Improvements by me (AvanOsch aKa Zappo the Wizard of Osch) for http://shop.crystalcopy.nl Please post questions, comments, request, etc. right here! The Contribution Page can be found here: http://www.oscommerce.com/community/contributions,xxxx Hello, Is there a installation guide this contribution. I already have other contributions installed. Thanks Quote
Zappo Posted July 7, 2009 Author Posted July 7, 2009 Is there a installation guide this contribution. I already have other contributions installed. No, Sorry... You'll have to use a comparison software like kDiff3 to compare your installation with Option Types v2 (I really can't imagine merging contributions without file comparison!) All changes are very well commented throughout the files... Quote Like Eek said... It never hurts to help!----------------------------------------
Guest Posted July 7, 2009 Posted July 7, 2009 No, Sorry...You'll have to use a comparison software like kDiff3 to compare your installation with Option Types v2 (I really can't imagine merging contributions without file comparison!) All changes are very well commented throughout the files... ok, I did a drop on top installation for a clean install just to test it out. But I received an error when trying to create a new option... 1054 - Unknown column 'products_options_type' in 'field list' insert into products_options (products_options_id, products_options_name, language_id, products_options_type, products_options_length, products_options_comment, products_options_order) values ('6', 'blueshade', '1', '3', '1', 'this is a blueshade', '6') any clue where I went wrong? thanks Quote
Guest Posted July 7, 2009 Posted July 7, 2009 (edited) ok,I did a drop on top installation for a clean install just to test it out. But I received an error when trying to create a new option... 1054 - Unknown column 'products_options_type' in 'field list' insert into products_options (products_options_id, products_options_name, language_id, products_options_type, products_options_length, products_options_comment, products_options_order) values ('6', 'blueshade', '1', '3', '1', 'this is a blueshade', '6') any clue where I went wrong? thanks Zappo I believe I fixed it. The error and answer are pretty clear in that statment I posted. So I just created the columns. Nice contribution by the way, very cool. kenz Edited July 7, 2009 by kenz Quote
Guest Posted July 7, 2009 Posted July 7, 2009 Zappo I believe I fixed it. The error and answer are pretty clear in that statment I posted. So I just created the columns. Nice contribution by the way, very cool. kenz I received an error stating the function for TMP_DIR is missing because its needed on application_top.php on line 372. please help, thanks comass 1 Quote
Zappo Posted July 7, 2009 Author Posted July 7, 2009 I received an error stating the function for TMP_DIR is missing because its needed on application_top.php on line 372. 1- Did you run the SQL file included with the installation? 2- Did you copy the file catalog/includes/local/configure.php? 3- Check in application_top.php, Line 25, (Set the local configuration parameters) if includes/local/confige.php is included (Default = enabled) 4- Did you copy/create the folders images/temp and images/uploads? If all above are answered 'yes', I'll need more info on your problem... That should not occur... Quote Like Eek said... It never hurts to help!----------------------------------------
Guest Posted July 7, 2009 Posted July 7, 2009 1- Did you run the SQL file included with the installation?2- Did you copy the file catalog/includes/local/configure.php? 3- Check in application_top.php, Line 25, (Set the local configuration parameters) if includes/local/confige.php is included (Default = enabled) 4- Did you copy/create the folders images/temp and images/uploads? If all above are answered 'yes', I'll need more info on your problem... That should not occur... I did all the following except for number one - there is no SQL file in the package. if so, please explain where it is. I looked in multiple folders. thanks Quote
Zappo Posted July 7, 2009 Author Posted July 7, 2009 (edited) there is no SQL file in the package. Option Types v2 SQL.sql It's in the root of the zip file (when you open the zip, it's right there!) along with the index.html I don't see how you could miss it!! Run it (via phpMyAdmin), and you should be fine. It could be that because you manually added fields to the dB, the script will fail. Maybe it's best to remove those manual dB changes before running the sql... Edited July 7, 2009 by Zappo Quote Like Eek said... It never hurts to help!----------------------------------------
Guest Posted July 7, 2009 Posted July 7, 2009 Option Types v2 SQL.sqlIt's in the root of the zip file (when you open the zip, it's right there!) along with the index.html I don't see how you could miss it!! Run it (via phpMyAdmin), and you should be fine. It could be that because you manually added fields to the dB, the script will fail. Maybe it's best to remove those manual dB changes before running the sql... Zappo i see what you mean. but when you extract the pacakage with winzip onto a desktop, it only shows the following folders... admin includes images and the following files... checkout_confirmation.php product_info.php stylesheet.css account_history_info.php checkout_process.php shopping_cart.php I had to literately drag the sql file out of the winzip gui and drag it to my desktop -kenz Quote
Guest Posted July 7, 2009 Posted July 7, 2009 Zappo i see what you mean. but when you extract the pacakage with winzip onto a desktop, it only shows the following folders... admin includes images and the following files... checkout_confirmation.php product_info.php stylesheet.css account_history_info.php checkout_process.php shopping_cart.php I had to literately drag the sql file out of the winzip gui and drag it to my desktop -kenz I got it working - very nice contribution zappo. By any chance. do you know if this works with "Easy Populate & Products Attributes" contribution thanks again kenz Quote
Zappo Posted July 7, 2009 Author Posted July 7, 2009 I got it working - very nice contribution zappo. By any chance. do you know if this works with "Easy Populate & Products Attributes" contribution No idea, but as it seems to involve products attributes, it'll probably have to be merged in some files. Quote Like Eek said... It never hurts to help!----------------------------------------
Able Posted July 9, 2009 Posted July 9, 2009 No idea, but as it seems to involve products attributes, it'll probably have to be merged in some files. Hello Can Someone assist me with getting this addon to work, I'm getting all kinds of erro messages when trying to access my admin page since the upload. This is the Error messages: Warning: require(includes/classes/boxes.php) [function.require]: failed to open stream: No such file or directory in /home/sashalac/public_html/shop/admin/includes/application_top.php on line 316 Warning: require(includes/classes/boxes.php) [function.require]: failed to open stream: No such file or directory in /home/sashalac/public_html/shop/admin/includes/application_top.php on line 316 Fatal error: require() [function.require]: Failed opening required 'includes/classes/boxes.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/sashalac/public_html/shop/admin/includes/application_top.php on line 316 Help please I'm a newbie. Thanks in advance Able Quote
germ Posted July 9, 2009 Posted July 9, 2009 (edited) I'm guessing you copied your /catalog/includes/application_top.php into /admin/includes. They aren't interchangable. :blush: I have all v2 versions of osC and the admin uses /includes/classes/box.php on every one. Copy the correct application_top.php to your admin. Edited July 9, 2009 by germ Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
Guest Posted July 12, 2009 Posted July 12, 2009 Please post questions, comments, request, etc. right here! Is it possible for the previous uploaded files to have the names listed with radio buttons instead of a drop down select menu? I have tried but to no avail Thanks for any help in this. Quote
Zappo Posted July 13, 2009 Author Posted July 13, 2009 (edited) Is it possible for the previous uploaded files to have the names listed with radio buttons instead of a drop down select menu?I have tried but to no avail Thanks for any help in this. It is possible... I don't think it's very pretty, as when the customer uploads a lot of files, the list get's quite long... Anyway... Here goes... In the file catalog/includes/option_types.php Replace this: while ($uploaded_files = tep_db_fetch_array($uploaded_files_query)) { $uploaded_array[] = array('id' => $uploaded_files['files_uploaded_name'], 'text' => $uploaded_files['files_uploaded_name'] . ($tmp_html_price ? ' - ' . $tmp_html_price : '')); $old_uploads = true; } $tmp_html = '<input type="file" name="id[' . TEXT_PREFIX . $ProdOpt_ID . ']">' . // File field with new upload tep_draw_hidden_field(UPLOAD_PREFIX . $number_of_uploads, $ProdOpt_ID); // Hidden field with number of this upload (for this product) $tmp_html .= $tmp_html_price; if ($old_uploads == true) $tmp_html .= '<br>' . tep_draw_pull_down_menu(TEXT_PREFIX . UPLOAD_PREFIX . $number_of_uploads, $uploaded_array, $cart->contents[$HTTP_GET_VARS['products_id']]['attributes_values'][$ProdOpt_ID]); With this: $tmp_upl_html = '<table>'; while ($uploaded_files = tep_db_fetch_array($uploaded_files_query)) { if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes_values'][$ProdOpt_ID]) && ($uploaded_files['files_uploaded_name'] == $cart->contents[$HTTP_GET_VARS['products_id']]['attributes_values'][$ProdOpt_ID])) { $checked = true; } else { $checked = false; } $tmp_upl_html .= '<tr><td class="main">'; $tmp_upl_html .= tep_draw_radio_field(TEXT_PREFIX . UPLOAD_PREFIX . $number_of_uploads, $uploaded_files['files_uploaded_name'], $checked); $tmp_upl_html .= $uploaded_files['files_uploaded_name']; if ($products_options_array['options_values_price'] != '0') { $tmp_upl_html .= ' (' . $products_options_array['price_prefix'] . $currencies->display_price($products_options_array['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } $tmp_upl_html .= '</tr></td>'; $old_uploads = true; } $tmp_upl_html .= '</table>'; $tmp_html = '<input type="file" name="id[' . TEXT_PREFIX . $ProdOpt_ID . ']">' . // File field with new upload tep_draw_hidden_field(UPLOAD_PREFIX . $number_of_uploads, $ProdOpt_ID); // Hidden field with number of this upload (for this product) $tmp_html .= $tmp_html_price; if ($old_uploads == true) $tmp_html .= $tmp_upl_html; That should do the trick... Edited July 13, 2009 by Zappo Quote Like Eek said... It never hurts to help!----------------------------------------
thewebagency Posted July 13, 2009 Posted July 13, 2009 (edited) Is there any documentation for configuring the product attributes and setting up the user upload? I have a couple of issues with this... I had to install a contribution that hides the price which is to be determined by the amount selected in the attributes drop down, only whenever I add a quantity along with a price say + £11.0000 in the products attributes as shown in this screenshot... The drop downs on the actual shop still all show the price for each Quantity as zero still as in this screenshot. I have a feeling it's because of the contribution for hiding the price thats conflicting with it but it could also be because I am configuring it wrong. I also can't for the life of me get the user upload button to appear on the product description/checkout page, all I get instead is a drop down box with the words [uSER-INPUT] in it? It's a real shame because this is exactly what I need and I really need to get it all working properly and I am already 2 weeks behind on the project =/ Hope you can help me out and thanks in advance bud. Edited July 13, 2009 by thewebagency Quote
Zappo Posted July 13, 2009 Author Posted July 13, 2009 I have a feeling it's because of the contribution for hiding the price thats conflicting with it but it could also be because I am configuring it wrong.I also can't for the life of me get the user upload button to appear on the product description/checkout page, all I get instead is a drop down box with the words [uSER-INPUT] in it? I too have a feeling that both these problems are because of a conflict between contributions... Could you as a start show me the code from product_info.php, where the dropdowns are made? Can't troubleshoot without more info... Quote Like Eek said... It never hurts to help!----------------------------------------
thewebagency Posted July 13, 2009 Posted July 13, 2009 I too have a feeling that both these problems are because of a conflict between contributions...Could you as a start show me the code from product_info.php, where the dropdowns are made? Can't troubleshoot without more info... Full Code from product_info.php <?php /* $Id: product_info.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] Copyright © 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO); $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_check = tep_db_fetch_array($product_check_query); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> <script language="javascript"><!-- function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le ft=150') } //--></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <?php if ($product_check['total'] < 1) { ?> <tr> <td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php } else { $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_info = tep_db_fetch_array($product_info_query); tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } if (tep_not_null($product_info['products_model'])) { $products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>'; } else { $products_name = $product_info['products_name']; } ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading" valign="top"><?php echo $products_name; ?></td> <!-- start Remove Prices and buy now and add to cart if price = 0.00 V2 <td class="pageHeading" align="right" valign="top"><?php // echo $products_price; ?></td> --> <td class="pageHeading" align="right" valign="top"> <?php if ($product_info['products_price'] < 0.01){ } else { echo $products_price; } ?> </td> <!-- end Remove Prices and buy now and add to cart if price = 0.00 V2 --> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"> <?php if (tep_not_null($product_info['products_image'])) { ?> <table border="0" cellspacing="0" cellpadding="2" align="right"> <tr> <td align="center" class="smallText"> <script language="javascript"><!-- document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>'); //--></script> <noscript> <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> </noscript> </td> </tr> </table> <?php } ?> <p><?php echo stripslashes($product_info['products_description']); ?></p> <?php $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) { ?> <table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td> </tr> <?php $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name 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 . "' order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, 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 . "'"); while ($products_options = tep_db_fetch_array($products_options_query)) { $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']); if ($products_options['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } ?> <tr> <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 } ?> </td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); $reviews = tep_db_fetch_array($reviews_query); if ($reviews['count'] > 0) { ?> <tr> <td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if (tep_not_null($product_info['products_url'])) { ?> <tr> <td class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td> </tr> <?php } else { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td> </tr> <?php } ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td> <?php /* start Remove Prices and buy now and add to cart if price = 0.00 V2 <td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td> */ ?> <td class="main" align="right"><?php if ($product_info['products_price'] < 0.01){ //echo 'Please Phone To Buy'; echo 'Click Link Above to Buy'; } else { echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); } ?> </td> <?php // end Remove Prices and buy now and add to cart if price = 0.00 V2 ?> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td> <?php if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_also_purchased(3600); } else { include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); } } ?> </td> </tr> </table></form></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Quote
thewebagency Posted July 13, 2009 Posted July 13, 2009 (edited) I Have just checked and both plugins include a product_info.php file, obviously one has overwritten the other, if you could point me in the right direction as to what piece of your code I can inject into my current product_info.php file as I'm pretty much a noob when it comes to PHP I would be eternally gratefull, either that or if you could recommend a good app to compare the code of both files as I have a funny feeling there may be more files that need to be modded. Edit: Actually it looks like this is the only file that crosses over which is good news. Edited July 13, 2009 by thewebagency Quote
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.
Note: Your post will require moderator approval before it will be visible.