Jump to content

neverfight

Members
  • Content count

    39
  • Joined

  • Last visited

1 Follower

About neverfight

  • Birthday 09/29/1966

Profile Information

  • Real Name
    Laurie Smith
  • Location
    NC
  • Website
  1. neverfight

    Article Manager v1.0

    Richard, I finally found the solution to this problem myself. Here are the updated versions of the articles box and the authors box. <?php /* $Id: articles.php, v1.0 2003/12/04 12:00:00 ra Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ function tep_show_topic($counter) { global $tree, $topics_string, $tPath_array; for ($i=0; $i<$tree[$counter]['level']; $i++) { $topics_string .= " "; } $topics_string .= '<a href="'; if ($tree[$counter]['parent'] == 0) { $tPath_new = 'tPath=' . $counter; } else { $tPath_new = 'tPath=' . $tree[$counter]['path']; } $topics_string .= tep_href_link(FILENAME_ARTICLES, $tPath_new) . '">'; if (isset($tPath_array) && in_array($counter, $tPath_array)) { $topics_string .= '<b>'; } // display topic name $topics_string .= $tree[$counter]['name']; if (isset($tPath_array) && in_array($counter, $tPath_array)) { $topics_string .= '</b>'; } if (tep_has_topic_subtopics($counter)) { $topics_string .= ' ->'; } $topics_string .= '</a>'; if (SHOW_ARTICLE_COUNTS == 'true') { $articles_in_topic = tep_count_articles_in_topic($counter); if ($articles_in_topic > 0) { $topics_string .= ' (' . $articles_in_topic . ')'; } } $topics_string .= '<br>'; if ($tree[$counter]['next_id'] != false) { tep_show_topic($tree[$counter]['next_id']); } } ?> <!-- topics //--> <tr> <td> <?php $info_box_contents = array(); // $info_box_contents[] = array('text' => BOX_HEADING_ARTICLES); $info_box_contents[] = array('text' => '<font color="' . $font_color . '">' . BOX_HEADING_ARTICLES . '</font>'); new infoBoxHeading($info_box_contents, false, false); $topics_string = ''; $tree = array(); $topics_query = tep_db_query("select t.topics_id, td.topics_name, t.parent_id from " . TABLE_TOPICS . " t, " . TABLE_TOPICS_DESCRIPTION . " td where t.parent_id = '0' and t.topics_id = td.topics_id and td.language_id = '" . (int)$languages_id . "' order by sort_order, td.topics_name"); while ($topics = tep_db_fetch_array($topics_query)) { $tree[$topics['topics_id']] = array('name' => $topics['topics_name'], 'parent' => $topics['parent_id'], 'level' => 0, 'path' => $topics['topics_id'], 'next_id' => false); if (isset($parent_id)) { $tree[$parent_id]['next_id'] = $topics['topics_id']; } $parent_id = $topics['topics_id']; if (!isset($first_topic_element)) { $first_topic_element = $topics['topics_id']; } } //------------------------ if (tep_not_null($tPath)) { $new_path = ''; reset($tPath_array); while (list($key, $value) = each($tPath_array)) { unset($parent_id); unset($first_id); $topics_query = tep_db_query("select t.topics_id, td.topics_name, t.parent_id from " . TABLE_TOPICS . " t, " . TABLE_TOPICS_DESCRIPTION . " td where t.parent_id = '" . (int)$value . "' and t.topics_id = td.topics_id and td.language_id = '" . (int)$languages_id . "' order by sort_order, td.topics_name"); if (tep_db_num_rows($topics_query)) { $new_path .= $value; while ($row = tep_db_fetch_array($topics_query)) { $tree[$row['topics_id']] = array('name' => $row['topics_name'], 'parent' => $row['parent_id'], 'level' => $key+1, 'path' => $new_path . '_' . $row['topics_id'], 'next_id' => false); if (isset($parent_id)) { $tree[$parent_id]['next_id'] = $row['topics_id']; } $parent_id = $row['topics_id']; if (!isset($first_id)) { $first_id = $row['topics_id']; } $last_id = $row['topics_id']; } $tree[$last_id]['next_id'] = $tree[$value]['next_id']; $tree[$value]['next_id'] = $first_id; $new_path .= '_'; } else { break; } } } tep_show_topic($first_topic_element); $info_box_contents = array(); $new_articles_string = ''; $all_articles_string = ''; if (DISPLAY_NEW_ARTICLES=='true') { if (SHOW_ARTICLE_COUNTS == 'true') { $articles_new_query = tep_db_query("select a.articles_id from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id, " . TABLE_ARTICLES_DESCRIPTION . " ad where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "' and a.articles_date_added > SUBDATE(now( ), INTERVAL '" . NEW_ARTICLES_DAYS_DISPLAY . "' DAY)"); $articles_new_count = ' (' . tep_db_num_rows($articles_new_query) . ')'; } else { $articles_new_count = ''; } if (strstr($_SERVER['PHP_SELF'],FILENAME_ARTICLES_NEW) or strstr($PHP_SELF,FILENAME_ARTICLES_NEW)) { $new_articles_string = '<b>'; } $new_articles_string .= '<a href="' . tep_href_link(FILENAME_ARTICLES_NEW, '', 'NONSSL') . '">' . BOX_NEW_ARTICLES . '</a>'; if (strstr($_SERVER['PHP_SELF'],FILENAME_ARTICLES_NEW) or strstr($PHP_SELF,FILENAME_ARTICLES_NEW)) { $new_articles_string .= '</b>'; } $new_articles_string .= $articles_new_count . '<br>'; } if (DISPLAY_ALL_ARTICLES=='true') { if (SHOW_ARTICLE_COUNTS == 'true') { $articles_all_query = tep_db_query("select a.articles_id from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id, " . TABLE_ARTICLES_DESCRIPTION . " ad where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "'"); $articles_all_count = ' (' . tep_db_num_rows($articles_all_query) . ')'; } else { $articles_all_count = ''; } if ($topic_depth == 'top') { $all_articles_string = '<b>'; } $all_articles_string .= '<a href="' . tep_href_link(FILENAME_ARTICLES, '', 'NONSSL') . '">' . BOX_ALL_ARTICLES . '</a>'; if ($topic_depth == 'top') { $all_articles_string .= '</b>'; } $all_articles_string .= $articles_all_count . '<br>'; } $info_box_contents = array(); $info_box_contents[] = array( 'align' => 'left', 'text' => $new_articles_string . $all_articles_string . $topics_string); new infoBox($info_box_contents); $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => tep_draw_separator('pixel_trans.gif', '100%', '1') ); new infoboxFooter($info_box_contents, true, true); ?> </td> </tr> <!-- topics_eof //--> <?php /* $Id: authors.php, v1.0 2003/12/04 12:00:00 ra Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ $authors_query = tep_db_query("select authors_id, authors_name from " . TABLE_AUTHORS . " order by authors_name"); if ($number_of_author_rows = tep_db_num_rows($authors_query)) { ?> <!-- authors //--> <tr> <td> <?php $info_box_contents = array(); // $info_box_contents[] = array('text' => BOX_HEADING_AUTHORS); $info_box_contents[] = array('text' => '<font color="' . $font_color . '">' . BOX_HEADING_AUTHORS . '</font>'); new infoBoxHeading($info_box_contents, false, false); if ($number_of_author_rows <= MAX_DISPLAY_AUTHORS_IN_A_LIST) { // Display a list $authors_list = ''; while ($authors = tep_db_fetch_array($authors_query)) { $authors_name = ((strlen($authors['authors_name']) > MAX_DISPLAY_AUTHOR_NAME_LEN) ? substr($authors['authors_name'], 0, MAX_DISPLAY_AUTHOR_NAME_LEN) . '..' : $authors['authors_name']); if (isset($HTTP_GET_VARS['authors_id']) && ($HTTP_GET_VARS['authors_id'] == $authors['authors_id'])) $authors_name = '<b>' . $authors_name .'</b>'; $authors_list .= '<a href="' . tep_href_link(FILENAME_ARTICLES, 'authors_id=' . $authors['authors_id']) . '">' . $authors_name . '</a><br>'; } $authors_list = substr($authors_list, 0, -4); $info_box_contents = array(); $info_box_contents[] = array('text' => $authors_list); } else { // Display a drop-down $authors_array = array(); if (MAX_AUTHORS_LIST < 2) { $authors_array[] = array('id' => '', 'text' => PULL_DOWN_DEFAULT); } while ($authors = tep_db_fetch_array($authors_query)) { $authors_name = ((strlen($authors['authors_name']) > MAX_DISPLAY_AUTHOR_NAME_LEN) ? substr($authors['authors_name'], 0, MAX_DISPLAY_AUTHOR_NAME_LEN) . '..' : $authors['authors_name']); $authors_array[] = array('id' => $authors['authors_id'], 'text' => $authors_name); } $info_box_contents = array(); $info_box_contents[] = array('form' => tep_draw_form('authors', tep_href_link(FILENAME_ARTICLES, '', 'NONSSL', false), 'get'), 'text' => tep_draw_pull_down_menu('authors_id', $authors_array, (isset($HTTP_GET_VARS['authors_id']) ? $HTTP_GET_VARS['authors_id'] : ''), 'onChange="this.form.submit();" size="' . MAX_AUTHORS_LIST . '" style="width: 100%" height="25"') . tep_hide_session_id()); } new infoBox($info_box_contents); $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => tep_draw_separator('pixel_trans.gif', '100%', '1') ); new infoboxFooter($info_box_contents, true, true); ?> </td> </tr> <!-- authors_eof //--> <?php } ?> Enjoy! Laurie
  2. neverfight

    Automatically send data feed to Froogle

    Calvin, You are most welcome. I am trying to work my way around to all of the people who've developed what I'm using. Slowly, but surely. :) Maybe if more osC users did, we'd have an even better system. Free is cool, but giving back is better. :D Thank you again for all of your efforts. Laurie "Man is a magnet, and every line and dot and detail of his experiences come by his own attraction." - Elizabeth Towne
  3. neverfight

    Automatically send data feed to Froogle

    LOL They ARE using a dart board. :rolleyes: Maybe the category depth is part of the problem then as mine are only 1 deep. Thank you for the insight! Laurie
  4. neverfight

    Automatically send data feed to Froogle

    Thanks for the quick reply. I will anxiously await the attribute pricing fix. :) As far as descriptions go, every page says exactly what the item is. The only thing I sell is tapestry products. And how they can get some of the categories I've seen is absolutely beyond me. Maybe a dart board. lol Why are so many people worried about category depth when Froogle won't even use the categories to start with? Just curious... Thanks, Laurie
  5. neverfight

    Automatically send data feed to Froogle

    I was wondering if anyone has managed to get the attribute price to pull. Currently I have quite a few products that are pulling 0.00. I can manually change them but it takes a while. Otherwise, it is an excellent contribution. Also, I was wondering if anyone else has had a problem with the product categories being changed by Froogle. I checked on mine about 2 weeks ago and they had changed all of my products to categories that were no where close to what I sent or that were even close to reality. I resent my feed and changed every single item to "home decor" and even many of those have changed. I saw one that's now entitled "Autographs & Writing". Any clues? Thanks, Laurie
  6. neverfight

    OrderCheck v 1.3 Released

    Gizmo, Do your 'small changes' make the new order number the highest available when it gets moved? If so, will you post what you changed or send me a copy of the file? Thanks, Laurie
  7. LOL That's why I said this solution worked for "ME". Not being a php whiz, that was the net result of a working solution and I did it. I have seen several posts from others who had the same problem but not once did I see an actual solution. I simply provided mine. Had I known that 'the bug that was not' was fixed in a later version, I would have checked it out. :D It is still a most excellent contribution. Laurie
  8. I have finally found a solution to the queue dilemma. For those of you who can't get the vouchers to queue: If you have "credit including tax" set to false replace this section in catalog\includes\modules\order_total\ot_gv.php function update_credit_account($i) { global $order, $customer_id, $insert_id, $REMOTE_ADDR; if (ereg('^GIFT', addslashes($order->products[$i]['model']))) { $gv_order_amount = ($order->products[$i]['final_price'] * $order->products[$i]['qty']); if ($this->credit_tax=='true') $gv_order_amount = $gv_order_amount * (100 + $order->products[$i]['tax']) / 100; $gv_order_amount = $gv_order_amount * 100 / 100;} if (MODULE_ORDER_TOTAL_GV_QUEUE == 'false') { // GV_QUEUE is false so release amount to account immediately $gv_query=tep_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . $customer_id . "'"); $customer_gv = false; $total_gv_amount = 0; if ($gv_result = tep_db_fetch_array($gv_query)) { $total_gv_amount = $gv_result['amount']; $customer_gv = true; } $total_gv_amount = $total_gv_amount + $gv_order_amount; if ($customer_gv) { $gv_update=tep_db_query("update " . TABLE_COUPON_GV_CUSTOMER . " set amount = '" . $total_gv_amount . "' where customer_id = '" . $customer_id . "'"); } else { $gv_insert=tep_db_query("insert into " . TABLE_COUPON_GV_CUSTOMER . " (customer_id, amount) values ('" . $customer_id . "', '" . $total_gv_amount . "')"); } } else { // GV_QUEUE is true - so queue the gv for release by store owner $gv_order_amount = ($order->products[$i]['final_price'] * $order->products[$i]['qty']); $gv_insert=tep_db_query("insert into " . TABLE_COUPON_GV_QUEUE . " (customer_id, order_id, amount, date_created, ipaddr) values ('" . $customer_id . "', '" . $insert_id . "', '" . $gv_order_amount . "', NOW(), '" . $REMOTE_ADDR . "')"); } } What I did: (Line numbers should be close...) Line 89 - added } because otherwise the entire section fell into the if ($this->credit_tax=='true') After line 106 inserted - $gv_order_amount = ($order->products[$i]['final_price'] * $order->products[$i]['qty']); because I couldn't get the amount itself to show up in the queue otherwise. Line 110 - removed } Also, there is a small typo in admin\includes\languages\english\qv_queue.php TEXT_REDEEM_COUPON_MESSAGE_HEADER should have 'and send the value via email to someone else.' not sent ;) Please note that this worked for ME. I am using 5.03. I hope it helps. Also, thank you to Ian and everyone who helped make this contribution. :D Laurie
  9. I installed it myself. I just read about an hour ago that Linda made a new version of SEC available with this mod. To tell you the truth, it was a pain to add. (If I'd only known. LOL) I was thinking about comparing her new one with mine. Maybe when I have time, I will re-modify her new version with the other mods I have already added. But since this is the only issue left, I was hoping to just fix it. I'm sure I must have missed something, I just don't know what. :unsure: Laurie
  10. re: "or when a customer buys one actually, they go into a queue to be approved if you have the queue set up. " Strider, And that is my problem. The queue is set to true but when a gv is purchased, nothing ever shows up there for me to approve. Am I missing something or just not understanding how this is supposed to work? :( I am using the latest version I found. 5.06 I believe it is. I also have Linda's SEC 1.0b3. The rest of it works fantastically. :D Thanks, Laurie
  11. I have seen several posts where people have not had anything show up in the gift queue but I have not seen an answer. That is the only problem I have left to fix. Yes, it is set to queue. There must be something I am missing. Any help would be greatly appreciated. Laurie
  12. neverfight

    Need BETA testers for new contribution

    I was wondering if you guys had any idea about when this contribution might be available. I would be willing to fight with it on my own if necessary. :unsure: Thanks, Laurie
  13. neverfight

    coolMenu

    QuickEnterprises, I would like to know how you managed to get coolmenu to stay within the infobox on your pages. I have tried the one on page 23 or 24 of this thread but in both IE and Netscape it returns negative locations. :? Thanks.
  14. neverfight

    CoolMenu appears above the header!

    I'm pretty sure that 'url' function was not supposed to work that way. LOL Sorry bout that.
  15. neverfight

    CoolMenu appears above the header!

    Yes, I know that, but ty. What I mean is when the infoboxes shift from one page to the next, coolmenu stays in the same location so the menu is no longer inside the infobox. Go to http://www.chameleonoutdoors.com/index.php and then click on a product. You will see the boxes themselves move but coolmenu does not... That is what I want to fix. I saw another post where someone said they got it to sit relatively in Netscape but not IE. The whole site looks like $*#( :( in Netscape as it is so I am hunting for an IE solution. Thanks Laurie://http://www.chameleonoutdoors.com/in... Thanks Laurie
×