Jump to content

insomniac2

Members
  • Content count

    406
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by insomniac2

  1. raja9983 ... Sounds like your missing the password_funcs in the admin/includes/functions directory from the Admin Access Mod. You need to put the password_funcs.php in that directory so the path will look like this: admin/includes/functions/password_funcs.php The code inside the password_funcs.php file should be: <?php /* $Id: password_funcs.php,v 1.10 2003/02/11 01:31:02 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License Access with Level Account (v. 2.2a) for the Admin Area of osCommerce (MS2) This file may be deleted if disabling the above contribution */ //// // This function compares a plain text password with an encrpyted password function tep_validate_password($plain, $encrypted) { if (tep_not_null($plain) && tep_not_null($encrypted)) { // split apart the hash / salt $stack = explode(':', $encrypted); if (sizeof($stack) != 2) return false; if (md5($stack[1] . $plain) == $stack[0]) { return true; } } return false; } //// // This function makes a new encrypted password from a plain text password. function tep_encrypt_password($plain) { $password = ''; for ($i=0; $i<10; $i++) { $password .= tep_rand(); } $salt = substr(md5($password), 0, 2); $password = md5($salt . $plain) . ':' . $salt; return $password; } ?> Once you have done that your password validation error should go away .... then you can go from there and see what happens. Hope this helps.
  2. insomniac2

    How to change/ turn off rounding up of weight

    That has to be done in each specific shipping module you are using by adding custom code to the weight output. For example: catalog/includes/modules/shipping/zones.php by using the round function an example piece of the code would be: if ($shipping_weight != 1) { $shipping_method .= (round($shipping_weight, 2)) . ' ' . MODULE_SHIPPING_ZONES_TEXT_UNITS . 's'; } else { $shipping_method .= (round($shipping_weight, 2)) . ' ' . MODULE_SHIPPING_ZONES_TEXT_UNITS; } Essentially if the weight is not equal to 1 or less it will be a multiple so adds an s ie:lbs Or else it is singular and will display only lb It may be able to be done an easier way .. but this is how I did it by adding the code to each module. As you probably already know ... the new osCommerce will have a shipping weight class incorporated ... so you may want to wait for it's release before you go recoding a lot of stuff.
  3. Here is a redesigned Stock and Backorders system for your store. I've spent 2 days messing around to get it where it is. I think it's actually pretty cool. Would like you to try it and give me your input .. or add to it. Thanx. Contribution Link: http://www.oscommerce.com/community/contributions,3101
  4. insomniac2

    Product Documents

    Danitrin ... could you please send / message me your code. I will work off of your copy. Somethings serverly screwed in mine LOL. Thanks. Oh and P.S. Did you do the database modification? ... or are you using the original SQL.
  5. insomniac2

    Product Documents

    Glad to hear it works for you danitrin. I still have one issue I am trying to resolve. I have spent hours and can't figure it out LOL You know how the proper product now shows up with it's associated document right? Well now my associated documents choice list is not defaulting to the document that is currently associated to the product. It always opens with the same document .. sorta like in alphabetical order or something. Is yours doing this to? I am now trying to get the document that is associated to the product to show up instantly on the list .. but it's driving me nuts LOL please get back to me on this one. If your is working properly I would like to see your code to compare to mine. Thanx.
  6. Sorry took so long to reply to your question azer. Yes I guess that does make sense to do the language bolding that way. I never thought of that. As for the onmouseevent effecting Admin Access. Basically some or most of the admin files have a command like 'action=edit' in the mouseevent section. I did a test and noticed that these commands were oeveriding Admin Access Rights .. because Admin Access only explains and has the code for controlling Admin Buttons like the Edit button in categories.php etc. The current contribution code does not prevent the onmouseclick actions .. only the buttons .. unless you custom code like I have been slowly doing and I`ve taken out all the '&action=edit' etc. Now when someone doubleclicks on a line it does nothing for them. They have to use the Buttons. Hope this makes some sense to you. yes i know that , but would be better to do it on the code page ot in the language , so if 5 language 5 times less work would be maybe next release :-)
  7. insomniac2

    Product Documents

    OK got it fixed now to show proper product you are editing. FIND approximate lines 337 to 360 which read: <?php $documents = "select d.documents_description, d.documents_id, dc.documents_products_id, pd.products_name FROM " . TABLE_DOCUMENTS_PRODUCTS . " dc LEFT JOIN " . TABLE_DOCUMENTS . " d ON dc.documents_id = d.documents_id LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON dc.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by dc.documents_products_id"; $next_id = 1; $documents = tep_db_query($documents); while ($document_details = tep_db_fetch_array($documents)) { ?> <tr class="<?php echo (floor($rows/2) == ($rows/2) ? 'attributes-even' : 'attributes-odd'); ?>"> <?php if (($action == 'update_document') && ($HTTP_GET_VARS['documents_products_id'] == $document_details['documents_products_id'])) { ?> <td class="smallText"> <?php echo $document_details['documents_products_id']; ?><input type="hidden" name="documents_products_id" value="<?php echo $document_details['documents_products_id']; ?>"> </td> <td class="smallText"> <select name="products_id"> <?php $products = tep_db_query("select p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id = p.products_id and pd.language_id = '" . $languages_id . "' order by pd.products_name"); while($products_values = tep_db_fetch_array($products)) { if ($document_details['products_id'] == $products_values['products_id']) { echo "\n" . '<option name="' . $products_values['products_name'] . '" value="' . $products_values['products_id'] . '" SELECTED>' . $products_values['products_name'] . '</option>'; } else { echo "\n" . '<option name="' . $products_values['products_name'] . '" value="' . $products_values['products_id'] . '">' . $products_values['products_name'] . '</option>'; } } ?> AND REPLACE the WHOLE SECTION with: <?php $documents = "select d.documents_description, d.documents_id, dc.documents_products_id, pd.products_name from " . TABLE_DOCUMENTS_PRODUCTS . " dc left join " . TABLE_DOCUMENTS . " d on dc.documents_id = d.documents_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on dc.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by dc.documents_products_id"; $next_id = 1; $documents = tep_db_query($documents); while ($document_details = tep_db_fetch_array($documents)) { ?> <tr class="<?php echo (floor($rows/2) == ($rows/2) ? 'attributes-even' : 'attributes-odd'); ?>"> <?php if (($action == 'update_document') && ($_GET['documents_products_id'] == $document_details['documents_products_id'])) { ?> <td class="smallText" align="right"> <?php echo $document_details['documents_products_id']; ?><input type="hidden" name="documents_products_id" value="<?php echo $document_details['documents_products_id']; ?>"></td> <td class="smallText"> <select name="products_id"> <?php $products = tep_db_query("select d.documents_description, d.documents_id, dc.documents_products_id, pd.products_name from " . TABLE_DOCUMENTS_PRODUCTS . " dc left join " . TABLE_DOCUMENTS . " d on dc.documents_id = d.documents_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on dc.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by dc.documents_products_id"); while($products_values = tep_db_fetch_array($products)) { if ($_GET['documents_products_id'] == $products_values['documents_products_id']) { echo "\n" . '<option name="' . $products_values['products_name'] . '" value="' . $products_values['products_id'] . '" SELECTED>' . $products_values['products_name'] . '</option>'; } else { echo "\n" . '<option name="' . $products_values['products_name'] . '" value="' . $products_values['products_id'] . '">' . $products_values['products_name'] . '</option>'; } } ?> If that doesn't work for you you may have to alter the table DOCUMENTS to this: DROP TABLE IF EXISTS documents; CREATE TABLE documents ( documents_id int(11) NOT NULL auto_increment, language_id int DEFAULT '1' NOT NULL, documents_description varchar(128) default NULL, documents_file_name varchar(64) default NULL, documents_file_size int(11) default NULL, PRIMARY KEY (documents_id, language_id), KEY idx_documents_file_name (documents_file_name) ); I have reformed the table for the future incorporation of languages. I am looking at the products extra fields contribution and it has the code I need to do this eventually.
  8. insomniac2

    Product Documents

    Sorry IGNORE THAT LAST POST. It seems that this whole file is not correctly using languages. When I added a new document it added the file to all the products in all languages .. so now I have listed 3 documents for each product. One document for each language. I will try to look into it. I think when inputing a new file code needs to be added to specify which language the document is in. This will also require adding the language_id field to the TABLE_DOCUMENTS_PRODUCTS and TABLE_DOCUMENTS .. which could lead to some work .. LOL
  9. insomniac2

    Product Documents

    There is also an incorrect query which does not pull the proper product that you are working on when you do an edit. This will fix the problem by selecting the current product you are working on for you. Find Around line 339: $documents = "select d.documents_description, d.documents_id, dc.documents_products_id, pd.products_name from " . TABLE_DOCUMENTS_PRODUCTS . " dc left join " . TABLE_DOCUMENTS . " d on dc.documents_id = d.documents_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on dc.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by dc.documents_products_id"; REPLACE WITH: $documents = "select d.documents_description, d.documents_id, dc.products_id, dc.documents_products_id, pd.products_id, pd.products_name from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id left join " . TABLE_DOCUMENTS_PRODUCTS . " dc on dc.products_id = pd.products_id LEFT JOIN " . TABLE_DOCUMENTS . " d ON dc.documents_id = dc.documents_id where dc.products_id = pd.products_id and pd.products_id = p.products_id and dc.products_id = pd.products_id and pd.language_id = '" . $languages_id . "'";
  10. insomniac2

    Product Documents

    Around Line 363 FIND: <?php $files = tep_db_query("select documents_id, documents_description from " . TABLE_DOCUMENTS . ""); while($file_details = tep_db_fetch_array($files)) { if ($document_details['documents_id'] == $file_details['documents_id']) { echo "\n" . '<option name="' . $file_details['documents_description'] . '" value="' . $file_details['documents_id'] . '" SELECTED>' . $file_details['documents_description'] . '</option>'; } else { echo "\n" . '<option name="' . $file_details['documents_description'] . '" value="' . $file_details['documents_id'] . '">' . $file_details['documents_description'] . '</option>'; } } ?> CHANGE TO: <?php $files = tep_db_query("select documents_id, documents_file_name, documents_description from " . TABLE_DOCUMENTS . ""); while($file_details = tep_db_fetch_array($files)) { if ($document_details['documents_id'] == $file_details['documents_id']) { echo "\n" . '<option name="' . $file_details['documents_file_name'] . ' - [ ' . $file_details['documents_description'] . ' ]" value="' . $file_details['documents_id'] . '" SELECTED>' . $file_details['documents_file_name'] . ' - [ ' . $file_details['documents_description'] . ' ]</option>'; } else { echo "\n" . '<option name="' . $file_details['documents_file_name'] . ' - [ ' . $file_details['documents_description'] . ' ]" value="' . $file_details['documents_file_name'] . ' - [ ' . $file_details['documents_description'] . ' ]">' . $file_details['documents_description'] . '</option>'; } } ?> Also around Line 414 FIND: <?php $files = tep_db_query("select * from " . TABLE_DOCUMENTS . " order by documents_file_name"); while ($file_details = tep_db_fetch_array($files)) { echo '<option name="' . $file_details['documents_description'] . '" value="' . $file_details['documents_id'] . '">' . $file_details['documents_description'] . '</option>'; } ?> CHANGE TO: <?php $files = tep_db_query("select * from " . TABLE_DOCUMENTS . " order by documents_file_name"); while ($file_details = tep_db_fetch_array($files)) { echo '<option name="' . $file_details['documents_file_name'] . ' - [ ' . $file_details['documents_description'] . ' ]" value="' . $file_details['documents_id'] . '">' . $file_details['documents_file_name'] . ' - [ ' . $file_details['documents_description'] . ' ]</option>'; } ?> This will show you the documents actual download file and after the description you have given it in admin.
  11. insomniac2

    Orderlist contrib

    To correct time: FIND line 21: $today = date("d/m/Y"); CHANGE TO: $today = now(); ------------------------------------------------------- TO CORRECT SEARCH QUERY: REPLACE: $keywords = " o.orders_id like '%" . $keywords . "%' or o.orders_id like '%" . $keywords . "%' or o.customers_name like '%" . $keywords . "%' or o.customers_id like '%" . $keywords . "%' or o.customers_id like '%" . $keywords . "%' or o.customers_company like '%" . $keywords . "%' or o.customers_street_address like '%" . $keywords . "%' or o.customers_suburb like '%" . $keywords . "%' or o.customers_city like '%" . $keywords . "%' or o.customers_postcode like '%" . $keywords . "%' or o.customers_state like '%" . $keywords . "%' or o.customers_country like '%" . $keywords . "%' or o.customers_telephone like '%" . $keywords . "%' or o.customers_email_address like '%" . $keywords . "%' or o.delivery_name like '%" . $keywords . "%' or o.delivery_company like '%" . $keywords . "%' or o.delivery_street_address like '%" . $keywords . "%' or o.delivery_suburb like '%" . $keywords . "%' or o.delivery_city like '%" . $keywords . "%' or o.delivery_postcode like '%" . $keywords . "%' or o.delivery_state like '%" . $keywords . "%' or o.delivery_country like '%" . $keywords . "%' or o.billing_name like '%" . $keywords . "%' or o.billing_company like '%" . $keywords . "%' or o.billing_street_address like '%" . $keywords . "%' or o.billing_suburb like '%" . $keywords . "%' or o.billing_city like '%" . $keywords . "%' or o.billing_postcode like '%" . $keywords . "%' or o.billing_state like '%" . $keywords . "%' or o.billing_country like '%" . $keywords . "%' o.payment_method like '%" . $keywords . "%' or o.cc_number like '%" . $keywords . "%' "; WITH: $keywords = "o.orders_id like '%" . $keywords . "%' or o.customers_name like '%" . $keywords . "%' or o.customers_id like '%" . $keywords . "%' or o.customers_company like '%" . $keywords . "%' or o.customers_street_address like '%" . $keywords . "%' or o.customers_suburb like '%" . $keywords . "%' or o.customers_city like '%" . $keywords . "%' or o.customers_postcode like '%" . $keywords . "%' or o.customers_state like '%" . $keywords . "%' or o.customers_country like '%" . $keywords . "%' or o.customers_telephone like '%" . $keywords . "%' or o.customers_email_address like '%" . $keywords . "%' or o.delivery_name like '%" . $keywords . "%' or o.delivery_company like '%" . $keywords . "%' or o.delivery_street_address like '%" . $keywords . "%' or o.delivery_suburb like '%" . $keywords . "%' or o.delivery_city like '%" . $keywords . "%' or o.delivery_postcode like '%" . $keywords . "%' or o.delivery_state like '%" . $keywords . "%' or o.delivery_country like '%" . $keywords . "%' or o.billing_name like '%" . $keywords . "%' or o.billing_company like '%" . $keywords . "%' or o.billing_street_address like '%" . $keywords . "%' or o.billing_suburb like '%" . $keywords . "%' or o.billing_city like '%" . $keywords . "%' or o.billing_postcode like '%" . $keywords . "%' or o.billing_state like '%" . $keywords . "%' or o.billing_country like '%" . $keywords . "%' or o.payment_method like '%" . $keywords . "%' or o.cc_number like '%" . $keywords . "%' "; ---------------------------------- As for a customers who bought a product filter .. I will see what I can do. Thanks for alerting me of the glitches.
  12. insomniac2

    Member Approval

    Yes I tried php5 to and ran into tons of problems. Unfortunately a lot of the mods available are incompatable with the way php handles database and code variables. Just stick with php 4. If it works!! Don't fix it!! I say LOL
  13. insomniac2

    Orderlist bugs !!!

    Sorry .. I still left some custom fields I use in the code. I took the billing_telephone and delivery_telephone out. You can download the 5.1b corrected version now. Let me know if that works for you. Link: http://www.oscommerce.com/community/contributions,1836
  14. insomniac2

    Remove CVV number disappeared

    Since you can't find the original contrib .. they are all pretty much the same. You can use this code. You need to add this case near the top of your orders.php with the other cases: Change all cases below of cvvnumber to whatever your orders.php $HTTP_POST_VARS cvv number value is. case 'deletecc_cvv': $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']); $cvvnumber = tep_db_prepare_input ($HTTP_POST_VARS['cvvnumber']); tep_db_query("update " . TABLE_ORDERS . " set cvvnumber = null " . tep_db_input($cvvnumber) . " where orders_id = '" . tep_db_input($oID) . "'"); $order_updated = true; if ($order_updated) { $messageStack->add_session(SUCCESS_ORDER_UPDATED, 'success'); } else { $messageStack->add_session(WARNING_ORDER_NOT_UPDATED, 'warning'); } tep_redirect(tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action')) . 'action=edit')); break;
  15. You should be able to get it from one of the previous releases. Heres the code anyway: <?php // Code: categories_description // Author: Brian Lowe <blowe@wpcusrgrp.org> // Date: June 2002 // // Contains code snippets for the categories_description contribution to // osCommerce. // Code: categories_description MS2 1.5 // Editor: Lord Illicious <shaolin-venoms@illicious.net> // Date: July 2003 // // Get a category heading_title or description // These should probably be in admin/includes/functions/general.php, but since // this is a contribution and not part of the base code, they are here instead function tep_get_category_heading_title($category_id, $language_id) { $category_query = tep_db_query("select categories_heading_title from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$category_id . "' and language_id = '" . (int)$language_id . "'"); $category = tep_db_fetch_array($category_query); return $category['categories_heading_title']; } function tep_get_category_description($category_id, $language_id) { $category_query = tep_db_query("select categories_description from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$category_id . "' and language_id = '" . (int)$language_id . "'"); $category = tep_db_fetch_array($category_query); return $category['categories_description']; } ?>
  16. insomniac2

    customers shopping cart in admin?

    You should be a able to see any items in carts by using the Admin Who's Online Tool.
  17. insomniac2

    How Did You Hear About Us - Support

    Ya and try it a few times. I have done that. Sometimes it takes a few go's at it before it kicks in .. or u realize you missed one small step etc.
  18. insomniac2

    How Did You Hear About Us - Support

    That error is in no way relates to the heard about us mod. If you installed the heard about us mod ... you must have accidentally removed or altered some code having to do with I am guessing ... one of the Categories Description Mods. Did you by chance install a mod for Categories Descriptions?
  19. insomniac2

    SEO Assistant

    Thanks for the tip. I do have that set to on in my php.ini file. Using Latest Apache on test localhost. Maybe it will work itself out ... or work when I move it to active server.
  20. insomniac2

    phpBB and osCommerce

    If you go back to the version 2.08 implementation as I did you will be able to merge it with oscommerce. Than you will have to do any extra modding or code yourself to bring it up to snuff to the lates phpbb version .. as I have had to do, but still am working on some glitches. Heres the link to the old contribution to start from: http://www.oscommerce.com/community/contri...ll/search,phpbb --------------------------------- Or you can go with Anderskiel's newer mods released. Although I have not tried his implementation .. so don't know how his works. Link: http://www.oscommerce.com/community/contri...ll/search,phpbb
  21. insomniac2

    SEO Assistant

    Thanks for your work Jack. I just have some errors that you might know about. When I use the Check SID's feature and check Google .. I get this error.: Warning: fopen(http://www.google.com/search?q=site:www.site.com&num=10&hl=en&lr=&filter=0&start=1): failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in C:\sokkit\site\catalog\admin\includes\modules\seo_check_sids.php on line 33 Unable to open remote file http://www.google.com/search?q=site:www.sa...r=0&start=1. Warning: fclose(): supplied argument is not a valid stream resource in C:\sokkit\site\catalog\admin\includes\modules\seo_check_sids.php on line 119 MSN and Yahoo return no errors. ----------------------------- When I use supplemental I get this error which is caused by Google too: Warning: fopen(http://www.google.com/search?q=site:www.site.com&num=10&hl=en&lr=&filter=0&start=1): failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in C:\sokkit\site\catalog\admin\includes\modules\seo_check_supplemental.php on line 17 Unable to open remote file http://www.google.com/search?q=site:www.sa...r=0&start=1. Warning: fclose(): supplied argument is not a valid stream resource in C:\sokkit\site\catalog\admin\includes\modules\seo_check_supplemental.php on line 59
  22. insomniac2

    How to show cost of each attribute in cart and order

    Here is the infobox table code I modded to show attributes. You can use it for code and as an example. It is too reworked to just use ... but the attribute code areas should give you the idea. <?php if ($cart->count_contents() > 0) { ?> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[0][] = array('align' => 'center', 'params' => 'class="productListing-heading"', 'text' => TABLE_HEADING_REMOVE); $info_box_contents[0][] = array('params' => 'class="productListing-heading"', 'text' => ' ' . TABLE_HEADING_PRODUCTS); $info_box_contents[0][] = array('align' => 'center', 'params' => 'class="productListing-heading"', 'text' => TABLE_HEADING_QUANTITY); $info_box_contents[0][] = array('align' => 'right', 'params' => 'class="productListing-heading"', 'text' => TABLE_HEADING_TOTAL); $any_out_of_stock = 0; $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { // Push all attributes information in an array // DO NOT USE (int) on $products[$i]['id'] or cart loses products attributes if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) { while (list($option, $value) = each($products[$i]['attributes'])) { echo tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . (int)$option . ']', (int)$value); $attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . $products[$i]['id'] . "' and pa.options_id = '" . (int)$option . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . (int)$value . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . (int)$languages_id . "' and poval.language_id = '" . (int)$languages_id . "'"); $attributes_values = tep_db_fetch_array($attributes); $products[$i][$option]['products_options_name'] = $attributes_values['products_options_name']; $products[$i][$option]['options_values_id'] = $value; $products[$i][$option]['products_options_values_name'] = $attributes_values['products_options_values_name']; $products[$i][$option]['options_values_price'] = $attributes_values['options_values_price']; $products[$i][$option]['price_prefix'] = $attributes_values['price_prefix']; } } } // change dropdown //for ($i=0; $i < NUM_PROD_MAXORD; $i++) { //$options[$i][id] = ($i+1); // modified these 2 lines so dropdown starts at 0 //$options[$i][text] = ($i+1); //$options[$i][id] = ($i); //$options[$i][text] = ($i); //} for ($j=0 ; $j < NUM_PROD_MAXORD; $j++) { //$options[$j][id] = ($j+1); // modified these 2 lines so dropdown starts at 0 //$options[$j][text] = ($j+1); $options[$j][id] = ($j); $options[$j][text] = ($j); } // end change dropdown for ($i=0, $n=sizeof($products); $i<$n; $i++) { if (($i/2) == floor($i/2)) { $info_box_contents[] = array('params' => 'class="productListing-even"'); } else { $info_box_contents[] = array('params' => 'class="productListing-odd"'); } $cur_row = sizeof($info_box_contents) - 1; $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="middle"', 'text' => '<a href="' . tep_href_link(basename($PHP_SELF), 'action=remove_product&products_id=' . $products[$i]['id'] . '', 'NONSSL') . '">' . tep_image_button('remove_item.gif', TEXT_REMOVE_ITEM) . '</a>'); //'text' => '<br>' . tep_image_submit('remove_item.gif', IMAGE_BUTTON_UPDATE_CART) . ' ' . tep_draw_checkbox_field('cart_delete[]', $products[$i]['id'], ' ', 'onFocus="advisecustomer();"')); $products_name = '<table border="0" cellspacing="2" cellpadding="2">' . ' <tr>' . ' <td class="productListing-data" align="left"></td>' . ' <td class="productListing-data" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['model'], 50, 45) . '</a></td>' . // original line below does not show model //' <td class="productListing-data" valign="top"> <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><b>' . $products[$i]['name'] . '</b></a>' . '<br><br> Manufacturer: ' . $mfg['manufacturers_other'] . ' ' . $mfg['manufacturers_name']; ' <td class="productListing-data" align="left"> </td>' . ' <td class="productListing-data" valign="top"> <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><b>' . $products[$i]['name'] . '</a></b> <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_ICONS . 'icon_info.gif', TEXT_VIEW_PRODUCT) . '</a>'; // BEGIN Minimum Product Quantity if (MINIMUM_ORDERS == 'true') { $min_order_query = tep_db_query("select p.minorder as min_quant from " . TABLE_PRODUCTS . " p where p.products_id = '" . $products[$i]['id'] . "'"); while ($min_order = tep_db_fetch_array($min_order_query)) { if ($products[$i]['quantity'] < $min_order['min_quant']) { $products[$i]['min_quant'] = $min_order['min_quant']; } } if ($products[$i]['quantity'] < $products[$i]['min_quant']) { $products[$i]['quantity'] = $products[$i]['min_quant']; //$cart->add_cart($products[$i]['id'], $products[$i]['quantity']); $cart->add_cart($products[$i]['id'], $products[$i]['quantity'], $products[$i]['attributes']); echo '<small><font color="FF0000">' . sprintf(MINIMUM_ORDER_NOTICE, $products[$i]['name'], $products[$i]['min_quant'] . '</small></font>'); tep_redirect(tep_href_link(basename($PHP_SELF))); // added to update total correctly when updates minimum quantity allowed //tep_redirect(tep_href_link(basename($PHP_SELF))); // need to incorporate this so display totals are updated on quantity notice change ... else the sub-total does not reflect the changes } } if (($products[$i]['min_quant'] > 0) && (MINIMUM_ORDERS == 'true')) { $products_name .= ' <small><font color="FF0000">[ Minimum Qty. of ' . $products[$i]['min_quant'] . ' ]' . '</small></font>'; } // END Minimum Product Quantity // show the model name and number $products_name .= '<br> Model Number: [ ' . $products[$i]['model'] . ' ]</small>'; // Begin Show Manufacturer In Listing $v_query = tep_db_query("select manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . $products[$i]['id'] . "'"); $v = tep_db_fetch_array($v_query); // Select the proper Manufacturers Name via the Manufacturers ID# then display that name for a human readable output $mfg_query = tep_db_query("select manufacturers_id, manufacturers_other, manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . $v['manufacturers_id'] . "'"); $mfg = tep_db_fetch_array($mfg_query); if (tep_not_null($mfg['manufacturers_id'])) { $products_name .= '<br> ' . TEXT_MANUFACTURER . ' ' . $mfg['manufacturers_other'] . ' ' . $mfg['manufacturers_name']; } else { $products_name .= '<br> ' . TEXT_MANUFACTURER_UNAVAILABLE; } // End Show Manufacturer In Listing /// BEGIN Country_based_shipping $check_country_query = tep_db_query("select entry_country_id, entry_zone_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$sendto . "'"); $check_country = tep_db_fetch_array($check_country_query); $my_shipping_geo_query = tep_db_query("select products_geo_zones from " . TABLE_PRODUCTS . " where products_id = '" . $products[$i]['id'] . "'"); $my_shipping_geo = tep_db_fetch_array($my_shipping_geo_query); $check_geo_zone_query = tep_db_query("select zone_country_id, zone_id, geo_zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where zone_country_id = '" . (int)$check_country['entry_country_id'] . "' and zone_id = '" . (int)$check_country['entry_zone_id'] . "' and geo_zone_id = '" . (int)$my_shipping_geo['products_geo_zones'] . "'"); $check_geo_zone = tep_db_fetch_array($check_geo_zone_query); if (!tep_session_is_registered('customer_id')) { } else { if ($my_shipping_geo['products_geo_zones'] != $check_geo_zone['geo_zone_id'] && $my_shipping_geo['products_geo_zones'] != 0) { //$products_name .= '<br> ' . TEXT_PRODUCT_NOT_AVAILABLE_FOR_SHIPPING_HERE; $products_name .= '<br> ' . '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '">' . TEXT_PRODUCT_NOT_AVAILABLE_FOR_SHIPPING_HERE . '</b></a> ' . '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '">' . tep_image_button('button_change_shipping_address.gif', TEXT_CHANGE_SHIPPING_ADDRESS, 'align="absbottom"') . '</a>'; } } /// END Country_based_shipping if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) { reset($products[$i]['attributes']); while (list($option, $value) = each($products[$i]['attributes'])) { $products_name .= '<br><small> <i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i></small>'; // begin show options values in cart mod if ($products[$i][$option]['options_values_price'] > 0) { $products_name .= ' + $' . sprintf("%01.2f", $products[$i][$option]['options_values_price']); } // end show options values in cart mod $products_price = '<span class="smallText"><b>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</font></b> '; } } // show the per unit price $products_name .= '<br><br> <small>Base Price: ' . $currencies->display_price_nodiscount($products[$i]['price'], tep_get_tax_rate($products[$i]['tax_class_id']), 1) . '</small>'; // Low Stock Warning if (STOCK_CHECK == 'true') { $stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity']); if (tep_not_null($stock_check)) { $any_out_of_stock = 1; $products_name .= $stock_check . ' ' . $products[$i]['name']; } } $products_name .= ' </td>' . ' </tr>' . '</table>'; $info_box_contents[$cur_row][] = array('params' => 'class="productListing-data"', 'text' => '<br>' . $products_name); $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', //'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id'])); // begin change dropdown 'text' => '<br>' . tep_draw_pull_down_menu('cart_quantity[]', $options, $products[$i]['quantity'], 'onchange="this.form.submit();" onFocus="update_qty_warning();"') . tep_draw_hidden_field('products_id[]', $products[$i]['id'])); // end change dropdown //$info_box_contents[$cur_row][] = array('align' => 'right', //'params' => 'class="productListing-data" valign="top"', //'text' => '<br>Unit Price: <b>' . $currencies->display_price($products[$i]['price'], tep_get_tax_rate($products[$i]['tax_class_id']), 1 ) . '</b> <br><br><font color="0000FF">Total:</font> <b>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b> '); // BEGIN Group Discount $info_box_contents[$cur_row][] = array('align' => 'right', 'params' => 'class="productListing-data" valign="top"', 'text' => '<br>Unit Price: <b>' . $currencies->display_price_nodiscount($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax']), 1) . '</b> <br><br><font color="0000FF">Total:</font> <b>' . $currencies->display_price_nodiscount($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b> '); // END Group Discount } new productListingBox($info_box_contents); ?>
  23. insomniac2

    LoginboxV5.4_in_header

    I noticed this problem a while back to. I had it working for a long time ... than it stopped working but I don't know when. I think it might have been after I installed update patches for oscommerce MS2 .. but not sure. Alot of the updates had changed tep functions for input and login forms etc. I still have not figured out why it just stopped working.
  24. insomniac2

    Identifying Contributions

    That is a nice site. Nice clean layout and straight to the point. I would suggest if you're going to stick with it .. find a developer that knows the OSC system. To find out more about exactly which mods have been installed your best bet is to look at the catalog and admin includes/database.php files. The tables used for the data are a dead giveaway. Also by opening each file and looking at the credits and mod info at the top will most likely give you the exact name of the mod ... some even have a link to the contribution and forum support threads. Hope that gave you some ideas. Oh and P.S. ... And don't forget to tell your developer if you use one .. to keep a copy of all the mods they installed.
  25. insomniac2

    [Contribution] Ship In Cart

    That is not quite what I have in my general.php for the output string section. You could test this code. My whole section look like: function tep_output_string($string, $translate = false, $protected = false) { if ($protected == true) { return htmlspecialchars($string); } else { if ($translate == false) { return tep_parse_input_field_data($string, array('"' => '"')); } else { return tep_parse_input_field_data($string, $translate); } } } function tep_output_string_protected($string) { return tep_output_string($string, false, true); } function tep_sanitize_string($string) { $string = ereg_replace(' +', ' ', trim($string)); return preg_replace("/[<>]/", '_', $string); } As you can see its using &quot .. instead of the actual character. Don't ask me why LOL
×