♥cigarsforless Posted March 28, 2008 Share Posted March 28, 2008 count ($cart->vendor_shipping) will give you the number of vendors in the current order. Test for that value > 1 and add your suffix. You could also just add the $vendors_id as a suffix, so you always know which vendor that order number belongs to. Regards Jim Thanks for the quick response Jim, but... correct me if I'm wrong, but as the order has been processed and added to the database by the time the vendor email gets sent, the cart would now be empty. I'm thinking something here: for ($l=0, $m=sizeof($vendor_products); $l<$m; $l++) { $vendor_country = tep_get_country_name($vendor_products[$l]['Vcountry']); $order_number= $oID; and adding a statement that if there are more than one vendor, then for the 1st product vendor $order_number= $oID . 'a'; for the 2nd product vendor $order_number= $oID . 'b'; for the 3rd product vendor $order_number= $oID . 'c'; etc and if only 1 vendor $order_number= $oID; Quote Jim Bullen - President The Cigar Hut Group of Companies Installed add-ons: (that now need to be upgraded to OSC CE Phoenix) PWA, MVS, Easy Populate, Dynamic Sitemap, Featured Products, MVS Order Editor, MVS Shipping Estimator, Google XML Sitemap, About Us, Ad Tracker, Address Enhancer, Also Purchased, Backorders, Category Descriptions, Dynamic Meta Tags, Contact Us Email Subjects, Country state Selector, Extra Address Line, Order Number in Email Subject, OSC Affiliate, Product Extra Fields, Review Approval System, Reviews in Product Display, Sold Out, Sold Out (but Displayed), Ultimate SEO URL's, Updated Spiders, Welcome Email Password, Pending Order Email, Who's Online Enhancement, CCGV, Easy Discounts, Customer Comments, Request a Review, Sales Report, plus many many more! Link to comment Share on other sites More sharing options...
♥kymation Posted March 29, 2008 Share Posted March 29, 2008 Thanks for the quick response Jim, but... correct me if I'm wrong, but as the order has been processed and added to the database by the time the vendor email gets sent, the cart would now be empty. <snip> The cart is reset near the bottom of checkout_process.php, where all of the session data is unregistered (Line 460 in the stock MVS version.) The vendor email gets sent a few lines above that, so the data should still be good to use in the email. Of course there are other ways to do this as well. What you suggested should work, although I can't say for certain as I have not checked those variables. The order has been saved to the database, so you could use that information as well. There are usually several ways to do anything, so just do whatever works best for you. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
♥cigarsforless Posted March 29, 2008 Share Posted March 29, 2008 The cart is reset near the bottom of checkout_process.php, where all of the session data is unregistered (Line 460 in the stock MVS version.) The vendor email gets sent a few lines above that, so the data should still be good to use in the email. Of course there are other ways to do this as well. What you suggested should work, although I can't say for certain as I have not checked those variables. The order has been saved to the database, so you could use that information as well. There are usually several ways to do anything, so just do whatever works best for you. Regards Jim Hi Jim, I've managed to get it to work somewhat. I can append the Vendor ID to the order ID, but that does not match my existing order number format for multiple vendors. I'm having trouble figuring out how to have the "a" appended to the 1st vendor order and "b" appended to the 2nd vendor order etc. anything I have tried just appends the same value for all vendor emails ie: 1st vendor order 1234a, 2nd vendor 1234a etc when what I want is 1st vendor order 1234a, 2nd vendor 1234b etc thinking this must be set up near this part while ($vendor_order = tep_db_fetch_array($vendor_data_query)) { $vendor_products[$index2] = array('Vid' => $vendor_order['vendors_id'], 'Vname' => $vendor_order['vendors_name'], 'Vemail' => $vendor_order['vendors_email'], 'Vcontact' => $vendor_order['vendors_contact'], 'Vaccount' => $vendor_order['account_number'], 'Vstreet' => $vendor_order['vendor_street'], 'Vcity' => $vendor_order['vendor_city'], 'Vstate' => $vendor_order['vendor_state'], 'Vzipcode' => $vendor_order['vendors_zipcode'], 'Vcountry' => $vendor_order['vendor_country'], 'Vaccount' => $vendor_order['account_number'], 'Vtelephone' => $vendor_order['vendors_phone1'], 'Vinstructions' => $vendor_order['vendor_add_info'], 'Vcost' => $vendor_order['shipping_cost'], 'Vmodule' => $vendor_order['shipping_module'], 'Vmethod' => $vendor_order['shipping_method']); but I can't seem to get it right. any suggestions? Thanks Jim Quote Jim Bullen - President The Cigar Hut Group of Companies Installed add-ons: (that now need to be upgraded to OSC CE Phoenix) PWA, MVS, Easy Populate, Dynamic Sitemap, Featured Products, MVS Order Editor, MVS Shipping Estimator, Google XML Sitemap, About Us, Ad Tracker, Address Enhancer, Also Purchased, Backorders, Category Descriptions, Dynamic Meta Tags, Contact Us Email Subjects, Country state Selector, Extra Address Line, Order Number in Email Subject, OSC Affiliate, Product Extra Fields, Review Approval System, Reviews in Product Display, Sold Out, Sold Out (but Displayed), Ultimate SEO URL's, Updated Spiders, Welcome Email Password, Pending Order Email, Who's Online Enhancement, CCGV, Easy Discounts, Customer Comments, Request a Review, Sales Report, plus many many more! Link to comment Share on other sites More sharing options...
♥kymation Posted March 29, 2008 Share Posted March 29, 2008 I had to look this one up. Try something like this (change the first line of what you posted to this code) $sub_index = 97; while ($vendor_order = tep_db_fetch_array($vendor_data_query)) { $orders_id .= chr ($sub_index); $sub_index++; I used $orders_id for the order ID number; change that to whatever variable you are using. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
blucollarguy Posted March 30, 2008 Author Share Posted March 30, 2008 Hi Jim, I've managed to get it to work somewhat. I can append the Vendor ID to the order ID, but that does not match my existing order number format for multiple vendors. I'm having trouble figuring out how to have the "a" appended to the 1st vendor order and "b" appended to the 2nd vendor order etc. anything I have tried just appends the same value for all vendor emails ie: 1st vendor order 1234a, 2nd vendor 1234a etc when what I want is 1st vendor order 1234a, 2nd vendor 1234b etc thinking this must be set up near this part while ($vendor_order = tep_db_fetch_array($vendor_data_query)) { $vendor_products[$index2] = array('Vid' => $vendor_order['vendors_id'], 'Vname' => $vendor_order['vendors_name'], 'Vemail' => $vendor_order['vendors_email'], 'Vcontact' => $vendor_order['vendors_contact'], 'Vaccount' => $vendor_order['account_number'], 'Vstreet' => $vendor_order['vendor_street'], 'Vcity' => $vendor_order['vendor_city'], 'Vstate' => $vendor_order['vendor_state'], 'Vzipcode' => $vendor_order['vendors_zipcode'], 'Vcountry' => $vendor_order['vendor_country'], 'Vaccount' => $vendor_order['account_number'], 'Vtelephone' => $vendor_order['vendors_phone1'], 'Vinstructions' => $vendor_order['vendor_add_info'], 'Vcost' => $vendor_order['shipping_cost'], 'Vmodule' => $vendor_order['shipping_module'], 'Vmethod' => $vendor_order['shipping_method']); but I can't seem to get it right. any suggestions? Thanks Jim You could also do something like this: $alphabet = array("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"); for ($l=0, $m=sizeof($vendor_products); $l<$m; $l++) { $vendor_country = tep_get_country_name($vendor_products[$l]['Vcountry']); $order_number = $oID . $alphabet[$l]; This would add the corresponding($l is the start of the loop throught $vendor_products) letter from the $alphabet array to the $oID. For the $alphabet array you could also use $alphabet = range('a', 'z'); If you wanted to for whatever reason. I have done a few of these as well, and have had to come up with some pretty complicated strings too, very much fun. Good luck, Craig :) Quote Happy Coding! Craig Garrison Sr Anything worth having, is worth working for. Multi Vendor Shipping V1.1 Demo Catalog 3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout. Multi Vendor Shipping V1.1 Demo Admin login: webmaster@blucollarsales.com pass: mvs_demo MVS Thread: Multi-Vendor Shipping My contribs: Download Multi Vendor Shipping V1.1 Vendor Email Vendor Info in easypopulate EZ Price Updater And more to come! Link to comment Share on other sites More sharing options...
♥kymation Posted March 30, 2008 Share Posted March 30, 2008 And that makes three ways to do the job. Thanks for the range() idea Craig , I didn't know about that one. It's a lot cleaner than typing a long list of characters into an array. One more trick to remember.... Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
UncleSteve Posted March 30, 2008 Share Posted March 30, 2008 I've been running MVS for over a year or so without problems. Please bare with me on this... I've now discovered you can 'switch' MVS off which the treats all the products as though they were being supplied by the one supplier, so the customer only gets charged one shipping charge. Right, I've switched off MVS and the check out process works fine up to the order conformation page, then I get an error message Warning: Invalid argument supplied for foreach() in /home/mydomain/public_html/store2/checkout_process.php on line 168 Warning: Cannot modify header information - headers already sent by (output started at /home/mydomain/public_html/store2/checkout_process.php:168) in /home/mydomain/public_html/store2/includes/functions/general.php on line 33 If I do a couple of page refreshes, I then get presented with the cart page (product have gone). From this process, the customer receives their email, but there are no products listed, though the total price and shipping charges are there. Nor do I get the admin email detailing the customer and what they ordered. I've replaced the two files which were listed in the error message (which are about a year or so old when I first set up MVS) but the errors are the same. Can anyone give me any indication of where the problem/s may lie please? Thanks for baring with me, and thank you in advance for any help and guidance you can give :) Quote ____________________________________________________________________ ____________________________________________________________________ Link to comment Share on other sites More sharing options...
♥cigarsforless Posted March 30, 2008 Share Posted March 30, 2008 And that makes three ways to do the job. Thanks for the range() idea Craig , I didn't know about that one. It's a lot cleaner than typing a long list of characters into an array. One more trick to remember.... Regards Jim I feel just like the icon for Craig's user info. I'm banging my head and getting more frustrated by the minute. I have tried all 3 suggestions, in various forms and positions in the code and I'm always getting the same suffix added to each vendor email. When looking for code ideas from other pages, i think I have found the solution, but noooooo. even this bit of code returns the same value in each vendor email, yet it works perfectly in other pages. <snip> $package_num = sizeof($vendor_products); $box_num = $l + 1; for ($l=0, $m=sizeof($vendor_products); $l<$m; $l++) { $packageno = $box_num[$l] .' of ' . $vendors_count; </snip> what the above returns for ALL vendor emails (when I test with 3 vendors) is 1 of 3 The same code (or very similar) works perfectly in includes/vendor_order_data.php, includes/vendor_order_info.php, admin/orders.php, order_history.php etc but I can't get it to work in checkout_process.php for the life of me. think I'm gonna lose my mind over this stupid little issue of appending an a, b, c etc to the vendor email order numbers sigh.... Quote Jim Bullen - President The Cigar Hut Group of Companies Installed add-ons: (that now need to be upgraded to OSC CE Phoenix) PWA, MVS, Easy Populate, Dynamic Sitemap, Featured Products, MVS Order Editor, MVS Shipping Estimator, Google XML Sitemap, About Us, Ad Tracker, Address Enhancer, Also Purchased, Backorders, Category Descriptions, Dynamic Meta Tags, Contact Us Email Subjects, Country state Selector, Extra Address Line, Order Number in Email Subject, OSC Affiliate, Product Extra Fields, Review Approval System, Reviews in Product Display, Sold Out, Sold Out (but Displayed), Ultimate SEO URL's, Updated Spiders, Welcome Email Password, Pending Order Email, Who's Online Enhancement, CCGV, Easy Discounts, Customer Comments, Request a Review, Sales Report, plus many many more! Link to comment Share on other sites More sharing options...
blucollarguy Posted March 30, 2008 Author Share Posted March 30, 2008 I feel just like the icon for Craig's user info.I'm banging my head and getting more frustrated by the minute. I have tried all 3 suggestions, in various forms and positions in the code and I'm always getting the same suffix added to each vendor email. When looking for code ideas from other pages, i think I have found the solution, but noooooo. even this bit of code returns the same value in each vendor email, yet it works perfectly in other pages. <snip> $package_num = sizeof($vendor_products); $box_num = $l + 1; for ($l=0, $m=sizeof($vendor_products); $l<$m; $l++) { $packageno = $box_num[$l] .' of ' . $vendors_count; </snip> what the above returns for ALL vendor emails (when I test with 3 vendors) is 1 of 3 The same code (or very similar) works perfectly in includes/vendor_order_data.php, includes/vendor_order_info.php, admin/orders.php, order_history.php etc but I can't get it to work in checkout_process.php for the life of me. think I'm gonna lose my mind over this stupid little issue of appending an a, b, c etc to the vendor email order numbers sigh.... Have you been working within the "function" that actually sends the email or the "call" to it? What I mean is this: if you are working within the function itself, that is your problem, only one vendor at a time is called during the checkout process to send the email. Outside the function(around line 445 in an unmodified checkout_process.php file) you will find this: if ($order_sent_ckeck == 'no') { $status=''; $oID=$insert_id; $vendor_order_sent = false; $status=$order->info['order_status']; vendors_email($vendors_id, $oID, $status, $vendor_order_sent); This is the section where you should modify the order number($oID=$insert_id;). This is wthin a "while" loop, so you should be able to create a count and get your letter to add properly. Good luck, Craig :) Quote Happy Coding! Craig Garrison Sr Anything worth having, is worth working for. Multi Vendor Shipping V1.1 Demo Catalog 3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout. Multi Vendor Shipping V1.1 Demo Admin login: webmaster@blucollarsales.com pass: mvs_demo MVS Thread: Multi-Vendor Shipping My contribs: Download Multi Vendor Shipping V1.1 Vendor Email Vendor Info in easypopulate EZ Price Updater And more to come! Link to comment Share on other sites More sharing options...
blucollarguy Posted March 30, 2008 Author Share Posted March 30, 2008 I've been running MVS for over a year or so without problems. Please bare with me on this... I've now discovered you can 'switch' MVS off which the treats all the products as though they were being supplied by the one supplier, so the customer only gets charged one shipping charge. Right, I've switched off MVS and the check out process works fine up to the order conformation page, then I get an error message Warning: Invalid argument supplied for foreach() in /home/mydomain/public_html/store2/checkout_process.php on line 168 Warning: Cannot modify header information - headers already sent by (output started at /home/mydomain/public_html/store2/checkout_process.php:168) in /home/mydomain/public_html/store2/includes/functions/general.php on line 33 If I do a couple of page refreshes, I then get presented with the cart page (product have gone). From this process, the customer receives their email, but there are no products listed, though the total price and shipping charges are there. Nor do I get the admin email detailing the customer and what they ordered. I've replaced the two files which were listed in the error message (which are about a year or so old when I first set up MVS) but the errors are the same. Can anyone give me any indication of where the problem/s may lie please? Thanks for baring with me, and thank you in advance for any help and guidance you can give :) This really shouldn't be able to happen if MVS is turned off. Look for this block of code //MVS - added insert for new orders_shipping table if (SELECT_VENDOR_SHIPPING == 'true') { $shipping_array = $shipping['vendor']; foreach ($shipping_array as $vendors_id => $shipping_data) { That is most likely the "foreach" warning you are getting, but if "SELECT_VENDOR_SHIPPING" is off(or false in the database when MVS is turned off) it won't execute, so there should be no warning. Double check that you hadn't accidently added two lines to the database for this "key", I have seen that happen a number of times. You can check by "printing" out that constant on any other page, say the header.php file for instance: echo '<br>This is the MVS setting: ' . SELECT_VENDOR_SHIPPING; And find out what the site thinks it is. Good luck, Craig :) Quote Happy Coding! Craig Garrison Sr Anything worth having, is worth working for. Multi Vendor Shipping V1.1 Demo Catalog 3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout. Multi Vendor Shipping V1.1 Demo Admin login: webmaster@blucollarsales.com pass: mvs_demo MVS Thread: Multi-Vendor Shipping My contribs: Download Multi Vendor Shipping V1.1 Vendor Email Vendor Info in easypopulate EZ Price Updater And more to come! Link to comment Share on other sites More sharing options...
jdice Posted March 30, 2008 Share Posted March 30, 2008 Hi...can anyone help??? I have uploaded MVS to my store. I have not done the modules file yet. But when I try to login to my administration...I get a blank page that says this: Error! Unable to determine the page link! Function used: tep_href_link('', '', '') I don't know what I am looking for to fix it? I have a BTS template...but from I am reading other BTS users have used this MVS contribution. You do have to place a couple things in the fallback files...but I have done that lots of times with other contributions...so I am making changes in the correct places. Someone suggested my html_output file. Should I look in ...admin/includes/functions/html_output? Well here is the html_output file...if anyone can look at it and help. Sorry...I hate take up space Janet <?php /* $Id: html_output.php,v 1.29 2003/06/25 20:32:44 hpdl Exp $ Modified 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 */ //// // The HTML href link wrapper function // function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL') { if ($page == '') { die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>'); } if ($connection == 'NONSSL') { $link = HTTP_SERVER . DIR_WS_ADMIN; } elseif ($connection == 'SSL') { if (ENABLE_SSL == 'true') { $link = HTTPS_SERVER . DIR_WS_ADMIN; } else { $link = HTTP_SERVER . DIR_WS_ADMIN; } } else { die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>'); } if ($parameters == '') { $link = $link . $page . '?' . SID; } else { $link = $link . $page . '?' . $parameters . '&' . SID; } while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1); return $link; // } function tep_catalog_href_link($page = '', $parameters = '', $connection = 'NONSSL') { if ($connection == 'NONSSL') { $link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG; } elseif ($connection == 'SSL') { if (ENABLE_SSL_CATALOG == 'true') { $link = HTTPS_CATALOG_SERVER . DIR_WS_CATALOG; } else { $link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG; } } else { die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>'); } if ($parameters == '') { $link .= $page; } else { $link .= $page . '?' . $parameters; } while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1); return $link; } //// // The HTML image wrapper function function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') { $image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"'; if (tep_not_null($alt)) { $image .= ' title=" ' . tep_output_string($alt) . ' "'; } if (tep_not_null($width) && tep_not_null($height)) { $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"'; } if (tep_not_null($parameters)) $image .= ' ' . $parameters; $image .= '>'; return $image; } //// // The HTML form submit button wrapper function // Outputs a button in the selected language function tep_image_submit($image, $alt = '', $parameters = '') { global $language; $image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"'; if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "'; if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters; $image_submit .= '>'; return $image_submit; } //// // Draw a 1 pixel black line function tep_black_line() { return tep_image(DIR_WS_IMAGES . 'pixel_black.gif', '', '100%', '1'); } //// // Output a separator either through whitespace, or with an image function tep_draw_separator($image = 'pixel_black.gif', $width = '100%', $height = '1') { return tep_image(DIR_WS_IMAGES . $image, '', $width, $height); } //// // Output a function button in the selected language function tep_image_button($image, $alt = '', $params = '') { global $language; return tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image, $alt, '', '', $params); } //// // javascript to dynamically update the states/provinces list when the country is changed // TABLES: zones function tep_js_zone_list($country, $form, $field) { $countries_query = tep_db_query("select distinct zone_country_id from " . TABLE_ZONES . " order by zone_country_id"); $num_country = 1; $output_string = ''; while ($countries = tep_db_fetch_array($countries_query)) { if ($num_country == 1) { $output_string .= ' if (' . $country . ' == "' . $countries['zone_country_id'] . '") {' . "\n"; } else { $output_string .= ' } else if (' . $country . ' == "' . $countries['zone_country_id'] . '") {' . "\n"; } $states_query = tep_db_query("select zone_name, zone_id from " . TABLE_ZONES . " where zone_country_id = '" . $countries['zone_country_id'] . "' order by zone_name"); $num_state = 1; while ($states = tep_db_fetch_array($states_query)) { if ($num_state == '1') $output_string .= ' ' . $form . '.' . $field . '.options[0] = new Option("' . PLEASE_SELECT . '", "");' . "\n"; $output_string .= ' ' . $form . '.' . $field . '.options[' . $num_state . '] = new Option("' . $states['zone_name'] . '", "' . $states['zone_id'] . '");' . "\n"; $num_state++; } $num_country++; } $output_string .= ' } else {' . "\n" . ' ' . $form . '.' . $field . '.options[0] = new Option("' . TYPE_BELOW . '", "");' . "\n" . ' }' . "\n"; return $output_string; } //// // Output a form function tep_draw_form($name, $action, $parameters = '', $method = 'post', $params = '') { $form = '<form name="' . tep_output_string($name) . '" action="'; if (tep_not_null($parameters)) { $form .= tep_href_link($action, $parameters); } else { $form .= tep_href_link($action); } $form .= '" method="' . tep_output_string($method) . '"'; if (tep_not_null($params)) { $form .= ' ' . $params; } $form .= '>'; return $form; } //// // Output a form input field function tep_draw_input_field($name, $value = '', $parameters = '', $required = false, $type = 'text', $reinsert_value = true) { $field = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"'; if (isset($GLOBALS[$name]) && ($reinsert_value == true) && is_string($GLOBALS[$name])) { $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"'; } elseif (tep_not_null($value)) { $field .= ' value="' . tep_output_string($value) . '"'; } if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; if ($required == true) $field .= TEXT_FIELD_REQUIRED; return $field; } //// // Output a form password field function tep_draw_password_field($name, $value = '', $required = false) { $field = tep_draw_input_field($name, $value, 'maxlength="40"', $required, 'password', false); return $field; } //// // Output a form filefield function tep_draw_file_field($name, $required = false) { $field = tep_draw_input_field($name, '', '', $required, 'file'); return $field; } //// // Output a selection field - alias function for tep_draw_checkbox_field() and tep_draw_radio_field() function tep_draw_selection_field($name, $type, $value = '', $checked = false, $compare = '') { $selection = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"'; if (tep_not_null($value)) $selection .= ' value="' . tep_output_string($value) . '"'; if ( ($checked == true) || (isset($GLOBALS[$name]) && is_string($GLOBALS[$name]) && ($GLOBALS[$name] == 'on')) || (isset($value) && isset($GLOBALS[$name]) && (stripslashes($GLOBALS[$name]) == $value)) || (tep_not_null($value) && tep_not_null($compare) && ($value == $compare)) ) { $selection .= ' CHECKED'; } $selection .= '>'; return $selection; } //// // Output a form checkbox field function tep_draw_checkbox_field($name, $value = '', $checked = false, $compare = '') { return tep_draw_selection_field($name, 'checkbox', $value, $checked, $compare); } //// // Output a form radio field function tep_draw_radio_field($name, $value = '', $checked = false, $compare = '') { return tep_draw_selection_field($name, 'radio', $value, $checked, $compare); } //// // Output a form textarea field function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) { $field = '<textarea name="' . tep_output_string($name) . '" wrap="' . tep_output_string($wrap) . '" cols="' . tep_output_string($width) . '" rows="' . tep_output_string($height) . '"'; if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) { $field .= tep_output_string_protected(stripslashes($GLOBALS[$name])); } elseif (tep_not_null($text)) { $field .= tep_output_string_protected($text); } $field .= '</textarea>'; return $field; } //// // Output a form hidden field function tep_draw_hidden_field($name, $value = '', $parameters = '') { $field = '<input type="hidden" name="' . tep_output_string($name) . '"'; if (tep_not_null($value)) { $field .= ' value="' . tep_output_string($value) . '"'; } elseif (isset($GLOBALS[$name]) && is_string($GLOBALS[$name])) { $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"'; } if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; return $field; } //// // Output a form pull down menu function tep_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) { $field = '<select name="' . tep_output_string($name) . '"'; if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]); for ($i=0, $n=sizeof($values); $i<$n; $i++) { $field .= '<option value="' . tep_output_string($values[$i]['id']) . '"'; if ($default == $values[$i]['id']) { $field .= ' SELECTED'; } $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>'; } $field .= '</select>'; if ($required == true) $field .= TEXT_FIELD_REQUIRED; return $field; } //MVS Start //// // Creates a pull-down list of countries function tep_get_country_list($name, $selected = '', $parameters = '') { $countries = tep_get_countries(); return tep_draw_pull_down_menu($name, $countries, $selected, $parameters); } //MVS End ?> Quote Link to comment Share on other sites More sharing options...
♥cigarsforless Posted March 31, 2008 Share Posted March 31, 2008 Have you been working within the "function" that actually sends the email or the "call" to it? What I mean is this: if you are working within the function itself, that is your problem, only one vendor at a time is called during the checkout process to send the email. Outside the function(around line 445 in an unmodified checkout_process.php file) you will find this: if ($order_sent_ckeck == 'no') { $status=''; $oID=$insert_id; $vendor_order_sent = false; $status=$order->info['order_status']; vendors_email($vendors_id, $oID, $status, $vendor_order_sent); This is the section where you should modify the order number($oID=$insert_id;). This is wthin a "while" loop, so you should be able to create a count and get your letter to add properly. Good luck, Craig :) Craig, I could kiss you! Thanks to your suggestions I have FINALLY got it working the way I want!!! Don't know what I would have done without you bud! If anyone is interested, I can post the code for my heavily modified vendor email (must say it looks darn good if I do say so myself) Thanks go out to you to Jim, the two of you have helped immensely and I can now stop banging my head against the wall :-) Quote Jim Bullen - President The Cigar Hut Group of Companies Installed add-ons: (that now need to be upgraded to OSC CE Phoenix) PWA, MVS, Easy Populate, Dynamic Sitemap, Featured Products, MVS Order Editor, MVS Shipping Estimator, Google XML Sitemap, About Us, Ad Tracker, Address Enhancer, Also Purchased, Backorders, Category Descriptions, Dynamic Meta Tags, Contact Us Email Subjects, Country state Selector, Extra Address Line, Order Number in Email Subject, OSC Affiliate, Product Extra Fields, Review Approval System, Reviews in Product Display, Sold Out, Sold Out (but Displayed), Ultimate SEO URL's, Updated Spiders, Welcome Email Password, Pending Order Email, Who's Online Enhancement, CCGV, Easy Discounts, Customer Comments, Request a Review, Sales Report, plus many many more! Link to comment Share on other sites More sharing options...
blucollarguy Posted March 31, 2008 Author Share Posted March 31, 2008 Craig, I could kiss you! Thanks to your suggestions I have FINALLY got it working the way I want!!! Don't know what I would have done without you bud! If anyone is interested, I can post the code for my heavily modified vendor email (must say it looks darn good if I do say so myself) Thanks go out to you to Jim, the two of you have helped immensely and I can now stop banging my head against the wall :-) I appreciate it, but you can keep the kisses! LOL :lol: Enjoy! :thumbsup: Craig :) Quote Happy Coding! Craig Garrison Sr Anything worth having, is worth working for. Multi Vendor Shipping V1.1 Demo Catalog 3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout. Multi Vendor Shipping V1.1 Demo Admin login: webmaster@blucollarsales.com pass: mvs_demo MVS Thread: Multi-Vendor Shipping My contribs: Download Multi Vendor Shipping V1.1 Vendor Email Vendor Info in easypopulate EZ Price Updater And more to come! Link to comment Share on other sites More sharing options...
UncleSteve Posted March 31, 2008 Share Posted March 31, 2008 snip....Good luck, Craig :) I need the luck :) Thanks for your reply. I've looked for the bit of code you said to look for, and this is the nearest I can find //MVS - added insert for new orders_shipping table $shipping_array = $shipping['vendor']; foreach ($shipping_array as $vendors_id => $shipping_data) { $vendors_query = tep_db_query("select vendors_name from " . TABLE_VENDORS . " where vendors_id = '" . (int)$vendors_id . "'" ); $vendors_name = 'Unknown'; if ($vendors = tep_db_fetch_array($vendors_query)) { $vendors_name = $vendors['vendors_name']; } $shipping_method_array = explode ('_', $shipping_data['id']); if ($shipping_method_array[0] == 'fedex1') { $shipping_method = 'Federal Express'; } elseif ($shipping_method_array[0] == 'upsxml') { $shipping_method = 'UPS'; } elseif ($shipping_method_array[0] == 'usps') { $shipping_method = 'USPS'; } else { $shipping_method = $shipping_method_array[0]; } $sql_data_array = array('orders_id' => $insert_id, 'vendors_id' => $vendors_id, 'shipping_module' => $shipping_method, 'shipping_method' => $shipping_data['title'], 'shipping_cost' => $shipping_data['cost'], 'shipping_tax' => $shipping_data['ship_tax'], 'vendors_name' => $vendors_name, 'vendor_order_sent' => 'no' ); tep_db_perform(TABLE_ORDERS_SHIPPING, $sql_data_array); } //MVS End Which appears the same as from the original contrib. but without your second line of code shown in your suggestion if (SELECT_VENDOR_SHIPPING == 'true') { So I'm wondering if I've missed an up-date somewhere? With regards to your follow up That is most likely the "foreach" warning you are getting, but if "SELECT_VENDOR_SHIPPING" is off(or false in the database when MVS is turned off) it won't execute, so there should be no warning. Double check that you hadn't accidently added two lines to the database for this "key", I have seen that happen a number of times. I can only find one occurance of SELECT_VENDOR_SHIPPING in my database. You can check by "printing" out that constant on any other page, say the header.php file for instance: echo '<br>This is the MVS setting: ' . SELECT_VENDOR_SHIPPING; And find out what the site thinks it is. Sorry, this bit has gone over my head. Can you advise further please? Thanks Steve Quote ____________________________________________________________________ ____________________________________________________________________ Link to comment Share on other sites More sharing options...
blucollarguy Posted March 31, 2008 Author Share Posted March 31, 2008 SNIP......With regards to your follow up I can only find one occurance of SELECT_VENDOR_SHIPPING in my database. Sorry, this bit has gone over my head. Can you advise further please? Thanks Steve Ok, this is a pretty simple debug technique, with "global constants"(a constant that is set in "application_top.php" and is available to EVERY page throughout the site) you can simply add that line code to the includes/header.php file, like this: if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="headerInfo"> <td class="headerInfo"><?php echo htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td> </tr> </table> <?php } echo '<br>This is the MVS setting: ' . SELECT_VENDOR_SHIPPING; ?> Note I added it before the closing php tag, go to any page on your site and it will "print out" on your screen and you will see what the site thinks that constant is. I don't think you need to do this though, your second point Which appears the same as from the original contrib. but without your second line of code shown in your suggestion if (SELECT_VENDOR_SHIPPING == 'true') { So I'm wondering if I've missed an up-date somewhere? Is what is allowing that block of code to execute even when MVS is turned off, which it shouldn't. So change that block to this: if (SELECT_VENDOR_SHIPPING == 'true') { //MVS - added insert for new orders_shipping table $shipping_array = $shipping['vendor']; foreach ($shipping_array as $vendors_id => $shipping_data) { $vendors_query = tep_db_query("select vendors_name from " . TABLE_VENDORS . " where vendors_id = '" . (int)$vendors_id . "'" ); $vendors_name = 'Unknown'; if ($vendors = tep_db_fetch_array($vendors_query)) { $vendors_name = $vendors['vendors_name']; } $shipping_method_array = explode ('_', $shipping_data['id']); if ($shipping_method_array[0] == 'fedex1') { $shipping_method = 'Federal Express'; } elseif ($shipping_method_array[0] == 'upsxml') { $shipping_method = 'UPS'; } elseif ($shipping_method_array[0] == 'usps') { $shipping_method = 'USPS'; } else { $shipping_method = $shipping_method_array[0]; } $sql_data_array = array('orders_id' => $insert_id, 'vendors_id' => $vendors_id, 'shipping_module' => $shipping_method, 'shipping_method' => $shipping_data['title'], 'shipping_cost' => $shipping_data['cost'], 'shipping_tax' => $shipping_data['ship_tax'], 'vendors_name' => $vendors_name, 'vendor_order_sent' => 'no' ); tep_db_perform(TABLE_ORDERS_SHIPPING, $sql_data_array); } }// end if MVS enabled //MVS End And it won't execute if MVS is turned off. I am fairly confident that "if" statement has been there since the first release, but I could be wrong about that. Good luck Steve, Craig :) Quote Happy Coding! Craig Garrison Sr Anything worth having, is worth working for. Multi Vendor Shipping V1.1 Demo Catalog 3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout. Multi Vendor Shipping V1.1 Demo Admin login: webmaster@blucollarsales.com pass: mvs_demo MVS Thread: Multi-Vendor Shipping My contribs: Download Multi Vendor Shipping V1.1 Vendor Email Vendor Info in easypopulate EZ Price Updater And more to come! Link to comment Share on other sites More sharing options...
♥kymation Posted March 31, 2008 Share Posted March 31, 2008 <snip> I am fairly confident that "if" statement has been there since the first release, but I could be wrong about that. Good luck Steve, Craig :) Sorry Craig, that line is not in 1.0 or 1.1. I think it was added in one of the subsequent patches. I really need to find the time to do a patch rollup for MVS.... Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
blucollarguy Posted March 31, 2008 Author Share Posted March 31, 2008 Sorry Craig, that line is not in 1.0 or 1.1. I think it was added in one of the subsequent patches. I really need to find the time to do a patch rollup for MVS.... Regards Jim AHHHHHHH!!! Well now we know the problem don't we! LOL Oh boy, we really do need to get this updated properly, I am trying to make time but it is very difficult. By the time I get to it it will be time for a re-write for MS3! oy! Craig :blink: Quote Happy Coding! Craig Garrison Sr Anything worth having, is worth working for. Multi Vendor Shipping V1.1 Demo Catalog 3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout. Multi Vendor Shipping V1.1 Demo Admin login: webmaster@blucollarsales.com pass: mvs_demo MVS Thread: Multi-Vendor Shipping My contribs: Download Multi Vendor Shipping V1.1 Vendor Email Vendor Info in easypopulate EZ Price Updater And more to come! Link to comment Share on other sites More sharing options...
UncleSteve Posted April 1, 2008 Share Posted April 1, 2008 Ok, this is a pretty simple debug technique, with "global constants"(a constant that is set in "application_top.php" and is available to EVERY page throughout the site) you can simply add that line code to the includes/header.php file, like this: snip... Note I added it before the closing php tag, go to any page on your site and it will "print out" on your screen and you will see what the site thinks that constant is. Sorted this, I can now see in the header is MVS is on or off :) I don't think you need to do this though, your second pointIs what is allowing that block of code to execute even when MVS is turned off, which it shouldn't. So change that block to this: snip..... And it won't execute if MVS is turned off. I am fairly confident that "if" statement has been there since the first release, but I could be wrong about that. Good luck Steve, Craig :) I pasted in your code above, and I no longer have any error pages :) However...... with MVS switched off, I don't get any vendor emails :( Any idea where I should be looking to make good please? Thanks once again for your help :) Quote ____________________________________________________________________ ____________________________________________________________________ Link to comment Share on other sites More sharing options...
blucollarguy Posted April 1, 2008 Author Share Posted April 1, 2008 Sorted this, I can now see in the header is MVS is on or off :)I pasted in your code above, and I no longer have any error pages :) However...... with MVS switched off, I don't get any vendor emails :( Any idea where I should be looking to make good please? Thanks once again for your help :) Well Steve, this would be where things get complicated. With MVS turned off, no vendor information is populated in the database, so in order for you to get vendor emails, you will need to do some real work now. The function we have been referencing over the last page or so is the function that sends the emails, in order for the emails to be sent, there needs to be vendors in the order(which won't happen with MVS turned off), so you will need to make changes to several parts of the code to pass enough information in the order to get the vendor information to be added to the database and then to send the email. I think this is what several people have asked about. I have looked at this a few times recently as you know Steve, and I think I know how to do it, just don't know if I have the time right now. Look through the checkout_process.php file for all the Vendor related data, then track it back through the checkout to collect it. This really should only product and Vendor specific information related to each product. You will probably need to "artificially populate" an array or 2 to make this work. I expect you can do it if you have done as much as you have posted about here, so go for it. Just remember to backup every file before you start editing, trial and error is a major educational tool. Post here with specific questions and maybe between Jim and myself and everyone else, we can get it worked out. Good luck :thumbsup: , Craig :) Quote Happy Coding! Craig Garrison Sr Anything worth having, is worth working for. Multi Vendor Shipping V1.1 Demo Catalog 3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout. Multi Vendor Shipping V1.1 Demo Admin login: webmaster@blucollarsales.com pass: mvs_demo MVS Thread: Multi-Vendor Shipping My contribs: Download Multi Vendor Shipping V1.1 Vendor Email Vendor Info in easypopulate EZ Price Updater And more to come! Link to comment Share on other sites More sharing options...
UncleSteve Posted April 1, 2008 Share Posted April 1, 2008 Look through the checkout_process.php file for all the Vendor related data, then track it back through the checkout to collect it. This really should only product and Vendor specific information related to each product. In an effort to verify my files I uploaded a set of checkout_*.php from a virgin osc install. Only to find I still don't get any vendor emails :blink: I tried an order with the admin MVS set to true and false. So perhaps the error is not with these files. Any idea where else I should look please? Thinking aloud... seems strange that with the MVS modified files I should get vendor emails with MVS set to true. Is there a file outside the checkout_*.php files that I should look at? Thanks Steve Quote ____________________________________________________________________ ____________________________________________________________________ Link to comment Share on other sites More sharing options...
jdice Posted April 1, 2008 Share Posted April 1, 2008 Hi...can anyone help??? I have uploaded MVS to my store. I have not done the modules file yet. But when I try to login to my administration...I get a blank page that says this: Error! Unable to determine the page link! Function used: tep_href_link('', '', '') I don't know what I am looking for to fix it? I have a BTS template...but from I am reading other BTS users have used this MVS contribution. You do have to place a couple things in the fallback files...but I have done that lots of times with other contributions...so I am making changes in the correct places. Someone suggested my html_output file. Should I look in ...admin/includes/functions/html_output? Well here is the html_output file...if anyone can look at it and help. Sorry...I hate take up space Janet <?php /* $Id: html_output.php,v 1.29 2003/06/25 20:32:44 hpdl Exp $ Modified 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 */ //// // The HTML href link wrapper function // function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL') { if ($page == '') { die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>'); } if ($connection == 'NONSSL') { $link = HTTP_SERVER . DIR_WS_ADMIN; } elseif ($connection == 'SSL') { if (ENABLE_SSL == 'true') { $link = HTTPS_SERVER . DIR_WS_ADMIN; } else { $link = HTTP_SERVER . DIR_WS_ADMIN; } } else { die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>'); } if ($parameters == '') { $link = $link . $page . '?' . SID; } else { $link = $link . $page . '?' . $parameters . '&' . SID; } while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1); return $link; // } function tep_catalog_href_link($page = '', $parameters = '', $connection = 'NONSSL') { if ($connection == 'NONSSL') { $link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG; } elseif ($connection == 'SSL') { if (ENABLE_SSL_CATALOG == 'true') { $link = HTTPS_CATALOG_SERVER . DIR_WS_CATALOG; } else { $link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG; } } else { die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>'); } if ($parameters == '') { $link .= $page; } else { $link .= $page . '?' . $parameters; } while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1); return $link; } //// // The HTML image wrapper function function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') { $image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"'; if (tep_not_null($alt)) { $image .= ' title=" ' . tep_output_string($alt) . ' "'; } if (tep_not_null($width) && tep_not_null($height)) { $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"'; } if (tep_not_null($parameters)) $image .= ' ' . $parameters; $image .= '>'; return $image; } //// // The HTML form submit button wrapper function // Outputs a button in the selected language function tep_image_submit($image, $alt = '', $parameters = '') { global $language; $image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"'; if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "'; if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters; $image_submit .= '>'; return $image_submit; } //// // Draw a 1 pixel black line function tep_black_line() { return tep_image(DIR_WS_IMAGES . 'pixel_black.gif', '', '100%', '1'); } //// // Output a separator either through whitespace, or with an image function tep_draw_separator($image = 'pixel_black.gif', $width = '100%', $height = '1') { return tep_image(DIR_WS_IMAGES . $image, '', $width, $height); } //// // Output a function button in the selected language function tep_image_button($image, $alt = '', $params = '') { global $language; return tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image, $alt, '', '', $params); } //// // javascript to dynamically update the states/provinces list when the country is changed // TABLES: zones function tep_js_zone_list($country, $form, $field) { $countries_query = tep_db_query("select distinct zone_country_id from " . TABLE_ZONES . " order by zone_country_id"); $num_country = 1; $output_string = ''; while ($countries = tep_db_fetch_array($countries_query)) { if ($num_country == 1) { $output_string .= ' if (' . $country . ' == "' . $countries['zone_country_id'] . '") {' . "\n"; } else { $output_string .= ' } else if (' . $country . ' == "' . $countries['zone_country_id'] . '") {' . "\n"; } $states_query = tep_db_query("select zone_name, zone_id from " . TABLE_ZONES . " where zone_country_id = '" . $countries['zone_country_id'] . "' order by zone_name"); $num_state = 1; while ($states = tep_db_fetch_array($states_query)) { if ($num_state == '1') $output_string .= ' ' . $form . '.' . $field . '.options[0] = new Option("' . PLEASE_SELECT . '", "");' . "\n"; $output_string .= ' ' . $form . '.' . $field . '.options[' . $num_state . '] = new Option("' . $states['zone_name'] . '", "' . $states['zone_id'] . '");' . "\n"; $num_state++; } $num_country++; } $output_string .= ' } else {' . "\n" . ' ' . $form . '.' . $field . '.options[0] = new Option("' . TYPE_BELOW . '", "");' . "\n" . ' }' . "\n"; return $output_string; } //// // Output a form function tep_draw_form($name, $action, $parameters = '', $method = 'post', $params = '') { $form = '<form name="' . tep_output_string($name) . '" action="'; if (tep_not_null($parameters)) { $form .= tep_href_link($action, $parameters); } else { $form .= tep_href_link($action); } $form .= '" method="' . tep_output_string($method) . '"'; if (tep_not_null($params)) { $form .= ' ' . $params; } $form .= '>'; return $form; } //// // Output a form input field function tep_draw_input_field($name, $value = '', $parameters = '', $required = false, $type = 'text', $reinsert_value = true) { $field = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"'; if (isset($GLOBALS[$name]) && ($reinsert_value == true) && is_string($GLOBALS[$name])) { $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"'; } elseif (tep_not_null($value)) { $field .= ' value="' . tep_output_string($value) . '"'; } if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; if ($required == true) $field .= TEXT_FIELD_REQUIRED; return $field; } //// // Output a form password field function tep_draw_password_field($name, $value = '', $required = false) { $field = tep_draw_input_field($name, $value, 'maxlength="40"', $required, 'password', false); return $field; } //// // Output a form filefield function tep_draw_file_field($name, $required = false) { $field = tep_draw_input_field($name, '', '', $required, 'file'); return $field; } //// // Output a selection field - alias function for tep_draw_checkbox_field() and tep_draw_radio_field() function tep_draw_selection_field($name, $type, $value = '', $checked = false, $compare = '') { $selection = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"'; if (tep_not_null($value)) $selection .= ' value="' . tep_output_string($value) . '"'; if ( ($checked == true) || (isset($GLOBALS[$name]) && is_string($GLOBALS[$name]) && ($GLOBALS[$name] == 'on')) || (isset($value) && isset($GLOBALS[$name]) && (stripslashes($GLOBALS[$name]) == $value)) || (tep_not_null($value) && tep_not_null($compare) && ($value == $compare)) ) { $selection .= ' CHECKED'; } $selection .= '>'; return $selection; } //// // Output a form checkbox field function tep_draw_checkbox_field($name, $value = '', $checked = false, $compare = '') { return tep_draw_selection_field($name, 'checkbox', $value, $checked, $compare); } //// // Output a form radio field function tep_draw_radio_field($name, $value = '', $checked = false, $compare = '') { return tep_draw_selection_field($name, 'radio', $value, $checked, $compare); } //// // Output a form textarea field function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) { $field = '<textarea name="' . tep_output_string($name) . '" wrap="' . tep_output_string($wrap) . '" cols="' . tep_output_string($width) . '" rows="' . tep_output_string($height) . '"'; if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) { $field .= tep_output_string_protected(stripslashes($GLOBALS[$name])); } elseif (tep_not_null($text)) { $field .= tep_output_string_protected($text); } $field .= '</textarea>'; return $field; } //// // Output a form hidden field function tep_draw_hidden_field($name, $value = '', $parameters = '') { $field = '<input type="hidden" name="' . tep_output_string($name) . '"'; if (tep_not_null($value)) { $field .= ' value="' . tep_output_string($value) . '"'; } elseif (isset($GLOBALS[$name]) && is_string($GLOBALS[$name])) { $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"'; } if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; return $field; } //// // Output a form pull down menu function tep_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) { $field = '<select name="' . tep_output_string($name) . '"'; if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]); for ($i=0, $n=sizeof($values); $i<$n; $i++) { $field .= '<option value="' . tep_output_string($values[$i]['id']) . '"'; if ($default == $values[$i]['id']) { $field .= ' SELECTED'; } $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>'; } $field .= '</select>'; if ($required == true) $field .= TEXT_FIELD_REQUIRED; return $field; } //MVS Start //// // Creates a pull-down list of countries function tep_get_country_list($name, $selected = '', $parameters = '') { $countries = tep_get_countries(); return tep_draw_pull_down_menu($name, $countries, $selected, $parameters); } //MVS End ?> STILL NEEDING HELP. I just realized that ultimate seo urls also changes the html_output file also....could these two contributions...MVS and ULTIMATE SEO URLS be causing conflict? Could this be why I am shown this error(below) after I login to my administration? Error! Unable to determine the page link! Function used: tep_href_link('', '', '') Anyone familiar with hardcoding enough to help and maybe take a look at my html_output file above??? Janet Quote Link to comment Share on other sites More sharing options...
mattm58 Posted April 1, 2008 Share Posted April 1, 2008 I've been looking at this module and it seems to fit most of my needs. I ship from two different vendors, one on each coast, so shipping varies greatly between them. My issue is that I have both paypal express checkout and google checkout on my site. What happens with these when a user places an order and has items from both vendors? Any idea on how to address this since you pass the shipping cost to paypal/google? Quote Link to comment Share on other sites More sharing options...
UncleSteve Posted April 1, 2008 Share Posted April 1, 2008 I've been looking at this module and it seems to fit most of my needs. I ship from two different vendors, one on each coast, so shipping varies greatly between them. My issue is that I have both paypal express checkout and google checkout on my site. What happens with these when a user places an order and has items from both vendors? Any idea on how to address this since you pass the shipping cost to paypal/google? Depending how you set the system up, depends how the shipping is charged. You can have various suppliers whom you set up their various shipping charges, so for one, you can set it up as $10 per delivery, and the other $2 per item. then when the customer buys one item from each of your suppliers, they will have the products listed by supplier and what is being charged for shipping so your customer would be charged $12. However you can also set it up so goods are sent from various suppliers, but (as far as I know so far..) you need a common shipping cost across your product range, so you could set up the shipping so the customer is charged $1 per $10 spent, then have it capped at a max cost of $10. Basically there is all sorts of ways it can be set up. Payment methods is a different issue to MVS. Hope the above helps :) Quote ____________________________________________________________________ ____________________________________________________________________ Link to comment Share on other sites More sharing options...
jdice Posted April 3, 2008 Share Posted April 3, 2008 STILL NEEDING HELP. I just realized that ultimate seo urls also changes the html_output file also....could these two contributions...MVS and ULTIMATE SEO URLS be causing conflict? Could this be why I am shown this error(below) after I login to my administration? Error! Unable to determine the page link! Function used: tep_href_link('', '', '') Anyone familiar with hardcoding enough to help and maybe take a look at my html_output file above??? Janet Hello, I totally tookout the administrative side and reuploaded. I had a couple files in the wrong place and when I thought I uploaded database files...they weren't there. I reloaded them and now vendor module is in. Janet Quote Link to comment Share on other sites More sharing options...
jdice Posted April 3, 2008 Share Posted April 3, 2008 Hello, I am now doing the table modules under shipping. I am needing some example. Where it says.... There are six constants in the above code that need to be changed. They are similar to the constants that we commented out in the previous section. Using the commented-out code, make changes to the above constants to make them match the ones that we removed. Don't delete the underscore at the end of the new constants; we need that. Well...here is a commented out constant from above... //$this->sort_order = MODULE_SHIPPING_TABLE_SORT_ORDER; Here is the code I am to change to make it look alike... $this->sort_order = @constant('MODULE_SHIPPING_TABLE_SORT_ORDER_' . $vendors_id); } else { What do I change? What should it look like? do i take $vendors_id out? Janet Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.