Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

GIZMO-XL

Archived
  • Posts

    71
  • Joined

  • Last visited

Everything posted by GIZMO-XL

  1. should be something like the following <td nowrap class="VisitorTableHeadingContent"><a href="<?php echo $_SERVER["PHP_SELF"]. "?listing=counter-asc"; ?>">+</a> <?php echo TABLE_HEADING_COUNTER; ?> <a href="<?php echo $_SERVER["PHP_SELF"]. "?listing=counter-desc&" . tep_session_name() . "=" . tep_session_id(); ?>">-</a></td>
  2. should be something like the following <td nowrap class="VisitorTableHeadingContent"><a href="<?php echo $_SERVER["PHP_SELF"]. "?listing=counter-asc"; ?>">+</a> <?php echo TABLE_HEADING_COUNTER; ?> <a href="<?php echo $_SERVER["PHP_SELF"]. "?listing=counter-desc&" . tep_session_name() . '=' . tep_session_id(); ?>">-</a></td>
  3. Well the syntax you use will need to very depending on the operation but the key to success is that all operations have the sid added to the link for the operation sid=e4d5bfe1255ce91efbecd382f13f1e54 tep_draw_hidden_field(tep_session_name() = the sid tep_session_id() = the e4d5bfe1255ce91efbecd382f13f1e54 portion This id your code sample <?php echo tep_draw_form('goto', FILENAME_CATEGORIES, '', 'get'); echo tep_draw_hidden_field(tep_session_name()); echo HEADING_TITLE_GOTO . ' ' . tep_draw_pull_down_menu('cPath', tep_get_category_tree(), $current_category_id, 'onChange="this.form.submit();"'); echo '</form>'; ?> And this is how it should look. <?php echo tep_draw_form('goto', FILENAME_CATEGORIES, '', 'get'); echo HEADING_TITLE_GOTO . ' ' . tep_draw_pull_down_menu('cPath', tep_get_category_tree(), $current_category_id, 'onChange="this.form.submit();"'); echo tep_draw_hidden_field(tep_session_name(), tep_session_id()); echo '</form>'; ?>
  4. because of the mod you will need to add the session where ever it is needed in the admin area php pages. use the following functions to help you with this. tep_draw_hidden_field(tep_session_name() tep_session_id() if you still have questions please I will try and help.
  5. This mod does not link to any payment gateways at all at this time for security reasons. With work it can be done though. Also I have my version updateing the bestsellers table. It was not hard to do.
  6. Here you go this will give you model#-Product Name // ############################################################################ // Get List of All Products // ############################################################################ $result = tep_db_query("SELECT products_name, p.products_id, p.products_model, categories_name, ptc.categories_id FROM " . TABLE_PRODUCTS . " p LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON pd.products_id=p.products_id LEFT JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc ON ptc.products_id=p.products_id LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " cd ON cd.categories_id=ptc.categories_id WHERE pd.language_id = cd.language_id AND cd.language_id = 1 ORDER BY categories_name"); while($row = tep_db_fetch_array($result)) { extract($row,EXTR_PREFIX_ALL,"db"); $ProductList[$db_categories_id][$db_products_id] = $db_products_model . '-' .$db_products_name; $CategoryList[$db_categories_id] = $db_categories_name; $LastCategory = $db_categories_name; }
  7. OK in the edit_orders.php look for this section: // Step 1: Choose Category print "<tr class=\"dataTableRow\"><form action='$PHP_SELF?oID=$oID&action=$action' method='POST'>\n"; print "<td class='dataTableContent' align='right'><b>STEP 1:</b></td><td class='dataTableContent' valign='top'><select name='add_product_categories_id'>"; $CategoryOptions = "<option value='0'> --- CHOOSE A CATEGORY ---\n"; foreach($CategoryList as $CategoryID => $CategoryName) { $CategoryOptions .= "<option value='$CategoryID'> $CategoryName\n"; } $CategoryOptions = str_replace("value='$add_product_categories_id'","value='$add_product_categories_id' selected", $CategoryOptions); print $CategoryOptions; print "</select></td>\n"; print "<td class='dataTableContent' align='center'><input type='submit' value='Select This Category'>"; print "<input type='hidden' name='step' value='2'>"; print "</td>\n"; print "</form></tr>\n"; print "<tr><td colspan='3'> </td></tr>\n"; and change it to the following: // Step 1: Choose Category print "<tr class=\"dataTableRow\"><form action='$PHP_SELF?oID=$oID&action=$action' method='POST'>\n"; print "<td class='dataTableContent' align='right'><b>STEP 1:</b></td><td class='dataTableContent' valign='top'>\n"; $tree = tep_get_category_tree(); $dropdown= tep_draw_pull_down_menu('add_product_categories_id', $tree, '', ''); //single echo $dropdown; // print "<select name='add_product_categories_id'>\n"; // $CategoryOptions = "<option value='0'> --- CHOOSE A CATEGORY ---\n"; // foreach($CategoryList as $CategoryID => $CategoryName) // { // $CategoryOptions .= "<option value='$CategoryID'> $CategoryName\n"; // } $CategoryOptions = str_replace("value='$add_product_categories_id'","value='$add_product_categories_id' selected", $CategoryOptions); print $CategoryOptions; print "</select></td>\n"; print "<td class='dataTableContent' align='center'><input type='submit' value='Select This Category'>"; print "<input type='hidden' name='step' value='2'>"; print "</td>\n"; print "</form></tr>\n"; print "<tr><td colspan='3'> </td></tr>\n";
  8. I have it working on MS2 and I only have a small problem in the admin when moving a order. I had to make a few small changes to get the right order numbers and fix the tep_array thing but that was it. All in all it seems to be a great mod Thanks for making it. This is a feature that should be in the stock package
  9. OK in the event anyone is using html in the product descriptions the following change to the mod will improve things for you. Find the following line in the product_listing.php $lc_text = ' ' . osc_trunc_string(strip_tags($listing['products_description'], '<a><b><em><font><i><s><span><strong><sub><sup><u>'), PRODUCT_LIST_DESCRIPTION_LENGTH) . ' '; and replace it with the following and your html description will work great. // $lc_text = ' ' . osc_trunc_string(strip_tags($listing['products_description'], '<a><b><em><font><i><s><span><strong><sub><sup><u>'), PRODUCT_LIST_DESCRIPTION_LENGTH) . ' '; $lc_text = ' ' . osc_trunc_string(eregi_replace ("<([b|i|u])[^>]*>", "<\\1>",eregi_replace ("<a [^>]*href *= *([^ ]+)[^>]*>", "<a href=\\1>",strip_tags(stripslashes($listing['products_description']),'<b><i><u><a><s><span><strong><em><sub><sup><u>'))), PRODUCT_LIST_DESCRIPTION_LENGTH) . ' '; What I had found when I installed it was many problems on differant list pages that was being caused by the html based product descriptions so the above changes cleans it up before the last step is applied to the string/product description. As a FYI you can use the call to convert and data column that stores html content to a html format that can be used without screwing up your page layout. The folowing is code added to the general.php file that will allow you to call a function to get a product desciption any you need it on other pages. // ################### Products Description Hack begins ############## // // grabs a length from a string, but goes back to the last space if it cut into // the middle of a string. If the string is longer than that, cut, then add '...' // to the end of the string, if the $more == 1 function osc_trunc_string($str="",$len=150,$more=1) { if ($str=="") return $str; if (is_array($str)) return $str; $str = trim($str); // if it's les than the size given, then return it if (strlen($str) <= $len) return $str; // else get that size of text $str = substr($str,0,$len); // backtrack to the end of a word if ($str != "") { // check to see if there are any spaces left if (!substr_count($str," ")) { if ($more) $str .= "..."; return $str; } // backtrack while(strlen($str) && ($str[strlen($str)-1] != " ")) { $str = substr($str,0,-1); } $str = substr($str,0,-1); if ($more) $str .= "..."; } return $str; } // ########### Products Description Hack ends ############# require(DIR_WS_FUNCTIONS . 'articles_general.php'); //// // Return a product's name // TABLES: products function tep_get_products_des($product_id, $language = '') { global $languages_id; if (empty($language)) $language = $languages_id; $product_query = tep_db_query("select products_description from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$product_id . "' and language_id = '" . (int)$language . "'"); $product = tep_db_fetch_array($product_query); //$tmp_a = htmlspecialchars($product['products_description']); //return $product['products_description']; $text = stripslashes($product['products_description']); $text = strip_tags($text, '<b><i><u><a><s><span><strong><em><sub><sup><u>'); $text = eregi_replace ("<a [^>]*href *= *([^ ]+)[^>]*>", "<a href=\\1>", $text); $text = eregi_replace ("<([b|i|u])[^>]*>", "<\\1>", $text); return osc_trunc_string($text, '600'); } just make a call to tep_get_products_des(send the prod ID here ) Anyways hope it helps
  10. If you downloaded the stuff from OSC it is not complete and you will never get it to work. you need to go to the following places and look for a complete set of files for this mod http://oscphpbb2.ecart.com.tw/viewtopic.php?t=36 and after that you will still have many correction to make to get it to work for you. But after you get everything working it's a nice mod.
  11. Here you go <?php // ------------------------------------------------------------------------- // // GNU General Public License for more details. // // // // You should have received a copy of the GNU General Public License // // along with this program; if not, write to the Free Software // // author: Oldpa // // web site: http://oldpa.adsldns.org http://www.oldpa.com.tw // // ------------------------------------------------------------------------- // function install_header(){ ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>OSC User Converter to PHPBB</title> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo _CHARSET;?>"> <meta name="AUTHOR" content="osCommerce"> <meta name="GENERATOR" content="oldpa-- http://www.oldpa.com.tw/"> </head> <body> <div style='text-align:center'><img src='http://www.oldpa.com.tw/images/s_poweredby.gif' /><h3>CONVERT LINE 1</h3><br /> <?php } function install_footer(){ ?> <br /><br /><a href='http://www.oldpa.com.tw/' target='_blank'><img src='images/logo1.gif' alt='www.oldpa.com.tw' border='0' /></a></div> </body> </html> <?php } if ( !isset($action) || $action == "" ) { $action = "message"; } if ( $action == "message" ) { install_header(); echo " <table width='90%' border='0'><tr><td colspan='2'>CONVERT LINE 2</td></tr><br> <tr><td>-</td><td>XXXXX | YYYYY | ZZZZZ</b></td></tr> <tr><td>-</td><td>CONVERT LINE 4</b></td></tr> <tr><td>-</td><td><span style='color:#ff0000;font-weight:bold;'>CONVERT LINE 5</span></td></tr> </table> "; echo "<p>CONVERT LINE 6</p>"; echo "<form action='".$PHP_SELF."' method='post'><input type='submit' value='submit' /><input type='hidden' value='upgrade' name='action' /></form>"; install_footer(); exit(); } if ( $action == "upgrade" ) { require('includes/application_top.php'); install_header(); echo "<h4>CONVERT LINE 7</h4>\n"; $error = array(); tep_db_query("insert into " . TABLE_PHPBB_USERS . " (user_id , user_active, username, user_password ,user_session_time , user_session_page , user_lastvisit , user_regdate , user_level , user_posts , user_timezone , user_style , user_lang , user_dateformat , user_new_privmsg , user_unread_privmsg , user_last_privmsg , user_emailtime , user_viewemail , user_attachsig , user_allowhtml , user_allowbbcode , user_allowsmile ,user_allowavatar ,user_allow_pm , user_allow_viewonline ,user_notify , user_notify_pm ,user_popup_pm , user_rank , user_avatar ,user_avatar_type ,user_email , user_icq ,user_website ,user_from ,user_sig , user_sig_bbcode_uid , user_aim , user_yim , user_msnm ,user_occ , user_interests , user_actkey , user_newpasswd) SELECT customers_id , '1', concat(customers_firstname, ' ' , customers_lastname) , customers_password , '', '', 'time()', 'time()', '0','0','8.00','1', 'english','D M d, Y g:i a', '0','0','0', '0','1','1','0','1', '1','1','1','1','0', '1','1','0','','0',customers_email_address, '','','','','','','','','','','','' FROM ".TABLE_CUSTOMERS." WHERE customers_id"); tep_db_query("insert into " . TABLE_PHPBB_GROUPS . " (group_id , group_type, group_name , group_description ,group_moderator , group_single_user) SELECT customers_id+1,'1','','Personal User','0','1' FROM ".TABLE_CUSTOMERS." WHERE customers_id <> 1"); tep_db_query("insert into " . TABLE_PHPBB_USER_GROUPS . " (group_id , user_id , user_pending) SELECT g.group_id ,u.user_id ,g.group_moderator FROM ".TABLE_PHPBB_GROUPS." AS g , ".TABLE_PHPBB_USERS ." AS u WHERE g.group_id = u.user_id+1"); } echo "<div style='text-align:center;'><h4>CONVERT LINE 8</h4>\n"; echo "<table width='70%' border='0'><tr><td>"; echo "</td></tr></table><br /><br /><a href='".HTTP_SERVER."/'>HOME</a>"; install_footer(); ?>
  12. You will have to rework your code completely if you don't ues the mod.
  13. One more this you all need to know is if you are using more than one language you will have to make changes tin the edit_orders where it loads the dropdown selection for cat's and parts otherwise this get screwed up when you try to add products. The code does not use the language_id in any of it's queries Shawn
  14. OK everyone here is the deal. the files on OSC site are not complete files that was the big problem with the mod that I was having. I have fixed loads of bugs but I am still having a problem in the admin area the admin_users.php will not run for me so if anyone who has a working version please post it for me and I will re-post the mod in ENGLISH on OSC. I have seen it working on unsecure OSC site but I had to make changes to get the sessions to work right on a secure/unsecure OSC configuration. All in All it works good and if anyone would like to see it check here http://www.microheli.com/mhshop/modules.ph...&file=index.php Please if anyone can help on the admin problem I am having please jump in and save the day I have been working on the for three days
  15. That would be to Cool of you !!!!!!!!!!!!!!! Thanks in advance.
  16. Thanks for the help beardeddone but that was set correctly....LOL well I was able to make the server error go away so now i have two white pages. For some reason I think this is a path problem I just need to be pointed in the right direction. What I wish I had was a PHP debugger so I could see what was going on in the code. I just got to the point I could follow the code in OSC and now I am looking at a completely different style of coding. Anyways thanks for the help beardeddone If anyone else has a clue please chime in!!!!!!!
  17. OK everyone I need some help when I go to the following url http://www.microheli.com/mhshop/modules.ph...&file=index.php I just get a blank page and when I go to http://www.microheli.com/mhshop/admin/bb_default.php I get a Internal Server error it seems like they can't finf the correct files. I have checked and re-checked the install and also made the changes in this post but still is not working correctly. the other thing I would like to be clear on is this have to be installed on both the unsecure and secure servers or just the unsecure server? I hope someone can help because this looks like a great mod!!!!!!!!
  18. The answer to your problem is in this post you just need to read through them... I have this working on my site and it is a great mod!!!!
  19. This is what your manual_order.php should look like it is located in the admin/includes/box dir <?php /* ?$Id: manual_order.php,v 1 7:09 PM 14/08/2003 frank Exp $ ?osCommerce, Open Source E-Commerce Solutions ?http://www.oscommerce.com ?Copyright (c) 2002 osCommerce ?Released under the GNU General Public License */ ?> <!-- manual_order //--> ? ? ? ? ?<tr> ? ? ? ? ? ?<td> <?php ?$heading = array(); ?$contents = array(); ?$heading[] = array('text' ?=> BOX_HEADING_MANUAL_ORDER, ? ? ? ? ? ? ? ? ? ? 'link' ?=> tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('selected_box')) . 'selected_box=manual_order')); ?if ($selected_box == 'manual_order') { ? ?$contents[] = array('text' ?=> '<a href="' . tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_MANUAL_ORDER_CREATE_ACCOUNT . '</a><br>' . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? '<a href="' . tep_href_link(FILENAME_CREATE_ORDER, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_MANUAL_ORDER_CREATE_ORDER . '</a>'); ?} ?$box = new box; ?echo $box->menuBox($heading, $contents); ?> ? ? ? ? ? ?</td> ? ? ? ? ?</tr> <!-- taxes_eof //--> My guess is it is a problem with your column_left.php file the following is a sample of how it should look. <?php /* $Id: column_left.php,v 1.15 2002/01/11 05:03:25 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ require(DIR_WS_BOXES . 'configuration.php'); require(DIR_WS_BOXES . 'catalog.php'); require(DIR_WS_BOXES . 'modules.php'); require(DIR_WS_BOXES . 'customers.php'); require(DIR_WS_BOXES . 'manual_order.php'); require(DIR_WS_BOXES . 'taxes.php'); require(DIR_WS_BOXES . 'localization.php'); require(DIR_WS_BOXES . 'reports.php'); require(DIR_WS_BOXES . 'tools.php'); require(DIR_WS_BOXES . 'articles.php'); // Polls require(DIR_WS_BOXES . 'polls.php'); //BEGIN Information pages unlimited require(DIR_WS_BOXES . 'information.php'); //END Information pages unlimited ?>
  20. email me your edit_orders.php from before you added my version and let me check some things. email to [email protected]
  21. Tom I have checked all the code and that section is from the base code.... Not sure what to tell you.. You are not using the beta version of the manual order are you?
  22. Well it did not save the complete edit_orders.php so here is a link to download it. Now you need to download the new edit_orders.php file Click here to download
×
×
  • Create New...