Jump to content

blucollarguy

Members
  • Content count

    739
  • Joined

  • Last visited

Everything posted by blucollarguy

  1. blucollarguy

    Vendor_Auto_E-mail (In_Development)

    I had an error in the sql. in the "vendors" table, the file creates the column "`vendor_street_address` VARCHAR( 32 )," It should be " `vendor_street` VARCHAR( 32 )," If you already ran this sql simply change the name. Remove "_address" from the column name. I will fix this in an updated release. Any other problems? Let me know. Craig :D
  2. blucollarguy

    Vendor_Auto_E-mail (In_Development)

    A new update had been released. It is available now. Many additional features. Post any comments or problem here so we can all see what I did wrong. Download it with the link below. :D
  3. blucollarguy

    Vendor_Auto_E-mail (In_Development)

    ;) Hello to ya!. Your point is actually something I have on my list of options to build into this contribution. My thought had been the possibility that a particular vendor may not want to receive several e-mail orders every day. In that case one would want the ability to collect all orders to that particular vendor at "the end of the day" or whatever time was chosen, and send the order as one large order. I have not investigated the script requirement yet so I cannot offer you any guesses as to when it may be included. But keep an eye out for updates, since my schedule is erratic and I never quite know when I will have time to work on this contribution, although I do expect to post an update this weekend(July 3-4). Good luck and if anyone has any thing that might facilitate this or any other suggestion, please contact me. Craig
  4. blucollarguy

    Vendor_Auto_E-mail (In_Development)

    :D The email the Vendor gets is a little different from the actual receipt a customer receives. The big difference would be that there is no breakdown of the price, including shipping and taxes in the vendor_email. I have no need for my vendors to know exactly what prices I am getting. Of course they can check my site, but I did not think it was necessary info for them. Set up a test product and test vendor with your own e-mail address and you can see the output. It should do what you are asking for. If you need the price included let me know and I can send you the code mod for it, it was originaly included but I removed it. The next update will describe how to change it as well. I would like to get a little help from someone with more experience working with emails so I can incorporate easier email formatting. But for now, this is all I've got. Hope you can use it! Let me know what you think after you have had the chance to test it. :D
  5. blucollarguy

    Vendor_Auto_E-mail (In_Development)

    I have posted the e-mail portion of this today. WOOOHOOOO! This turned out to be much more difficult than I thought it would be, but I got it working on my site. I have not tested the emails to see how well they are picking up "products_options" but it worked with everything else I threw at it. I hope people get some use out of it, I know I will. I still have not worked out the bug where no info populates the fields in the vendors file whe editing. It's weird but I can't figure it out. I am hoping for more help from whoever get's the chance to work with it now that it is fully functional. I have more plans for this but for now, enjoy, and let us all know what you think. Thanks for the help and support, Craig. :rolleyes:
  6. blucollarguy

    Vendor_Auto_E-mail (In_Development)

    Getting close, worked out the sql problem, will test from my email server tonight and from host if I get results at home. Thanks for the luck, Mikey, I definitely need it! :blink: btw Has any here configured "sendmail" on Fedora Core 1? I am having trouble with it and would really like to keep testing on my home box. PM me if you can help. Maybe the config file from a running server would fix me up.
  7. blucollarguy

    Vendor_Auto_E-mail (In_Development)

    Okay, I have realized the reason for using "orders.php" from /admin/. Order status checking. If this file makes the call to the email function then it can be done at the time of payment confirmation. When "order_status" is updated to show "in process" the email flies off to the vendor. All that said, I think I am close, having a little sql syntax trouble calling to the "vendors" db. If any one thinks they might be able help me with this part let me know. Other than the entry fields not filling automatically when trying to "edit", it will functional once I get the sql call right. Wish me luck. :blink: The deeper I get into this the more I think I bit off a little more than I can chew, but I WILL NOT give up! Not my sryle. Thanks to all who have tried. btw-i took a bit of time to see how difficult the idea of using "vendor pricing" in the add products page and use a standard "markup" that would update all fields just like the update that takes place when you have a "tax class" selcted and I think I will release that in the my next update. Craig :unsure:
  8. blucollarguy

    Vendor_Auto_E-mail (In_Development)

    I thought so Matt, thanks. I searched through the contribs for Virtual Mail but found nothing. Can you provide a link or more info on it? I had already begun working through checkout_process as it is but any extra guidance would be a major plus! This is still quite new to me and I am flying by the seat of my pants, maybe a little too high! Thanks for the tip, Craig
  9. blucollarguy

    Vendor_Auto_E-mail (In_Development)

    The e-mail part is one of the things I am working on now. The code is much more complicated than I expected it to be, but with a little help we will get it working. Keep an eye out for it to be posted.
  10. blucollarguy

    Vendor_Auto_E-mail (In_Development)

    :huh: This is the script that I have modified in an attempt to send e-mails to the vendors. Have tested it and I get nothing, no errors, no mail, nothing. I tried to leave it in the orders.php file where the "manufacterers email" contrib had it. Can anyone tell what is wrong? :huh: //vendors_email begin function vendors_email($oID) { // Get the delivery address $delivery_address_query = tep_db_query("select distinct customers_company, customers_name, customers_street_address, customers_postcode, customers_city from orders where orders_id='" . $oID ."'") ; $delivery_address_list = tep_db_fetch_array($delivery_address_query) ; // Get all the vendors emails to be sent to // Must have an email address and have vendors_send_email set to 1 $vendors_email_query = tep_db_query("select distinct v.vendors_email, v.vendors_name FROM vendors, orders_products o, products p where p.vendors_id=v.vendors_id and p.products_id=o.products_id and o.orders_id='" . $oID . "' and v.vendors_send_email=1 ORDER BY v.vendors_id"); while ($vendors_email_list= tep_db_fetch_array($vendors_email_query)) { $the_email=$vendors_email_list['vendors_email']; $the_name=$vendors_email_list['vendors_name']; $email_message = '<br>To: <b>' . $the_name . '</b> Email: <b>' . $the_email . '</b><br><br> From: <b>' . STORE_NAME . '</b><br><br>Please deliver to:<br>' . $delivery_address_list['customers_company'] .'<br>' . $delivery_address_list['customers_name'] .'<br>' . $delivery_address_list['customers_street_address'] .'<br>' . $delivery_address_list['customers_postcode'] . '<br> ' . $delivery_address_list['customers_city'] . '<br>' ; // Get all the products for a vendor to be included in the email $vendors_email_products_query = tep_db_query("select o.orders_id, v.vendors_id, v.vendors_name, v.vendors_email, o.products_name, o.products_model, o.products_id, o.products_price, o.products_quantity, o.orders_products_id FROM vendors v, orders_products o, products p where p.vendors_id=v.vendors_id and o.products_id=p.products_id and o.orders_id='" . $oID . "' and v.vendors_email='" . $the_email . "' order by o.products_name"); $email_message = $email_message . '<table width="75%" border=1 cellspacing="0" cellpadding="0"> <tr><td>Qty:</td><td>Productname:</td><td>Productmodel:</td><td>Price:</td></tr>' ; while ($vendors_email_products= tep_db_fetch_array($vendors_email_products_query)) { $email_message = $email_message . '<tr><td>' . $vendors_email_products['products_quantity'] . '</td><td>' . $vendors_email_products['products_name'] . '</td><td>' . $vendors_email_products['products_model'] . '</td><td>' . $vendors_email_products['products_price'] . '</td></tr>'; $current_products_id=$vendors_email_products['orders_products_id']; $vendors_email_products_attributes_query = tep_db_query("select distinct opa.products_options_values from orders_products_attributes opa, orders o where opa.orders_id='" . $oID . "' and opa.orders_products_id='" .$current_products_id . "'"); while ($vendors_email_products_attributes= tep_db_fetch_array($vendors_email_products_attributes_query)) { $email_message = $email_message . '<tr><td> </td><td colspan=3>'. $vendors_email_products_attributes['products_options_values'] .'</td></tr>'; } $email_message = $email_message . '<br>'; } $email_message = $email_message . '</table><br><HR><br>'; //send the email tep_mail($the_name, $the_email, 'Customer order', $email_message, STORE_NAME, STORE_OWNER_EMAIL_ADDRESS) ; } return true; } //vendors_email end
  11. blucollarguy

    Vendor_Auto_E-mail (In_Development)

    Been working on the e-mail part. I am working from the old contrib "manufacterer_eamil" and Jon used the "orders.php " file to check order status and "manufacterer e-mail" on or off. But it looks to me that the order e-mails are being sent from "checkout_process.php". Can any one shed any light on this for me? :huh:
  12. blucollarguy

    Vendor_Auto_E-mail (In_Development)

    Anyone who has tried to work with this will have realized that I missed a few things in the "install". I have updated the "install" with a new post in the contrib. Fixes/Updates: 6-20-04 Forgot the links to vendors.php in catalog/admin/catalog.php Add a link to the vendors.php file in your catalog/admin/includes/boxes/catalog.php file //add link to vendors_email '<a href="' . tep_href_link(FILENAME_VENDORS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_VENDORS . '</a><br>' . I put mine right under the "manufacterers" link. Missed language definition in catalog/admin/includes/languages/english/catagories.php file //define vendors_email define('TEXT_PRODUCTS_VENDORS', 'Products Vendors');
  13. blucollarguy

    Vendor_Auto_E-mail (In_Development)

    I have posted it in the contribs, ti no. 2196, in the "other" category since I wasn't sure where else to put it. Thanks for the suggestion Matti, I am new to this and was not sure how to handle things. Let's keep this thread going with it, so we can document the things we are doing. :D
  14. blucollarguy

    Vendor_Auto_E-mail (In_Development)

    I put this package on my website for download. Contact me if you are interested and I can provide with a link. :D
  15. blucollarguy

    Vendor_Auto_E-mail (In_Development)

    I sent the request but have not heard back. I have packaged this whole thing if you are interested, let me know, I can email it to you if you want to play with it. I will keep working with it in the meantime.
  16. blucollarguy

    PHP experts, I need your help!

    I have gotten most of this working and am working with a few kind folks on this through the following thread now; http://forums.oscommerce.com/index.php?act=ST&f=11&t=98505
  17. <_< I am trying to get the contribution "Vendor e-mail" to work on MS2. I almost have it. A few problems are perplexing me. I am a php newbie, but I thinkk I have done pretty well. The point: to be able to enter all informatioin for all your vendors and be able to link them to their products individually, and them to be able to send them an e-mail with all the needed information for every order placed. Simple enough right? The problems: I have everything functional through Admin except for a few minor details. "Edit" and "Delete" won't do either. In fact, when clicking "edit" no information is pulled from the db. It is there. The "Delete" link is active, but does nothing to the db. I have taken the contibution and make many modifications. Using the "manufacterers" feature as a guide for me. Drop down to link to Vendor in "products" is there but no action to db. I have found many syntax changes that needed to be made to get most everything else to work, so I expect that this is the specific issue for these db problems. If I can get this last little bit working I will release this updated contribution. There are entries in the following files to support the "vendors" script page: filenames, databasetables, categories, and of course the language files. Here is the "vendors" script. (Is there a better way to post scripts?) Any help here will be greatly appreciated. I think a lot of people could get a lot of use out of this feature if I can get it working. Thansk for any help. vendors.php from catalog/admin/ <?php /* $Id: VENDORS.php,v 1.52 2003/03/22 02:44:55 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions ` http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); switch ($HTTP_GET_VARS['action']) { case 'insert': case 'save': $vendors_id = tep_db_prepare_input($HTTP_GET_VARS['vID']); $vendors_name = tep_db_prepare_input($HTTP_POST_VARS['vendors_name']); $vendors_email = tep_db_prepare_input($HTTP_POST_VARS['vendors_email']); $vendors_send_email = tep_db_prepare_input($HTTP_POST_VARS['vendors_send_email']); $vendors_phone1 = tep_db_prepare_input($HTTP_POST_VARS['vendors_phone1']); $sql_data_array = array('vendors_name' => $vendors_name, 'vendors_email' => $vendors_email, 'vendors_phone1' => $vendors_phone1, 'vendors_send_email' => $vendors_send_email); if ($HTTP_GET_VARS['action'] == 'insert') { $insert_sql_data = array('date_added' => 'now()'); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); tep_db_perform(TABLE_VENDORS, $sql_data_array); $vendors_id = tep_db_insert_id(); } elseif ($HTTP_GET_VARS['action'] == 'save') { $update_sql_data = array('last_modified' => 'now()'); $sql_data_array = tep_array_merge($sql_data_array, $update_sql_data); tep_db_perform(TABLE_VENDORS, $sql_data_array, 'update', "vendors_id = '" . tep_db_input($vendors_id) . "'"); } // THIS WAS THE OLD CODE if ($vendors_image = new upload('vendors_image', DIR_FS_CATALOG_IMAGES)) { tep_db_query("update " . TABLE_VENDORS . " set vendors_image = '" . $vendors_image->filename . "' where vendors_id = '" . tep_db_input($vendors_id) . "'"); } // THIS IS CODE TAKEN FROM $Id vendors.php, v1.51 2003/01/29 // $vendors_image = tep_get_uploaded_file('vendors_image'); // $image_directory = tep_get_local_path(DIR_FS_CATALOG_IMAGES); // if (is_uploaded_file($vendors_image['tmp_name'])) { // if (!is_writeable($image_directory)) { // if (is_dir($image_directory)) { // $messageStack->add_session(sprintf(ERROR_DIRECTORY_NOT_WRITEABLE, $/image_directory), 'error'); // } else { // $messageStack->add_session(sprintf(ERROR_DIRECTORY_DOES_NOT_EXIST, $image_directory), 'error'); // } // } else { // tep_db_query("update " . TABLE_VENDORS . " set vendors_image = '" . $vendors_image['name'] . "' where vendors_id = '" . tep_db_input($vendors_id) . "'"); // tep_copy_uploaded_file($vendors_image, $image_directory); // } // } // END INSERT $languages = tep_get_languages(); for ($i = 0, $n = sizeof($languages); $i < $n; $i++) { $vendors_url_array = $HTTP_POST_VARS['vendors_url']; $language_id = $languages[$i]['id']; $sql_data_array = array('vendors_url' => tep_db_prepare_input($vendors_url_array[$language_id])); if ($HTTP_GET_VARS['action'] == 'insert') { $insert_sql_data = array('vendors_id' => $vendors_id, 'languages_id' => $language_id); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); tep_db_perform(TABLE_VENDORS_INFO, $sql_data_array); } elseif ($HTTP_GET_VARS['action'] == 'save') { tep_db_perform(TABLE_VENDORS_INFO, $sql_data_array, 'update', "vendors_id = '" . tep_db_input($vendors_id) . "' and languages_id = '" . $language_id . "'"); } } if (USE_CACHE == 'true') { tep_reset_cache_block('vendors'); } tep_redirect(tep_href_link(FILENAME_VENDORS, (isset($HTTP_GET_VARS['page']) ? 'page=' . $HTTP_GET_VARS['page'] . '&' : '') . 'vID=' . $vendors_id)); break; case 'deleteconfirm': $vendors_id = tep_db_prepare_input($HTTP_GET_VARS['vID']); if (isset($HTTP_POST_VARS['delete_image']) && ($HTTP_POST_VARS['delete_image'] == 'on')) { $vendor_query = tep_db_query("select vendors_image from " . TABLE_VENDORS . " where vendors_id = '" . (int)$vendors_id . "'"); $vendor = tep_db_fetch_array($vendor_query); $image_location = DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG_IMAGES . $vendor['vendors_image']; if (file_exists($image_location)) @unlink($image_location); } tep_db_query("delete from " . TABLE_VENDORS . " where vendors_id = '" . (int)$vendors_id . "'"); tep_db_query("delete from " . TABLE_VENDORS_INFO . " where vendors_id = '" . (int)$vendors_id . "'"); if (isset($HTTP_POST_VARS['delete_products']) && ($HTTP_POST_VARS['delete_products'] == 'on')) { $products_query = tep_db_query("select products_id from " . TABLE_PRODUCTS . " where vendors_id = '" . (int)$vendors_id . "'"); while ($products = tep_db_fetch_array($products_query)) { tep_remove_product($products['products_id']); } } else { tep_db_query("update " . TABLE_PRODUCTS . " set vendors_id = '' where vendors_id = '" . (int)$vendors_id . "'"); } if (USE_CACHE == 'true') { tep_reset_cache_block('vendors'); } tep_redirect(tep_href_link(FILENAME_VENDORS, 'page=' . $HTTP_GET_VARS['page'])); break; } ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <script language="javascript" src="includes/general.js"></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_VENDORS; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_EMAIL; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_PHONE1; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_SEND_EMAIL; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php $vendors_query_raw = "select vendors_id, vendors_name, vendors_email, vendors_phone1, vendors_image, date_added, last_modified, vendors_send_email from " . TABLE_VENDORS . " order by vendors_name"; $vendors_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $vendors_query_raw, $vendors_query_numrows); $vendors_query = tep_db_query($vendors_query_raw); while ($vendors = tep_db_fetch_array($vendors_query)) { if (((!$HTTP_GET_VARS['vID']) || (@$HTTP_GET_VARS['vID'] == $vendors['vendors_id'])) && (!$vINFO) && (substr($HTTP_GET_VARS['action'], 0, 3) != 'new')) { $vendors_products_query = tep_db_query("select count(*) as products_count from " . TABLE_PRODUCTS . " where vendors_id = '" . $vendors['vendors_id'] . "'"); $vendors_products = tep_db_fetch_array($vendors_products_query); $vInfo_array = array_merge($vendors, $vendors_products); $vInfo = new objectInfo($vInfo_array); } if ( (is_object($vINFO)) && ($vendors['vendors_id'] == $vINFO->vendors_id) ) { echo ' <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . tep_href_link(FILENAME_VENDORS, 'page=' . $HTTP_GET_VARS['page'] . '&vID=' . $vendors['vendors_id'] . '&action=edit') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . tep_href_link(FILENAME_VENDORS, 'page=' . $HTTP_GET_VARS['page'] . '&vID=' . $vendors['vendors_id']) . '\'">' . "\n"; } ?> <td class="dataTableContent"><?php echo $vendors['vendors_name']; ?></td> <td class="dataTableContent"><?php echo $vendors['vendors_email']; ?></td> <td class="dataTableContent"><?php echo $vendors['vendors_phone1']; ?></td> <td class="dataTableContent"><?php echo $vendors['vendors_send_email']; ?></td> <td class="dataTableContent" align="right"><?php if ( (is_object($vINFO)) && ($vendors['vendors_id'] == $vINFO->vendors_id) ) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif'); } else { echo '<a href="' . tep_href_link(FILENAME_VENDORS, 'page=' . $HTTP_GET_VARS['page'] . '&vID=' . $vendors['vendors_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td> </tr> <?php } ?> <tr> <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText" valign="top"><?php echo $vendors_split->display_count($vendors_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_VENDORS); ?></td> <td class="smallText" align="right"><?php echo $vendors_split->display_links($vendors_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page']); ?></td> </tr> </table></td> </tr> <?php if ($HTTP_GET_VARS['action'] != 'new') { ?> <tr> <td align="right" colspan="2" class="smallText"><?php echo '<a href="' . tep_href_link(FILENAME_VENDORS, 'page=' . $HTTP_GET_VARS['page'] . '&vID=' . $vINFO->vendors_id . '&action=new') . '">' . tep_image_button('button_insert.gif', IMAGE_INSERT) . '</a>'; ?></td> </tr> <?php } ?> </table></td> <?php $heading = array(); $contents = array(); switch ($HTTP_GET_VARS['action']) { case 'new': $heading[] = array('text' => '<b>' . TEXT_HEADING_NEW_VENDOR . '</b>'); $contents = array('form' => tep_draw_form('vendors', FILENAME_VENDORS, 'action=insert', 'post', 'enctype="multipart/form-data"')); $contents[] = array('text' => TEXT_NEW_INTRO); $contents[] = array('text' => '<br>' . TEXT_VENDORS_NAME . '<br>' . tep_draw_input_field('vendors_name')); $contents[] = array('text' => '<br>' . TEXT_VENDORS_PHONE1 . '<br>' . tep_draw_input_field('vendors_phone1')); $contents[] = array('text' => '<br>' . TEXT_VENDORS_EMAIL . '<br>' . tep_draw_input_field('vendors_email')); $contents[] = array('text' => '<br>' . TEXT_VENDORS_SEND_EMAIL . '<br>' . tep_draw_input_field('vendors_send_email')); $contents[] = array('text' => '<br>' . TEXT_VENDORS_IMAGE . '<br>' . tep_draw_file_field('vendors_image')); $vendors_inputs_string = ''; $languages = tep_get_languages(); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $vendors_inputs_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('vendors_url[' . $languages[$i]['id'] . ']'); } $contents[] = array('text' => '<br>' . TEXT_VENDORS_URL . $vendors_inputs_string); $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . tep_href_link(FILENAME_VENDORS, 'page=' . $HTTP_GET_VARS['page'] . '&vID=' . $HTTP_GET_VARS['vID']) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; case 'edit': $heading[] = array('text' => '<b>' . TEXT_HEADING_EDIT_VENDOR . '</b>'); $contents = array('form' => tep_draw_form('vendors', FILENAME_VENDORS, 'page=' . $HTTP_GET_VARS['page'] . '&vID=' . $vINFO->vendors_id . '&action=save', 'post', 'enctype="multipart/form-data"')); $contents[] = array('text' => TEXT_EDIT_INTRO); $contents[] = array('text' => '<br>' . TEXT_VENDORS_NAME . '<br>' . tep_draw_input_field('vendors_name', $vINFO->vendors_name)); $contents[] = array('text' => '<br>' . TEXT_VENDORS_PHONE1 . '<br>' . tep_draw_input_field('vendors_phone1', $vINFO->vendors_phone1)); $contents[] = array('text' => '<br>' . TEXT_VENDORS_EMAIL . '<br>' . tep_draw_input_field('vendors_email', $vINFO->vendors_email)); $contents[] = array('text' => '<br>' . TEXT_VENDORS_SEND_EMAIL . '<br>' . tep_draw_input_field('vendors_send_email',$vINFO->vendors_send_email)); $contents[] = array('text' => '<br>' . TEXT_VENDORS_IMAGE . '<br>' . tep_draw_file_field('vendors_image') . '<br>' . $vINFO->vendors_image); $vendors_inputs_string = ''; $languages = tep_get_languages(); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $vendor_inputs_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('vendors_url[' . $languages[$i]['id'] . ']', tep_get_vendor_url($vInfo->vendors_id, $languages[$i]['id'])); } $contents[] = array('text' => '<br>' . TEXT_VENDORS_URL . $vendor_inputs_string); $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . tep_href_link(FILENAME_VENDORS, 'page=' . $HTTP_GET_VARS['page'] . '&vID=' . $vInfo->vendors_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; case 'delete': $heading[] = array('text' => '<b>' . TEXT_HEADING_DELETE_VENDOR . '</b>'); $contents = array('form' => tep_draw_form('vendors', FILENAME_VENDORS, 'page=' . $HTTP_GET_VARS['page'] . '&vID=' . $vInfo->vendors_id . '&action=deleteconfirm')); $contents[] = array('text' => TEXT_DELETE_INTRO); $contents[] = array('text' => '<br><b>' . $vInfo->vendors_name . '</b>'); $contents[] = array('text' => '<br>' . tep_draw_checkbox_field('delete_image', '', true) . ' ' . TEXT_DELETE_IMAGE); if ($vInfo->products_count > 0) { $contents[] = array('text' => '<br>' . tep_draw_checkbox_field('delete_products') . ' ' . TEXT_DELETE_PRODUCTS); $contents[] = array('text' => '<br>' . sprintf(TEXT_DELETE_WARNING_PRODUCTS, $vInfo->products_count)); } $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . tep_href_link(FILENAME_VENDORS, 'page=' . $HTTP_GET_VARS['page'] . '&vID=' . $vInfo->vendors_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; default: if (isset($vInfo) && is_object($vInfo)) { $heading[] = array('text' => '<b>' . $vInfo->vendors_name . '</b>'); $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_VENDORS, 'page=' . $HTTP_GET_VARS['page'] . '&vID=' . $vInfo->vendors_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_VENDORS, 'page=' . $HTTP_GET_VARS['page'] . '&vID=' . $vInfo->vendors_id . '&action=delete') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a>'); $contents[] = array('text' => '<br>' . TEXT_DATE_ADDED . ' ' . tep_date_short($vInfo->date_added)); if (tep_not_null($vInfo->last_modified)) $contents[] = array('text' => TEXT_LAST_MODIFIED . ' ' . tep_date_short($vInfo->last_modified)); $contents[] = array('text' => '<br>' . tep_info_image($vInfo->vendors_image, $vInfo->vendors_name)); $contents[] = array('text' => '<br>' . TEXT_PRODUCTS . ' ' . $vInfo->products_count); } break; } if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box; echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; } ?> </tr> </table></td> </tr> </table></td> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
  18. blucollarguy

    Vendor_Auto_E-mail (In_Development)

    I have gotten most of this working and am working with a few kind folks on this through the following thread now; http://forums.oscommerce.com/index.php?act=ST&f=11&t=98505
  19. blucollarguy

    Vendor_Auto_E-mail (In_Development)

    Yes, I think so. I assume you referring to: echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_VENDORS, 'page=' . $HTTP_GET_VARS['page'] . '&vID=' . $vendors['vendors_id'] . '&action=edit') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_VENDORS, 'page=' . $HTTP_GET_VARS['page'] . '&vID=' . $vendors['vendors_id']) . '\'">' . "\n"; Something like this? Is this right?
  20. blucollarguy

    Vendor_Auto_E-mail (In_Development)

    I have posted a few requests for help finishing off a mod I have been working on but haven't gotten any responses. So, I am wondering if it is simply that noone is interested in this mod, or if I should handle it differently. What is it? I thought the "manufacterer_email" contrib from John Croson, from June of last year was exactly what I needed to handle my many different vendors for all my products. Of course, I needed to be able change the "manufacterers" to "vendors", but I figured that would be no big deal. LOL! I had no idea how much of the code would have to be updated. Anyway, I have it working now! It is a separate add-on to the "add/edit products" page that allows you to link each product individually to a specififc vendor. The vendors are editable through Admin. I have not fully tested the auto send e-mail function yet, but everything else has been fully tested and works except for one little thing. When you click to "edit" a vendor that has been entered, none of the info fields get filled in. So, I need some help from someone with more knowledge and experience with the coding, shouldn't be hard to do since I am quite new to this stuff. I have more plans for this mod and want to be able to offer to all as a working contribution. Any suggestions would be greatly appreciated. Future plans: Add "Vendor Price" to product pages so that one could preset a % or flat rate markup and always be able to see the actual "vendor" price is, integrate this with sales and tax accounting, get the "multi-vendor shipping" conrib to work with this mod, and many other ideas. If you would like to help in any way please let me know. *Download*
  21. blucollarguy

    PayPal IPN not quite working

    Okay!!!!!! Just so anybody knows, if anybody cares, I finally got it working. PayPal IPN that is. I went back through my code and found one spot where I did not handle it right. So after redoing everything and screwing up my site even worse, I was able to go back step by step and replace all the effected files again. Trick was, my ftp client was apparently not doing a good job of uploading because I had to use the ftp tool in my php editor in order to get everything working. Pretty screwed up huh? Any way, it works and it is cool. :P
  22. I need some help with PP IPN. I am not inept, but fairly new to osCommerce and php. I have installed PP IPN ver 2.2 and when run the test from the "Test Page" I do receive an IPN post in my admin, BUT, it does not update the order. Ok, fine, I can deal with that, at least I can see that PP has received payment, BUT, when I do a test purchase I get no post and the redirect drops me with a blank page with the http address line being http://www.blucollarsales.com/checkout_suc...cess&tx=(string of a lot of stuff, which tells me that PP is sending the information to me, but it is not being handled properly from my server). I have seen in these forums that one cannot use PP's auto return if you are using IPN. Is that true? It doesn't seem quite right, since even without auto-return there is link to go back to the "checkout_success" page, which it should. Any ideas as to what I may have done wrong. This along with Multi-Vendor-Ship mod are the only 2 of many mods I have installed(and been able to troubleshoot and get working on my own) that I have not been able to figure out. If any one can help, please do. <_<
×