Jump to content

GIZMO-XL

Members
  • Content count

    71
  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    Shawn Miller
  1. GREAT!!!! I was happy to help!
  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. 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>
  4. 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>'; ?>
  5. 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.
  6. 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.
  7. You will have to do some work on it.
  8. 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; }
  9. 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";
  10. GIZMO-XL

    OrderCheck v 1.3 Released

    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
  11. 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
  12. GIZMO-XL

    fixes to PhpBB contribution

    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.
  13. GIZMO-XL

    fixes to PhpBB contribution

    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(); ?>
  14. GIZMO-XL

    fixes to PhpBB contribution

    You will have to rework your code completely if you don't ues the mod.
  15. 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
×