Nick-Nick Posted July 2, 2007 Share Posted July 2, 2007 Hi, Thank you for your support, but I did not resolve the problem yet. It is the tep_redirect-function in general.php and the tep_db_fetch_array-function in database.php. But I did not make any changes to this functions. The error occurs only in the availability-contibution. The configurer does not work how it should too: The action-path is not added to the URL itsself, it works only if I add the path to the URL manually. So I think I have to search in the contribution-files, but where? Best regards Nick Quote Link to comment Share on other sites More sharing options...
surfalot Posted July 3, 2007 Author Share Posted July 3, 2007 Hi, Thank you for your support, but I did not resolve the problem yet. It is the tep_redirect-function in general.php and the tep_db_fetch_array-function in database.php. But I did not make any changes to this functions. The error occurs only in the availability-contibution. The configurer does not work how it should too: The action-path is not added to the URL itsself, it works only if I add the path to the URL manually. So I think I have to search in the contribution-files, but where? Best regards Nick what do you mean by the configurer does not work how is should? do you see this in the configurer? Checking Configuration Status Your database is up to date. Checking for Tables... Table "availability" found. Checking for Columns... Column "availability_id_in_stock" found in Table "products". Column "availability_id_out_of_stock" found in Table "products". have you added the "TABLE_AVAILABILITY" define to your admin/includes/database_tables.php ?? Quote Link to comment Share on other sites More sharing options...
Nick-Nick Posted July 5, 2007 Share Posted July 5, 2007 what do you mean by the configurer does not work how is should? I mean, if I select one of the checkboxes and klick "Run Configuration Utility" the page reloades but nothing else happens. The configuration works only if I add the "?action="-path manually to the URL. do you see this in the configurer? Yes, i do have you added the "TABLE_AVAILABILITY" define to your admin/includes/database_tables.php ?? Yes I have now installed it on a fresh osCommerce-Installation (by copying all files) and the problem still appears! :( Nick Quote Link to comment Share on other sites More sharing options...
surfalot Posted July 6, 2007 Author Share Posted July 6, 2007 I mean, if I select one of the checkboxes and klick "Run Configuration Utility" the page reloades but nothing else happens. The configuration works only if I add the "?action="-path manually to the URL. I have now installed it on a fresh osCommerce-Installation (by copying all files) and the problem still appears! :( Nick don't see how that configurer problem could happen unless you don't have a radio button selected when submitting. can you post the code from that form? from the configurer, view source of the configurer main page, find <td class="infoBoxContent"><form name="process" action= copy from there to the end form tag </form> the error may be a bug in the code. try this... open: /catalog/admin/availability_options.php find: if ($HTTP_POST_VARS['availability_id'] == 'new') { $availability_query = tep_db_query("select max(availability_id) as avail_id from " . TABLE_AVAILABILITY . ""); } $availability = tep_db_fetch_array($availability_query); replace with: if ($HTTP_POST_VARS['availability_id'] == 'new') { $availability_query = tep_db_query("select max(availability_id) as avail_id from " . TABLE_AVAILABILITY . ""); $availability = tep_db_fetch_array($availability_query); } does that fix your problem? Quote Link to comment Share on other sites More sharing options...
Nick-Nick Posted July 7, 2007 Share Posted July 7, 2007 Hi Todd, can you post the code from that form? This is my code: <td class="infoBoxContent"><form name="process" action="http://localhost:8888/oscommerce/catalog/backstage/availability_configurer.php" method="get" enctype="multipart/form-data" onsubmit="if(this.action[2].checked==true){if(confirm('This will remove all configuration and data items. Are you sure you wish to do this?')){return confirm('Are you ABSOLUTELY SURE you wish to remove all data related to this contribution installation ???');}else{return false;}}"><p>Choose the setup option and click Run Configuration Utility to setup your database.</p><br> <font color=red><b>Please, please <a href="backup.php"><u>backup your database</u></a> before performing this operation.</b></font><br><br><br> <input type="radio" name="action" value="normal" checked id="normal"><label for="normal" style="cursor:hand;cursor:pointer;">Normal Update</label><br> <input type="radio" name="action" value="force" id="force"><label for="force" style="cursor:hand;cursor:pointer;">Force Configuration Defaults</label><br><br> <input type="radio" name="action" value="uninstall" id="uninstall"><label for="uninstall" style="cursor:hand;cursor:pointer;color:#FF0000;">Remove All</label><br><br> <br> <input type="submit" name="submit" value="Run Configuration Utility"><br><br><br> <a href="http://localhost:8888/oscommerce/catalog/backstage/availability_options.php"><img src="includes/languages/german/images/buttons/button_cancel.gif" border="0" alt="Abbruch" title=" Abbruch "></a><br> <br> </form></td> the error may be a bug in the code. try this... open: /catalog/admin/availability_options.php find: if ($HTTP_POST_VARS['availability_id'] == 'new') { $availability_query = tep_db_query("select max(availability_id) as avail_id from " . TABLE_AVAILABILITY . ""); } $availability = tep_db_fetch_array($availability_query); replace with: if ($HTTP_POST_VARS['availability_id'] == 'new') { $availability_query = tep_db_query("select max(availability_id) as avail_id from " . TABLE_AVAILABILITY . ""); $availability = tep_db_fetch_array($availability_query); } does that fix your problem? Yes it did! Great! Thank you very much. :D :D Nick Quote Link to comment Share on other sites More sharing options...
sarabvi Posted July 10, 2007 Share Posted July 10, 2007 A very good contribution no doubt in it. But i am having problem when i try to update the availablity message in the product. It says Warning: No file uploaded. at the top of the page in admin area. Any idea how can i fix this. Quote Link to comment Share on other sites More sharing options...
surfalot Posted July 10, 2007 Author Share Posted July 10, 2007 A very good contribution no doubt in it. But i am having problem when i try to update the availablity message in the product. It says at the top of the page in admin area. Any idea how can i fix this. that will happen any time you insert or update a product and not upload an image. Quote Link to comment Share on other sites More sharing options...
sarabvi Posted July 10, 2007 Share Posted July 10, 2007 that will happen any time you insert or update a product and not upload an image. The point actualy i was asking is, when i try to change the availability message it won't change in cataloge. Only first message "%s in Stock" appears doesn't matter if you change it to something else in admin panel. I even tried to add a new product and and change the availablity message but it still show 5 in Stock. Any help how to fix this please? Quote Link to comment Share on other sites More sharing options...
surfalot Posted July 10, 2007 Author Share Posted July 10, 2007 The point actualy i was asking is, when i try to change the availability message it won't change in cataloge. Only first message "%s in Stock" appears doesn't matter if you change it to something else in admin panel. I even tried to add a new product and and change the availablity message but it still show 5 in Stock. Any help how to fix this please? If you change the availability message for a product, save it (through the edit page and preview page), then return to the product edit page, does the message update on the edit page availability dropdown selector? If you added all 5 code segments in admin/categories.php, it should reflect the new setting on the product edit page. most likely you missed the addition to your admin/categories.php page at line 216 (your line numbers may vary). Quote Link to comment Share on other sites More sharing options...
sarabvi Posted July 10, 2007 Share Posted July 10, 2007 If you change the availability message for a product, save it (through the edit page and preview page), then return to the product edit page, does the message update on the edit page availability dropdown selector? If you added all 5 code segments in admin/categories.php, it should reflect the new setting on the product edit page. most likely you missed the addition to your admin/categories.php page at line 216 (your line numbers may vary). Every thing is working now thanks mate. :thumbsup: Quote Link to comment Share on other sites More sharing options...
Guest Posted July 12, 2007 Share Posted July 12, 2007 Hi great contribution i installed it and it works nice, but i have one request. Is it possible to get it to display fx. The Availability date i entered in admin on a pre-order and automaticly grab the date i entered. I sell DVDs and i have alot of coming attractions and i would like this fx "Zero stock Availability Message: " Delivery Date 25-08-2007 on releasedate." If it could work with a variable like the %s for stock. Thanks again for a great contribution, hope someone can help me out Thx in advance Thomas Quote Link to comment Share on other sites More sharing options...
surfalot Posted July 13, 2007 Author Share Posted July 13, 2007 Hi great contribution i installed it and it works nice, but i have one request. Is it possible to get it to display fx. The Availability date i entered in admin on a pre-order and automaticly grab the date i entered. I sell DVDs and i have alot of coming attractions and i would like this fx "Zero stock Availability Message: " Delivery Date 25-08-2007 on releasedate." If it could work with a variable like the %s for stock. Thanks again for a great contribution, hope someone can help me out Thx in advance Thomas why not use the date available functionality already built into the osCommerce system? the availability statement could simply say Awaiting Release, followed by the statement from the date available function. Quote Link to comment Share on other sites More sharing options...
rentz1980 Posted July 14, 2007 Share Posted July 14, 2007 Hello, Thanks for your contribution, it´s a must have in any e-commerce. I got a problem to make it work. I think all is ok in the admin, (i can add news availabilites options, choose my text to display in the product_info in admin too), but when i go to the my customer site, i can only see "Availability:" but i cant see the text or the quantity available. I add some options for the spanish language, (it´s an spanish site), but nothing happens. Do you know what i did wrong ? Maybe i got the wrong options in admin/cofiguration/stock ? Regards, tony. Quote Link to comment Share on other sites More sharing options...
fichtelzwerg Posted July 18, 2007 Share Posted July 18, 2007 hi im having a similar problem as the other guy. i have setup everything and without problems. then i tried to insert a new option for another language. i get this when i hit insert: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /srv/www/htdocs/web35/html/shoptest/catalog/admin/includes/functions/database.php on line 99 Warning: Cannot modify header information - headers already sent by (output started at /srv/www/htdocs/web35/html/shoptest/catalog/admin/includes/functions/database.php:99) in /srv/www/htdocs/web35/html/shoptest/catalog/admin/includes/functions/general.php on line 22 when i hit the back button or reload the options page the new entry appears and looks the way it should. now when i go into my shop it works in english perfectly... example: Availability: 2 in stock. when i change the language its faulty... example: TABLE_HEADING_AVAILABILITY 2 vorrätig (whereas "vorrätig" means "in stock") so what did i do wrong probably just one little tiny character to change/add/subtract i suppose, but i'm relatively new to php and wasnt able to find it. i also tried to change the updated codepart you posted but that didnt help either :( help would be greatly appreciated thanks in advance jan Quote Link to comment Share on other sites More sharing options...
fichtelzwerg Posted July 19, 2007 Share Posted July 19, 2007 back with an update: ok now i got the TABLE_HEADING_AVAILABILITY part fixed by adding the lines in the german file manually. still i get the error Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /srv/www/htdocs/web35/html/shoptest/catalog/admin/includes/functions/database.php on line 99 Warning: Cannot modify header information - headers already sent by (output started at /srv/www/htdocs/web35/html/shoptest/catalog/admin/includes/functions/database.php:99) in /srv/www/htdocs/web35/html/shoptest/catalog/admin/includes/functions/general.php on line 22 when i insert a new option. i think i didnt change anything in those two files though. it seems to work fine anyway but i am always curious when mistakes occur. any ideas? thanks in advance and congrats on this nice and handy contribution btw...two thumbs up! cheers jan Quote Link to comment Share on other sites More sharing options...
surfalot Posted July 31, 2007 Author Share Posted July 31, 2007 back with an update: ok now i got the TABLE_HEADING_AVAILABILITY part fixed by adding the lines in the german file manually. still i get the error Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /srv/www/htdocs/web35/html/shoptest/catalog/admin/includes/functions/database.php on line 99 Warning: Cannot modify header information - headers already sent by (output started at /srv/www/htdocs/web35/html/shoptest/catalog/admin/includes/functions/database.php:99) in /srv/www/htdocs/web35/html/shoptest/catalog/admin/includes/functions/general.php on line 22 when i insert a new option. i think i didnt change anything in those two files though. it seems to work fine anyway but i am always curious when mistakes occur. any ideas? thanks in advance and congrats on this nice and handy contribution btw...two thumbs up! cheers jan did you see post 29 above? have you applied that fix yet? Quote Link to comment Share on other sites More sharing options...
surfalot Posted July 31, 2007 Author Share Posted July 31, 2007 now when i go into my shop it works in english perfectly...example: Availability: 2 in stock. when i change the language its faulty... example: TABLE_HEADING_AVAILABILITY 2 vorrätig (whereas "vorrätig" means "in stock") yes, when doing changes to language files, don't forget to add the translations to all the other languages you use. ;) Quote Link to comment Share on other sites More sharing options...
surfalot Posted July 31, 2007 Author Share Posted July 31, 2007 Hello, Thanks for your contribution, it´s a must have in any e-commerce. I got a problem to make it work. I think all is ok in the admin, (i can add news availabilites options, choose my text to display in the product_info in admin too), but when i go to the my customer site, i can only see "Availability:" but i cant see the text or the quantity available. I add some options for the spanish language, (it´s an spanish site), but nothing happens. Do you know what i did wrong ? Maybe i got the wrong options in admin/cofiguration/stock ? Regards, tony. sorry, I don't have a clue from what you have posted here. I would have to see/know more. Quote Link to comment Share on other sites More sharing options...
WatchPart Posted August 6, 2007 Share Posted August 6, 2007 Fantastic Contribution.... How would i make the text stand out more i.e. bold? Quote Link to comment Share on other sites More sharing options...
surfalot Posted August 11, 2007 Author Share Posted August 11, 2007 Fantastic Contribution.... How would i make the text stand out more i.e. bold? on the product page? find this in product_info.php if ($prod_quantity < 1) { echo "<p>".TABLE_HEADING_AVAILABILITY." ".sprintf($availability_array[$product_info['availability_id_out_of_stock']],$product_info['products_quantity'])."</p>"; } else { echo "<p>".TABLE_HEADING_AVAILABILITY." ".sprintf($availability_array[$product_info['availability_id_in_stock']],$product_info['products_quantity'])."</p>"; } change to if ($prod_quantity < 1) { echo "<p><b>".TABLE_HEADING_AVAILABILITY." ".sprintf($availability_array[$product_info['availability_id_out_of_stock']],$product_info['products_quantity'])."</b></p>"; } else { echo "<p><b>".TABLE_HEADING_AVAILABILITY." ".sprintf($availability_array[$product_info['availability_id_in_stock']],$product_info['products_quantity'])."</b></p>"; } Quote Link to comment Share on other sites More sharing options...
Get-Wireless 2 Posted August 30, 2007 Share Posted August 30, 2007 Hi Surfalot, I have installed this contrib and every thing went fine until I went to a product in the admin side to to set an availabilty option to a product. I get the following error message. // BOF: Availability $availability_query = tep_db_query("select * from availability where language_id = '" . $languages_id . "'"); $availability_array = array(); while ($availability_tmp = tep_db_fetch_array($availability_query)) { $availability_array[] = array( 'id' => $availability_tmp['availability_id'], 'text' => $availability_tmp['availability_name']); } echo ' ' . tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . 'One or more Availability Message: ' . tep_draw_pull_down_menu('availability_id_in_stock', $availability_array, (!empty($pInfo->availability_id_in_stock)?$pInfo->availability_id_in_stock:1)) . ' '.TEXT_MANAGE_AVAIL_OPTIONS.'' . ' ' . tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . 'Zero stock Availability Message: ' . tep_draw_pull_down_menu('availability_id_out_of_stock', $availability_array, (!empty($pInfo->availability_id_out_of_stock)?$pInfo->availability_id_out_of_stock:2)) . ' '.TEXT_MANAGE_AVAIL_OPTIONS.''; // EOF: Availability I have been over the admin\catagories.php file several times to make the changes. There are 5 changes in that file that I can see. However I do have other contribs installed like more pics 6.2 I think I successfuly merged your additions into my admin\catagories.php If I upload your version of admin\catagories.php from the files to compare folder then it works fine but kills off some of my other contribs Here are my lines in admin\catagories.php Line 227 $sql_data_array = array('products_quantity' => tep_db_prepare_input($HTTP_POST_VARS['products_quantity']), // BOF: Availability 'availability_id_in_stock' => tep_db_prepare_input($HTTP_POST_VARS['availability_id_in_stock']), 'availability_id_out_of_stock' => tep_db_prepare_input($HTTP_POST_VARS['availability_id_out_of_stock']), // EOF: Availability 'products_model' => tep_db_prepare_input($HTTP_POST_VARS['products_model']), Line 394 // BOF: More Pics 6 Added: , products_subimage1, products_subimage2, products_subimage3, products_subimage4, products_subimage5, products_subimage6 -AND- , '" . tep_db_input($product['products_subimage1']) . "', '" . tep_db_input($product['products_subimage2']) . "', '" . tep_db_input($product['products_subimage3']) . "', '" . tep_db_input($product['products_subimage4']) . "', '" . tep_db_input($product['products_subimage5']) . "', '" . tep_db_input($product['products_subimage6']) . "' // BOF: Availability: Added: , availability_id_in_stock, availability_id_out_of_stock --and-- , '" . tep_db_input($product['availability_id_in_stock']) . "', '" . tep_db_input($product['availability_id_out_of_stock']) . "' tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, availability_id_in_stock, availability_id_out_of_stock, products_model, products_image, products_subimage1, products_subimage2, products_subimage3, products_subimage4, products_subimage5, products_subimage6, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['availability_id_in_stock']) . "', '" . tep_db_input($product['availability_id_out_of_stock']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_subimage1']) . "', '" . tep_db_input($product['products_subimage2']) . "', '" . tep_db_input($product['products_subimage3']) . "', '" . tep_db_input($product['products_subimage4']) . "', '" . tep_db_input($product['products_subimage5']) . "', '" . tep_db_input($product['products_subimage6']) . "', '" . tep_db_input($product['products_price']) . "', now(), '" . tep_db_input($product['products_date_available']) . "', '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')"); // EOF: More Pics 6 // EOF: Availability $dup_products_id = tep_db_insert_id(); Line 550 'products_date_available' => '', // BOF: Availability 'availability_id_in_stock' => '', 'availability_id_out_of_stock' => '', // EOF: Availability 'products_status' => '', Line 564 // +Randelia Custom_META_Tags_Per_Item // BOF: Availability: Added: , p.availability_id_in_stock, p.availability_id_out_of_stock $product_query = tep_db_query("select pd.products_name, pd.products_description, p.availability_id_in_stock, p.availability_id_out_of_stock, pd.products_url, pd.products_keywords, pd.products_metadescription, pd.products_pagetitle, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_subimage1, p.products_subimage2, p.products_subimage3, p.products_subimage4, p.products_subimage5, p.products_subimage6, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'"); // EOF: More Pics 6 // EOF: Availability // -Randelia Custom_META_Tags_Per_Item Line 807 <td class="main"><?php echo TEXT_PRODUCTS_QUANTITY; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_quantity', $pInfo->products_quantity); ?></td> // BOF: Availability $availability_query = tep_db_query("select * from availability where language_id = '" . $languages_id . "'"); $availability_array = array(); while ($availability_tmp = tep_db_fetch_array($availability_query)) { $availability_array[] = array( 'id' => $availability_tmp['availability_id'], 'text' => $availability_tmp['availability_name']); } echo '<br>' . tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . 'One or more Availability Message: ' . tep_draw_pull_down_menu('availability_id_in_stock', $availability_array, (!empty($pInfo->availability_id_in_stock)?$pInfo->availability_id_in_stock:1)) . ' <a href="' . tep_href_link(FILENAME_AVAILABILITY_OPTIONS) . '">'.TEXT_MANAGE_AVAIL_OPTIONS.'</a>' . '<br>' . tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . 'Zero stock Availability Message: ' . tep_draw_pull_down_menu('availability_id_out_of_stock', $availability_array, (!empty($pInfo->availability_id_out_of_stock)?$pInfo->availability_id_out_of_stock:2)) . ' <a href="' . tep_href_link(FILENAME_AVAILABILITY_OPTIONS) . '">'.TEXT_MANAGE_AVAIL_OPTIONS.'</a>'; // EOF: Availability </tr> <tr> In the above, on the lines after your // EOF: Availability you have ?></td> whereas my file doesnt have that I would appreciate any help you can offer to remedy this. Regards Shaun Quote Contributions installed so far Discount Coupon Codes Ultimate SEO Urls Star Product Product Description Header template Modern design Search box Add to favorites Discount Plus All Manufacturers Loginbox Best Lightbox V2 Optional Related Products Plus Many more Link to comment Share on other sites More sharing options...
surfalot Posted August 31, 2007 Author Share Posted August 31, 2007 (edited) Hi Surfalot, I have installed this contrib and every thing went fine until I went to a product in the admin side to to set an availabilty option to a product. I get the following error message. // BOF: Availability $availability_query = tep_db_query("select * from availability where language_id = '" . $languages_id . "'"); $availability_array = array(); while ($availability_tmp = tep_db_fetch_array($availability_query)) { $availability_array[] = array( 'id' => $availability_tmp['availability_id'], 'text' => $availability_tmp['availability_name']); } echo ' ' . tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . 'One or more Availability Message: ' . tep_draw_pull_down_menu('availability_id_in_stock', $availability_array, (!empty($pInfo->availability_id_in_stock)?$pInfo->availability_id_in_stock:1)) . ' '.TEXT_MANAGE_AVAIL_OPTIONS.'' . ' ' . tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . 'Zero stock Availability Message: ' . tep_draw_pull_down_menu('availability_id_out_of_stock', $availability_array, (!empty($pInfo->availability_id_out_of_stock)?$pInfo->availability_id_out_of_stock:2)) . ' '.TEXT_MANAGE_AVAIL_OPTIONS.''; // EOF: Availability I have been over the admin\catagories.php file several times to make the changes. There are 5 changes in that file that I can see. However I do have other contribs installed like more pics 6.2 I think I successfuly merged your additions into my admin\catagories.php If I upload your version of admin\catagories.php from the files to compare folder then it works fine but kills off some of my other contribs Here are my lines in admin\catagories.php Line 227 $sql_data_array = array('products_quantity' => tep_db_prepare_input($HTTP_POST_VARS['products_quantity']), // BOF: Availability 'availability_id_in_stock' => tep_db_prepare_input($HTTP_POST_VARS['availability_id_in_stock']), 'availability_id_out_of_stock' => tep_db_prepare_input($HTTP_POST_VARS['availability_id_out_of_stock']), // EOF: Availability 'products_model' => tep_db_prepare_input($HTTP_POST_VARS['products_model']), Line 394 // BOF: More Pics 6 Added: , products_subimage1, products_subimage2, products_subimage3, products_subimage4, products_subimage5, products_subimage6 -AND- , '" . tep_db_input($product['products_subimage1']) . "', '" . tep_db_input($product['products_subimage2']) . "', '" . tep_db_input($product['products_subimage3']) . "', '" . tep_db_input($product['products_subimage4']) . "', '" . tep_db_input($product['products_subimage5']) . "', '" . tep_db_input($product['products_subimage6']) . "' // BOF: Availability: Added: , availability_id_in_stock, availability_id_out_of_stock --and-- , '" . tep_db_input($product['availability_id_in_stock']) . "', '" . tep_db_input($product['availability_id_out_of_stock']) . "' tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, availability_id_in_stock, availability_id_out_of_stock, products_model, products_image, products_subimage1, products_subimage2, products_subimage3, products_subimage4, products_subimage5, products_subimage6, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['availability_id_in_stock']) . "', '" . tep_db_input($product['availability_id_out_of_stock']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_subimage1']) . "', '" . tep_db_input($product['products_subimage2']) . "', '" . tep_db_input($product['products_subimage3']) . "', '" . tep_db_input($product['products_subimage4']) . "', '" . tep_db_input($product['products_subimage5']) . "', '" . tep_db_input($product['products_subimage6']) . "', '" . tep_db_input($product['products_price']) . "', now(), '" . tep_db_input($product['products_date_available']) . "', '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')"); // EOF: More Pics 6 // EOF: Availability $dup_products_id = tep_db_insert_id(); Line 550 'products_date_available' => '', // BOF: Availability 'availability_id_in_stock' => '', 'availability_id_out_of_stock' => '', // EOF: Availability 'products_status' => '', Line 564 // +Randelia Custom_META_Tags_Per_Item // BOF: Availability: Added: , p.availability_id_in_stock, p.availability_id_out_of_stock $product_query = tep_db_query("select pd.products_name, pd.products_description, p.availability_id_in_stock, p.availability_id_out_of_stock, pd.products_url, pd.products_keywords, pd.products_metadescription, pd.products_pagetitle, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_subimage1, p.products_subimage2, p.products_subimage3, p.products_subimage4, p.products_subimage5, p.products_subimage6, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'"); // EOF: More Pics 6 // EOF: Availability // -Randelia Custom_META_Tags_Per_Item Line 807 <td class="main"><?php echo TEXT_PRODUCTS_QUANTITY; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_quantity', $pInfo->products_quantity); ?></td> // BOF: Availability $availability_query = tep_db_query("select * from availability where language_id = '" . $languages_id . "'"); $availability_array = array(); while ($availability_tmp = tep_db_fetch_array($availability_query)) { $availability_array[] = array( 'id' => $availability_tmp['availability_id'], 'text' => $availability_tmp['availability_name']); } echo '<br>' . tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . 'One or more Availability Message: ' . tep_draw_pull_down_menu('availability_id_in_stock', $availability_array, (!empty($pInfo->availability_id_in_stock)?$pInfo->availability_id_in_stock:1)) . ' <a href="' . tep_href_link(FILENAME_AVAILABILITY_OPTIONS) . '">'.TEXT_MANAGE_AVAIL_OPTIONS.'</a>' . '<br>' . tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . 'Zero stock Availability Message: ' . tep_draw_pull_down_menu('availability_id_out_of_stock', $availability_array, (!empty($pInfo->availability_id_out_of_stock)?$pInfo->availability_id_out_of_stock:2)) . ' <a href="' . tep_href_link(FILENAME_AVAILABILITY_OPTIONS) . '">'.TEXT_MANAGE_AVAIL_OPTIONS.'</a>'; // EOF: Availability </tr> <tr> In the above, on the lines after your // EOF: Availability you have ?></td> whereas my file doesnt have that I would appreciate any help you can offer to remedy this. Regards Shaun are you using a conpare tool like WinDiff? That isn't an error, that is part of the PHP code being displayed. Like you placed it in the wrong area of your file. That last code block should be <td class="main"><?php echo TEXT_PRODUCTS_QUANTITY; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_quantity', $pInfo->products_quantity); // BOF: Availability $availability_query = tep_db_query("select * from availability where language_id = '" . $languages_id . "'"); $availability_array = array(); while ($availability_tmp = tep_db_fetch_array($availability_query)) { $availability_array[] = array( 'id' => $availability_tmp['availability_id'], 'text' => $availability_tmp['availability_name']); } echo '<br>' . tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . 'One or more Availability Message: ' . tep_draw_pull_down_menu('availability_id_in_stock', $availability_array, (!empty($pInfo->availability_id_in_stock)?$pInfo->availability_id_in_stock:1)) . ' <a href="' . tep_href_link(FILENAME_AVAILABILITY_OPTIONS) . '">'.TEXT_MANAGE_AVAIL_OPTIONS.'</a>' . '<br>' . tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . 'Zero stock Availability Message: ' . tep_draw_pull_down_menu('availability_id_out_of_stock', $availability_array, (!empty($pInfo->availability_id_out_of_stock)?$pInfo->availability_id_out_of_stock:2)) . ' <a href="' . tep_href_link(FILENAME_AVAILABILITY_OPTIONS) . '">'.TEXT_MANAGE_AVAIL_OPTIONS.'</a>'; // EOF: Availability ?></td> </tr> <tr> as long as you merged your queries right, should be good. Edited August 31, 2007 by surfalot Quote Link to comment Share on other sites More sharing options...
Get-Wireless 2 Posted August 31, 2007 Share Posted August 31, 2007 Thanks Surfalot, I used ultra edit, to find ure //Bof Availability in the files to compare. The reason I did that and not look for differences because I have a lot of mods on my site and it would of taken me an age to sort what to change. It now seems to work in admin. But doesnt quite look right tho that just maybe me. Here is a screen shot and would appreciate your input on how it looks Quote Contributions installed so far Discount Coupon Codes Ultimate SEO Urls Star Product Product Description Header template Modern design Search box Add to favorites Discount Plus All Manufacturers Loginbox Best Lightbox V2 Optional Related Products Plus Many more Link to comment Share on other sites More sharing options...
surfalot Posted August 31, 2007 Author Share Posted August 31, 2007 Thanks Surfalot, I used ultra edit, to find ure //Bof Availability in the files to compare. The reason I did that and not look for differences because I have a lot of mods on my site and it would of taken me an age to sort what to change. It now seems to work in admin. But doesnt quite look right tho that just maybe me. Here is a screen shot and would appreciate your input on how it looks looks fine to me, what's wrong with that? Quote Link to comment Share on other sites More sharing options...
Get-Wireless 2 Posted August 31, 2007 Share Posted August 31, 2007 Nothing, I jus wasnt sure if the left side of drop down menu was supposed to be in line with the left side of the box for product quantity and product model. Just need to fix my remove image box but thats related to more mics so will post on that thread. Cheers bud ur a star :) Quote Contributions installed so far Discount Coupon Codes Ultimate SEO Urls Star Product Product Description Header template Modern design Search box Add to favorites Discount Plus All Manufacturers Loginbox Best Lightbox V2 Optional Related Products Plus Many more 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.