Jump to content

cmichalski

Members
  • Content count

    19
  • Joined

  • Last visited

Profile Information

  • Real Name
    Craig Michalski
  1. Jack, Thanks for your reply it was a IIS thing and none us will ever understand... I restarted IIS server after making changes to the httpd.ini file it seems everytime I make a change I have to restart IIS to have it re-read the file which its like its a cache which is wierd but oh well thats the way its works on mine IIS 6.0.... Thanks again really appreciate the support and contributions to keep this the cart around.....
  2. Okay here we go I have been at this for hours looking for my answer. Problem is I can not add products to the shopping cart when SEOs are turned on... Turned off site works great.... Here is the example of my url and button add to cart with SEOs turned on http://test.obteamsports.com/batters-face-buard-with-blackout-technology-p-1266.html?action=add_product <--- does not work just sends me back to my product page <form name="cart_quantity" action="http://test.obteamsports.com/batters-face-buard-with-blackout-technology-p-1266.html?action=add_product" method="post"> <---- View Source Output SEOs turned off I get this which works fine.... http://test.obteamsports.com/product_info.php?products_id=1266&action=add <--- add to cart link <form name="cart_quantity" action="http://test.obteamsports.com/product_info.php?products_id=1266&action=add_product" method="post"> <-- View source Now I am running this on a WINDOWS BOX using Helicon Rewrite Below is my httpd.ini code RewriteRule ^(.*)-c-(.*).html$ /index.php\?cPath=$2 RewriteRule ^(.*)-c-(.*).html\?(.*)$ /index.php\?cPath=$2&$3 RewriteRule ^(.*)-p-(.*).html$ /product_info.php\?products_id=$2 RewriteRule ^(.*)-p-(.*).html\?(.*)$ /product_info.php\?products_id=$2&$3 RewriteRule ^(.*)-m-(.*).html$ /index.php\?manufacturers_id=$2 RewriteRule ^(.*)-pi-(.*).html$ /popup_image.php\?pID=$2 RewriteRule ^(.*)-pi-(.*).html\?(.*)$ /popup_image.php\?pID=$2&$3 RewriteRule ^(.*)-t-(.*).html$ /articles.php\?tPath=$2 RewriteRule ^(.*)-a-(.*).html$ /article_info.php\?articles_id=$2 RewriteRule ^(.*)-pr-(.*).html$ /product_reviews.php\?products_id=$2 RewriteRule ^(.*)-pr-(.*).html\?(.*)$ /product_reviews.php\?products_id=$2&$3 RewriteRule ^(.*)-pri-(.*).html$ /product_reviews_info.php\?products_id=$2 RewriteRule ^(.*)-pri-(.*).html\?(.*)$ /product_reviews_info.php\?products_id=$2&$3 RewriteRule ^(.*)-pri-(.*).html\?(.*)$ /product_reviews.php\?products_id=$2&$3 RewriteRule ^(.*)-i-(.*).html$ /information.php\?info_id=$2 any help or point in the right direction would be very greatful.... I am so close I can taste it.... Thanks, Craig
  3. cmichalski

    [Contribution] oscThumb

    Well I have still been working on this and it seems possible that the oscthumbs is point to the wrong path for the cached pics does this seem correct or incorrect I have my cache located default catalog/phpthumb/cache/ Below is what I get from view source... which it appears it looking in my old source catlog/images/ directory <td class="infoBoxContents"><center><a href="http://test.obteamsports.com/product_info.php?products_id=1265"><img src="oscthumb.php?src=/images/RIP-IT/2_sm.jpg&w=67&h=100&f=jpg&q=95&hash=37702b0e3864c303bbbfeea7ee5433f9" w="67" h="100" border="0" alt="NEW! RIP-IT DEFENSE WITH BLACKOUT TECHNOLOGY" title="NEW! RIP-IT DEFENSE WITH BLACKOUT TECHNOLOGY"> Heck I don't know I a still fishing........ Any help would be awesome !!!!!!!!!!!!!!!!!
  4. cmichalski

    [Contribution] oscThumb

    Looking for some assistance on this Contribution OSCThumb I have installed this 2 times with the same success. here is a reference to what I am dealing with oscthumb problems no image Well my temp directory is being filled with all the image so GD is working well the hash being is there but I am having problem seeing if the it being sent the correct path to load the images. I have been reading and trying this like the cache control...seo...phpthumb.config...$PHPTHUMB_CONFIG['nohotlink_enabled'] all these with no luck. So any help would be great....I have turned on all error reporting in php no luck there no errors... I am going crazy as I never been whooped by contrib till now.... Thanks, Craig
  5. OMG I can't believe I have passed this contribution up !!!! Perfect out of the box easy install !!!! Awesome you don't know how much this will make life easier... LOL Its great thanks Nate Welch mloeffen homewetbar and I am sure many others for your work on this contribution...
  6. cmichalski

    Multi_Vendor_Shipping new thread

    You know when its Friday its the end of the work week.... And I can finally say that MVS is ready for deployment. All the errors that I had with the install of MVS where all me. All I can say all is thanks Craig (BlueCollarGuy) for all your help I have learned more about OSC during this install than ever ! Now I have the itch to learn PHP more. Again thanks alot and I hope to help out in the future to further the development of MVS its a great contribution to OSC... The Other Craig
  7. cmichalski

    NEWBIE needs help...Canada post installation

    Nim, If you have osCommerce then you have MS1 or MS2 no you may have a cart that was hacked by Zen or CreLoaded or Drupo or something like that... Ussually it will say at the footer unless someone removed the Oscommerce Copyright... Other than that open a few of your file in a notepad or something like that and the at the very top of each file will have Version and Rev # Craig
  8. cmichalski

    Multi_Vendor_Shipping new thread

    Okay Craig thanks again....Your a good guy.... I'd buy you a beer or two hell a case or something if you lived near cinci ohio. That fixed it right up bullseye.... Well just when I thought I was out of hot water I am back in it..... I hate wear out my welcome but I can't seem to figure this one out either.... Here it goes..... When I goto confirm check out I get all my info on that page displays perfectly then when I hit the confirm button it used to send emails and add the order to the db.. I have tried to dbug this variable but it says its not a variable so I can't get any output.... Warning: reset() [function.reset]: Passed variable is not an array or object in C:\Inetpub\www.2dts.com\test3\catalog\includes\modules\order_total\ot_tax.php on line 29 Warning: Variable passed to each() is not an array or object in C:\Inetpub\www.2dts.com\test3\catalog\includes\modules\order_total\ot_tax.php on line 30 Warning: mail() [function.mail]: SMTP server response: 550 5.1.1 <> User unknown; rejecting in C:\Inetpub\www.2dts.com\test3\catalog\includes\classes\email.php on line 502 Warning: Cannot modify header information - headers already sent by (output started at C:\Inetpub\www.2dts.com\test3\catalog\includes\modules\order_total\ot_tax.php:29) in C:\Inetpub\www.2dts.com\test3\catalog\includes\functions\general.php on line 29 Goto I goto line 29 function process() { global $order, $currencies; reset($order->info['tax_groups']); while (list($key, $value) = each($order->info['tax_groups'])) { if ($value > 0) { $this->output[] = array('title' => $key . ':', 'text' => $currencies->format($value, true, $order->info['currency'], $order->info['currency_value']), 'value' => $value); } I have searched in all files under my catalog and find I get this rejext email Delivery unsuccessful: Unknown recipient <> Unknown recipient: <> from: <cmichalski@2dts.com> Mail has been rejected or forwarded Which also tells me that the variable is empty !!!! This the $order->info['tax_groups'] So I guess I am loosing array $order some how any idea out there ???? Thnaks The Other Craig
  9. cmichalski

    Multi_Vendor_Shipping new thread

    New Problem when ordering multiple items they are not being sorted out by vendor id because vendor ID does not exist in my array $products here is the output of that array. Does anyone know when this array is started. I assume when you add to cart but I have checked looks like its all good there.... Any help would be great !!! Array ( [0] => Array ( [id] => 837{1}2 [name] => Field Rake [model] => [image] => Field%20Grooming/1162%20Field%20Rake%20copy_sm.jpg [price] => 41.9900 [quantity] => 1 [weight] => 20.00 [final_price] => 45.99 [tax_class_id] => 1 [vendors_id] => [vendors_name] => [attributes] => Array ( [1] => 2 ) [eligible_discounts] => 0 [education_discount] => 0.00 [government_discount] => 0.00 [gsa_pricing] => 0 [1] => Array ( [products_options_name] => SIZE [options_values_id] => 2 [products_options_values_name] => 36" Rake [options_values_price] => 4.0000 [price_prefix] => + ) ) [1] => Array ( [id] => 835 [name] => 10" GAME MOUND [model] => 70005 [image] => Mounds/10%20Game%20Mound_sm.jpg [price] => 2399.0000 [quantity] => 1 [weight] => 200.00 [final_price] => 2399 [tax_class_id] => 1 [vendors_id] => [vendors_name] => [attributes] => [eligible_discounts] => 0 [education_discount] => 0.00 [government_discount] => 0.00 [gsa_pricing] => 0 ) ) this is to dbug the shipping selections: Oh yeah and I went in and looked and my products table and all my vendor info for each product is assign correctly.... I assume when is see this being blank its not good [tax_class_id] => 1 [vendors_id] => [vendors_name] => [attributes] => [eligible_discounts] => 0 Thanks, The other Craig
  10. cmichalski

    Multi_Vendor_Shipping new thread

    SOLUTION or SOMETHING ... After your great idea of spilling the ARRAY onto the screen I strated thinking okay why?? Of course... Well when writing the module I saved it as con-way.php right well it would not even show up in the vendor option to assign to that customer ??? Okay so I renamed it like ever file in oScommerce....to con_way.php... So I named my class and function and constants to con_way.... Changed them to conway and BINGO my ARRAY are now being passed to checkout_payment.php hmmm Just thought I would let you all know I got it.. And Thanks Craig for the debug'n tips....And your quick response... I have read many hours on here you and few others are so patient for what 2 years now on this contribution... No on to the next bug that I have.... I am going to work with it before I post to get full knowledge.... Thanks again me so happy, The other Craig
  11. cmichalski

    Multi_Vendor_Shipping new thread

    MVS Gods (HELP PLEASE) Okay here it goes I have installed MVS somewhat successfull... I have even changed FXFreight shipping module woohoo and it worked... So I decided to use FXFreight shipping module for a CON-WAY Freight shipping module... Okay well it works SORT OF... I get my shipping and handling charges all the good stuff shows up on the order page BUT when I select it radio button I get the NASTY ERROR_NO_SHIPPING_SELECTED_SELECTED but it is.... I have the FXFREIGHT mdule turned on it works fine... I have compared and compared the core script is almost Identical... Can anyone point me in the right direction on what is not being passed.... HERE IS MY SCRIPT (don't laugh to hard I can't program very good) Some stuff is hardcoded for fuctionality purposes <?php /* $Id: fedex_freight.php,v 0.7 2007/01/19 Brian Burton brian@dynamoeffects.com Exp $ This module is for use with FedEx's freight shipping service, not with their regular shipping service. Copyright © 2005 Brian Burton - brian@dynamoeffects.com Released under the GNU General Public License */ class con_way { var $code, $title, $description, $icon, $enabled; // class constructor function con_way() { global $order; $this->code = 'con_way'; $this->title = MODULE_SHIPPING_CONWAY_TEXT_TITLE; $this->description = MODULE_SHIPPING_CONWAY_TEXT_DESCRIPTION; $this->icon = 'image.gif'; } // MVS ADD function sort_order($vendors_id='1') { $sort_order = @constant ('MODULE_SHIPPING_CONWAY_SORT_ORDER_' . $vendors_id); if (isset ($sort_order)) { $this->sort_order = $sort_order; } else { $this->sort_order = '0'; } return $this->sort_order; } function tax_class($vendors_id='1') { $this->tax_class = constant('MODULE_SHIPPING_CONWAY_TAX_CLASS_' . $vendors_id); return $this->tax_class; } function enabled($vendors_id='1') { $this->enabled = false; $status = @constant('MODULE_SHIPPING_CONWAY_STATUS_' . $vendors_id); if (isset ($status) && $status != '') { $this->enabled = (($status == 'True') ? true : false); } if ( ($this->enabled == true) && ((int)constant('MODULE_SHIPPING_CONWAY_ZONE_' . $vendors_id) > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . (int)constant('MODULE_SHIPPING_CONWAY_ZONE_' . $vendors_id) . "' and zone_country_id = '" . $this->delivery_country_id . "' order by zone_id"); while ($check = tep_db_fetch_array($check_query)) { if ($check['zone_id'] < 1) { $check_flag = true; break; } elseif ($check['zone_id'] == $this->delivery_zone_id) { $check_flag = true; break; } } if ($check_flag == false) { $this->enabled = false; }//if }//if return $this->enabled; } function zones($vendors_id='1') { if ( ($this->enabled == true) && ((int)constant('MODULE_SHIPPING_CONWAY_ZONE_' . $vendors_id) > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . (int)constant('MODULE_SHIPPING_CONWAY_ZONE_' . $vendors_id) . "' and zone_country_id = '" . $this->delivery_country_id . "' order by zone_id"); while ($check = tep_db_fetch_array($check_query)) { if ($check['zone_id'] < 1) { $check_flag = true; break; } elseif ($check['zone_id'] == $this->delivery_zone_id) { $check_flag = true; break; } } if ($check_flag == false) { $this->enabled = false; } } return $this->enabled; } // class methods function quote($method = '', $module = '', $vendors_id = '1') { global $order, $cart; $error_msg = ''; //First, we get the customer's zipcode and country in the right format. $dest_zip = str_replace(" ", "", $order->delivery['postcode']); $dest_country = $order->delivery['country']['iso_code_2']; if ($dest_country == 'US') { $dest_zip = substr($dest_zip, 0, 5); } elseif ($dest_country == 'CA') { $dest_zip = substr($dest_zip, 0, 6); } else { $error_msg = '<br>' . constant('MODULE_SHIPPING_CONWAY_TEXT_ERROR_BAD_COUNTRY_' . $vendors_id); } if ($error_msg == '') { /* Now, build an array of URLs to call. Their server only allows 4 items * at a time, so this section will build multiple calls if necessary to * get a full quote. */ $today = date("m/d/y"); $requestUrl = "https://www.Con-way.com/XMLj/X-Rate"; $requestType = "RateRequest"; $origzip = constant('MODULE_SHIPPING_CONWAY_SHIP_ZIP_' . $vendors_id); $acctnmbr = constant('MODULE_SHIPPING_CONWAY_ACCT_NUM_' . $vendors_id); $username = constant('MODULE_SHIPPING_CONWAY_USERNAME_' .$vendors_id); $password = constant('MODULE_SHIPPING_CONWAY_PASSWORD_' .$vendors_id); $discrate = constant('MODULE_SHIPPING_CONWAY_PERCENT_' .$vendors_id); $dest_zip = str_replace(' ', '', $order->delivery['postcode']); $base_URL = "<RateRequest>" . "<OriginZip country=\"us\">$origzip</OriginZip>" . "<DestinationZip country=\"us\">$dest_zip</DestinationZip>" ; $base_URL .= "<CustNmbr shipcode=\"S\">$acctnmbr</CustNmbr>" . "<ChargeCode>P</ChargeCode>" . "<DiscountRate>$discrate</DiscountRate>" . "<EffectiveDate>$today</EffectiveDate>"; $base_URL = urlencode($base_URL); //Get the shopping cart contents $products = $cart->get_products(); $url_attr = ''; $x = 1; $cnw_urls = array(); $n = sizeof($products); for ($i=0; $i<$n; $i++) { $prod_query = tep_db_query("SELECT products_CNW_class, products_CNW_desc FROM " . TABLE_PRODUCTS . " WHERE products_id = '".$products[$i]['id']."'"); $prod_info = tep_db_fetch_array($prod_query); //class, weight, pcs, descr, nmfc, haz, freezable $discrate = constant('MODULE_SHIPPING_CONWAY_PERCENT_' . $vendors_id); $ract = constant('MODULE_SHIPPING_CONWAY_RACT_' . $vendors_id); $productclass = $prod_info['products_CNW_class']; $url_attr .= "<Item>" . "<CmdtyClass>$productclass</CmdtyClass>"; $productweight = $products[$i]['quantity'] * (int)$products[$i]['weight']; $url_attr .= "<Weight unit=\"lbs\">$productweight</Weight>" . "</Item>"; $url_attr .= "<Accessorial>$ract</Accessorial>" ; $url_attr .= "</RateRequest>"; $url_attr = urlencode($url_attr); //4 is the maximum number of products that Con-Way will take at a time. if ($x >= 4) { $cnw_urls[] = array('pcs' => '4', 'url' => $base_URL . $url_attr); $x = 1; $url_attr = ''; } else { $x++; } } if ($url_attr != '') $cnw_urls[] = array('pcs' => $x - 1, 'url' => $base_URL . $url_attr); $total_shipping_price = 0; //URL array is finished, now start calling COn-Way $n = sizeof($cnw_urls); for ($i=0; $i<$n; $i++) { $ship_price = $this->getCNWQuote($cnw_urls[$i]['url']); if (!$ship_price) { $error_msg .= '<br>' . MODULE_SHIPPING_CONWAY_TEXT_ERROR_BAD_RESPONSE. '<br>' . $cnw_urls[$i]['url']; break; } $total_shipping_price += $ship_price + ((float) constant('MODULE_SHIPPING_CONWAY_HANDLING_' . $vendors_id) * $cnw_urls[$i]['pcs']); } } if (!$error_msg) { $vendors_data_query = tep_db_query("select handling_charge, handling_per_box, vendor_country from " . TABLE_VENDORS . " where vendors_id = '" . (int)$vendors_id . "'" ); $vendors_data = tep_db_fetch_array($vendors_data_query); $country_name = tep_get_countries($vendors_data['vendor_country'], true); $handling_charge = $vendors_data['handling_charge']; $handling_per_box = $vendors_data['handling_per_box']; if ($handling_charge > $handling_per_box*$shipping_num_boxes) { $handling = $handling_charge; } else { $handling = $handling_per_box*$shipping_num_boxes; } $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_CONWAY_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_CONWAY_TEXT_WAY, 'cost' => $total_shipping_price + handling))); if ($this->tax_class > 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title); } else { switch (constant('MODULE_SHIPPING_CONWAY_ERROR_ACTION_' .$vendors_id)) { case 'Email': if (tep_session_is_registered('customer_first_name') && tep_session_is_registered('customer_id')) { $error_msg_heading = 'This error log was generated when customer ' . $_SESSION['customer_first_name'] . ' (Customer ID: ' . $_SESSION['customer_id'] . ') checked out on ' . date('Y-m-d H:i') . ": \r\n\r\n"; } tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, 'FedEx Freight Error Log ' . date('Y-m-d H:i'), $error_msg_heading . $error_msg , STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); case 'None': $error_msg = ''; break; } $this->quotes = array('module' => $this->title, 'error' => MODULE_SHIPPING_CONWAY_TEXT_ERROR_DESCRIPTION , $error_msg); } return $this->quotes; } function getCNWQuote($url) { mail('cmichalski@2dts.com','CONWAY rate quote request',$url,'From: <cmichalski@2dts.com>'); $requestUrl = "https://www.Con-way.com/XMLj/X-Rate"; $requestType = "RateRequest"; $username = "test"; $password = "test"; $urlConn = curl_init ($requestUrl); curl_setopt ($urlConn, CURLOPT_POST, 1); curl_setopt ($urlConn, CURLOPT_SSL_VERIFYPEER, false); // May be needed for SSL behind a firewall curl_setopt ($urlConn, CURLOPT_HTTPHEADER, array("Content-type: application/x-www-form-urlencoded")); curl_setopt ($urlConn, CURLOPT_USERPWD, $username.":".$password); curl_setopt ($urlConn, CURLOPT_POSTFIELDS, "$requestType=$url"); // Get the XML Response // prevent the buffer from being displayed ob_start(); curl_exec($urlConn); $url = ob_get_contents(); ob_end_clean(); curl_close($urlConn); // close the connection $xmlResponse = $url; mail('cmichalski@2dts.com','CONWAY rate quote request',$xmlResponse,'From: <cmichalski@2dts.com>'); if (strpos($xmlResponse, 'RATINGERROR') === true || strpos($xmlResponse, '<NetCharge currency="USD">') === false) { return true; } else { $start_pos = strpos($xmlResponse, '<NetCharge currency=') + 26; $string_len = strpos($xmlResponse, '</NetCharge>') - $start_pos; $shipping_price = str_replace(',', '', substr($xmlResponse, $start_pos, $string_len)); if (is_numeric($shipping_price)) { return $shipping_price; } else { return false; } } } function check($vendors_id='1') { if (!isset($this->_check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_VENDOR_CONFIGURATION . " where vendors_id = '". $vendors_id ."' and configuration_key = 'MODULE_SHIPPING_CONWAY_STATUS_" . $vendors_id . "'"); $this->_check = tep_db_num_rows($check_query); } return $this->_check; } function install($vendors_id='1') { tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, vendors_id) values ('Enable FedEx Freight Shipping', 'MODULE_SHIPPING_CONWAY_STATUS_" . $vendors_id . "', 'True', 'Do you want to offer FedEx Freight shipping?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, vendors_id) values ('Shipping Terms', 'MODULE_SHIPPING_CONWAY_SHIP_TERMS_" . $vendors_id . "', 'prepaid', 'Will these shipments be prepaid or COD? (This is here for future dev. No COD support right now)', '6', '0', 'tep_cfg_select_option(array(\'prepaid\'), ', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Shipper\'s Zip Code', 'MODULE_SHIPPING_CONWAY_SHIP_ZIP_" . $vendors_id . "', '', 'Enter the zip code of where these shipments will be sent from. (Required)', '6', '1', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, vendors_id) values ('Shipper\'s Country', 'MODULE_SHIPPING_CONWAY_SHIP_COUNTRY_" . $vendors_id . "', 'US', 'Select the country where these shipments will be sent from.', '6', '0', 'tep_cfg_select_option(array(\'US\', \'CA\'), ', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Account Number', 'MODULE_SHIPPING_CONWAY_ACCT_NUM_" . $vendors_id . "', '', 'FedEx Freight account number, enter it here.', '6', '1', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Username', 'MODULE_SHIPPING_CONWAY_USERNAME_" . $vendors_id . "', '', 'FedEx Freight password, enter it here. ', '6', '1', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Password', 'MODULE_SHIPPING_CONWAY_PASSWORD_" . $vendors_id . "', '', 'FedEx Freight username, enter it here. ', '6', '1', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, vendors_id) values ('Rating Accessorial Code Type', 'MODULE_SHIPPING_CONWAY_RACT_" . $vendors_id . "', 'SSC-Origin single shipment,ZHM-Hazardous Materials,ELS-Excessive Length Shipment,RSD-Destination residential delivery,DFD-Defered', 'Select the CONWAY Rating Accessorial Code Typ services to be offered.', '6', '20', 'tep_cfg_select_option(array(\'SSC\', \'ZHM\', \'ELS\', \'RSD\'), ', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Enter the Discount Rate Percentage', 'MODULE_SHIPPING_CONWAY_PERCENT_" . $vendors_id . "', 'NONE', '100% will be the exact ammount enter a lesser precentage will cover you better but customer will have a slighty higher quote', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, vendors_id) values ('Error Logs', 'MODULE_SHIPPING_CONWAY_ERROR_ACTION_" . $vendors_id . "', 'Email', 'If FedEx kicks back an error, how do you want to display it? (Email to store owner, display to customer, or none)', '6', '0', 'tep_cfg_select_option(array(\'Email\', \'Display\', \'None\'), ', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Handling Fee', 'MODULE_SHIPPING_CONWAY_HANDLING_" . $vendors_id . "', '0', 'Handling fee for this shipping method (per item).', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added, vendors_id) values ('Shipping Zone', 'MODULE_SHIPPING_CONWAY_ZONE_" . $vendors_id . "', '0', 'If a zone is selected, only enable this shipping method for that zone.', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added, vendors_id) values ('Tax Class', 'MODULE_SHIPPING_CONWAY_TAX_CLASS_" . $vendors_id . "', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Sort order of display.', 'MODULE_SHIPPING_CONWAY_SORT_ORDER_" . $vendors_id . "', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now(), '" . $vendors_id . "')"); } function remove($vendors_id) { tep_db_query("delete from " . TABLE_VENDOR_CONFIGURATION . " where vendors_id = '". $vendors_id ."' and configuration_key in ('" . implode("', '", $this->keys($vendors_id)) . "')"); } function keys($vendors_id) { return array('MODULE_SHIPPING_CONWAY_STATUS_'. $vendors_id,'MODULE_SHIPPING_CONWAY_SHIP_TERMS_'. $vendors_id,'MODULE_SHIPPING_CONWAY_SHIP_ZIP_'. $vendors_id,'MODULE_SHIPPING_CONWAY_SHIP_COUNTRY_'. $vendors_id, 'MODULE_SHIPPING_CONWAY_ACCT_NUM_'. $vendors_id, 'MODULE_SHIPPING_CONWAY_USERNAME_'. $vendors_id,'MODULE_SHIPPING_CONWAY_PASSWORD_'. $vendors_id, 'MODULE_SHIPPING_CONWAY_RACT_' . $vendors_id, 'MODULE_SHIPPING_CONWAY_PERCENT_' . $vendors_id, 'MODULE_SHIPPING_CONWAY_ERROR_ACTION_'. $vendors_id, 'MODULE_SHIPPING_CONWAY_HANDLING_'. $vendors_id, 'MODULE_SHIPPING_CONWAY_ZONE_' . $vendors_id, 'MODULE_SHIPPING_CONWAY_TAX_CLASS_'. $vendors_id, 'MODULE_SHIPPING_CONWAY_SORT_ORDER_'. $vendors_id); } } ?> Anyone can help that will be great trust me I have been looking at this for hours trying to figure it out... Now I must reach out !!! Thanks, The other Craig
  12. cmichalski

    MVS 1.1.1 orders_by_vendor.php

    Crap didn't mean to start a new topic sorry MODDERATOR
  13. Hi all looking for some insight here. Been working on this for hours and hours... Let get my config out of the way.... OsCommerce CRE-LOADED 6.15 PHP Version 4.4.4 Database Host: localhost (127.0.0.1) Database: MySQL 4.1.18-nt Server Date: 02/18/2007 11:22:17 HTTP Server: Microsoft-IIS/5.0 Okay I have this module working Great but last few details is orders_by_vendors.php No error reported. I have tried to echo data through out the file to see where it stops... It seems that it wont continue through the file to pull the data from the orders by vendors db query. I am by no means a programer (YET) I am working hard at learning this but a bit confused on the this one since the db query is different than I am used to seeing. ( NOT SAYING ITS WRONG) just cornfused... I have checked the DEMO site and I am JEALOUS that it works and mine don't !!! <?php /* orders_by_vendor.php V1.0 2006/03/25 by Craig Garrison Sr www.blucollarsales.com for MVS V1.0 2006/03/25 JCK/CWG osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] Copyright © 2006 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); $vendor_query_raw = "select vendors_id as id, vendors_name as name from " . TABLE_VENDORS . " order by name"; $vendor_query = tep_db_query($vendor_query_raw); if (isset($vID)) { $vendors_id = $vID; } if ($by == 'date') { $by = 'date_purchased'; } elseif ($by == 'customer'){ $by = 'customers_id'; } elseif ($by == 'customer'){ $by = 'status'; } elseif ($by == 'sent'){ $by == 'sent'; } else { $by = 'orders_id'; } if (isset($line)){ $line == $line; } else { $line = 'desc'; } ?> <!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"> <!-- 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><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="2"> <tr> <td valign="top"> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <?php $vendors_array = array(array('id' => '1', 'text' => 'NONE')); $vendors_query = tep_db_query("select vendors_id, vendors_name from " . TABLE_VENDORS . " order by vendors_name"); while ($vendors = tep_db_fetch_array($vendors_query)) { $vendors_array[] = array('id' => $vendors['vendors_id'], 'text' => $vendors['vendors_name']); } ?> <td class="main" align="left"><?php echo '<a href="' . tep_href_link(FILENAME_ORDERS_VENDORS, '&vendors_id=' . $vendors_id) . '"><b>Click to reset form</a></b>';?></td> <td class="main" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_VENDORS) . '"><b>Go To Vendors List</a>';?> <td> </tr> <tr> <td colspan="3"><?php echo tep_draw_separator('pixel_trans.gif','1','5'); ?></td> <tr> <td colspan="3"><?php echo tep_black_line(); ?></td> </tr> <tr> <td colspan="3"><?php echo tep_draw_separator('pixel_trans.gif','1','5'); ?></td> </tr> <tr> <td class="main" align="left"><?php echo tep_draw_form('vendors_report', FILENAME_ORDERS_VENDORS) . TABLE_HEADING_VENDOR_CHOOSE . ' '; ?><?php echo tep_draw_pull_down_menu('vendors_id', $vendors_array,'','onChange="this.form.submit()";');?></form></td> <td class="main" align="left"><?php echo 'Filter by email sent: <a href="' . tep_href_link(FILENAME_ORDERS_VENDORS, '&vendors_id=' . $vendors_id . '&line=' . $line . '&sent=yes') . '"><b>YES</a></b> <a href="' . tep_href_link(FILENAME_ORDERS_VENDORS, '&vendors_id=' . $vendors_id . '&line=' . $line . '&sent=no') . '"><b>NO</a></b>'; ?></td> <?php if ($line == 'asc') { if(isset($status)) { ?> <td class="main" align="right"><?php echo 'Change to <a href="' . tep_href_link(FILENAME_ORDERS_VENDORS, '&vendors_id=' . $vendors_id . '&line=desc' . '&sent=' . $sent . '&status=' . $status) . '"><b>DESCENDING</a></b> order'; ?></td> <?php } else { ?> <td class="main" align="right"><?php echo 'Change to <a href="' . tep_href_link(FILENAME_ORDERS_VENDORS, '&vendors_id=' . $vendors_id . '&line=desc' . '&sent=' . $sent) . '"><b>DESCENDING</a></b> order'; ?></td> <?php } ?> <?php } elseif (!isset($status)) { ?> <td class="main" align="right"><?php echo 'Change to <a href="' . tep_href_link(FILENAME_ORDERS_VENDORS, '&vendors_id=' . $vendors_id . '&line=asc' . '&sent=' . $sent) . '"><b>ASCENDING</a></b> order'; ?></td> <?php } else { ?> <td class="main" align="right"><?php echo 'Change to <a href="' . tep_href_link(FILENAME_ORDERS_VENDORS, '&vendors_id=' . $vendors_id . '&line=asc' . '&sent=' . $sent . '&status=' . $status) . '"><b>ASCENDING</a></b> order'; ?></td> <?php } ?> <?php $orders_statuses = array(); $orders_status_array = array(); $orders_status_query = tep_db_query("select orders_status_id, orders_status_name from " . TABLE_ORDERS_STATUS . " where language_id = '" . (int)$languages_id . "'"); while ($orders_status = tep_db_fetch_array($orders_status_query)) { $orders_statuses[] = array('id' => $orders_status['orders_status_id'], 'text' => $orders_status['orders_status_name']); $orders_status_array[$orders_status['orders_status_id']] = $orders_status['orders_status_name']; } ?> <td class="main" align="right"><?php echo tep_draw_form('status_report', FILENAME_ORDERS_VENDORS . '?&vendors_id=' . $vendors_id) . HEADING_TITLE_STATUS . ' '; echo tep_draw_pull_down_menu('status', $orders_statuses, '','onChange="this.form.submit()";');?></form></td> </tr> </table><?php // if (isset($HTTP_POST_VARS['vendors_id'])) { ?> <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_VENDOR; ?></td> <td class="dataTableHeadingContent" align="left"><?php echo TABLE_HEADING_ORDER_ID; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_CUSTOMERS; ?></td> <td class="dataTableHeadingContent" align="left"><?php echo TABLE_HEADING_ORDER_TOTAL; ?></td> <td class="dataTableHeadingContent" align="left"><?php echo TABLE_HEADING_DATE_PURCHASED; ?></td> <td class="dataTableHeadingContent" align="left"><?php echo TABLE_HEADING_STATUS; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ORDER_SENT; ?> </td> </tr> <?php $vend_query_raw = "select vendors_name as name from " . TABLE_VENDORS . " where vendors_id = '" . $vendors_id . "'"; $vend_query = tep_db_query($vend_query_raw); $vendors = tep_db_fetch_array($vend_query); ?> <tr class="dataTableRow"> <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_VENDORS, '&vendors_id=' . $vendors_id . '&action=edit') . '" TARGET="_blank"><b>' . $vendors['name'] . '</a></b>'; ?></td> <td class="dataTableContent"><?php echo ''; ?></td> <td class="dataTableContent"><?php echo ''; ?></td> <td class="dataTableContent"><?php echo ''; ?></td> <td class="dataTableContent"><?php echo ''; ?></td> <td class="dataTableContent"><?php echo ''; ?></td> <td class="dataTableContent" align="right">Click To<br>Send Email</td> </tr> <?php $index1 = 0 ; if ($sent == 'yes'){ $vendors_orders_data_query = tep_db_query("select distinct orders_id, vendor_order_sent from " . TABLE_ORDERS_SHIPPING . " where vendors_id='" . $vendors_id . "' and vendor_order_sent='yes' group by orders_id " . $line . ""); } elseif ($sent == 'no') { $vendors_orders_data_query = tep_db_query("select distinct orders_id, vendor_order_sent from " . TABLE_ORDERS_SHIPPING . " where vendors_id='" . $vendors_id . "' and vendor_order_sent='no' group by orders_id " . $line . ""); } else { $vendors_orders_data_query = tep_db_query("select distinct orders_id, vendor_order_sent from " . TABLE_ORDERS_SHIPPING . " where vendors_id='" . $vendors_id . "' group by orders_id " . $line . ""); } while ($vendors_orders_data = tep_db_fetch_array($vendors_orders_data_query)) { // $vendors_orders_id = $vendors_orders_list_data['orders_id']; // $vendors_products_id = $vendors_orders_list_data['v_products_id']; $index2 = 0 ; $vendors_products_data_query = tep_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION ." where products_id='" . $vendors_orders_data['v_products_id'] . "' and language_id = '" . $languages_id . "'"); // while ($vendors_products_data = tep_db_fetch_array($vendors_products_data_query)) { $index3 = 0; if (isset($status)) { $orders_query = tep_db_query("select distinct o.customers_id, o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = '" . $status . "' and o.orders_status = s.orders_status_id and s.language_id = '" . $languages_id . "' and ot.class = 'ot_total' and o.orders_id = '" . $vendors_orders_data['orders_id'] . "' order by o." . $by . " ASC"); } else { $orders_query = tep_db_query("select distinct o.customers_id, o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . $languages_id . "' and ot.class = 'ot_total' and o.orders_id = '" . $vendors_orders_data['orders_id'] . "' order by o." . $by . " ASC"); } while ($vendors_orders = tep_db_fetch_array($orders_query)) { $raw_date_purchased = $vendors_orders['date_purchased']; if (tep_not_null($raw_date_purchased)) { list($date_2, $time_2) = explode(' ', $raw_date_purchased); list($year, $month, $day) = explode('-', $date_2); $date_purchased = ((strlen($day) == 1) ? '0' . $day : $day) . '/' . ((strlen($month) == 1) ? '0' . $month : $month) . '/' . $year; } ?> <tr class="dataTableRow"> <td class="dataTableContent" align="left"><?php echo '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $vendors_orders_data['orders_id'] . '&action=edit') . '" TARGET="_blank"><b>View this order</b></a>'; ?></td> <td class="dataTableContent" align="left"><?php echo $vendors_orders['orders_id']; ?></td> <!-- <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'action=new_product&pID=' . $vendors_orders_data['v_products_id']) . '" TARGET="_blank"><b>' . $vendors_products_data['products_name'] . '</a>'; ?></td> --> <td class="dataTableContent"><?php echo ' from <a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $vendors_orders['customers_id'] . '&action=edit') . '" TARGET="_blank"><b>' . $vendors_orders['customers_name'] . '</b></a>'; ?></td> <td class="dataTableContent" align="left"><?php echo strip_tags($vendors_orders['order_total']); ?></td> <td class="dataTableContent" align="left"><?php echo $date_purchased; ?></td> <td class="dataTableContent" align="left"><?php echo $vendors_orders['orders_status_name']; ?></td> <td class="dataTableContent" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_VENDORS_EMAIL_SEND, '&vID=' . $vendors_id . '&oID=' . $vendors_orders_data['orders_id'] . '&vOS=' . $vendors_orders_data['vendor_order_sent']) . '"><b>' . $vendors_orders_data['vendor_order_sent'] . '</a></b>'; ?></td> </tr> <? $index3++; } $index2++; //} $index1++; } ?> </table></td> </tr> </table></td> </tr> </table></td> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Can't for the world of me figure why mine is not working when everyone else has it working... Maybe my SQL version or PHP Version... I can mess with the code to get it to produce the no/yes repeated for how many order the DB shows which is 5 orders and I can eve have it send the email but the email contains no order info nor does the order by vendors.php page Sorry to bable so much but this has kicked my *SS :blink: If someone could give me some guidence it would be greatly apprciated !!!! To all of you that have contributed and put so much time in this I personally appreciate your efforts its been the hardest hack yet for me although I have owrked most everything out since I have crappy cre-loaded this was purchased out of desperation. If knew now what I knew then I would have modded osc 2.2 myself.... OH well kinda to far into this to stop now... Thanks, Craig
  14. cmichalski

    Shipping Module Creation Help

    Great thanks for your help although this was not the case I am sure its a problem that could be added. Well looking into this all day can you believe the ANSWER is that I had a newer version of PHP Version 4.4.5RC2-dev now the working version is PHP Stable Version 4.4.5 fix for exactly CGI Expressions timeouthttp://snaps.php.net/win32/php4-win32-STABLE-latest.zip with all this said I will have to say I am at least more educated in these problem and not to blame the code for things that will not work. Thanks to you all for helping through this gave me lots of help !!! Craig
×