talon177 Posted June 12, 2004 Share Posted June 12, 2004 Thank a lot for the nice contribution! It works very well.Only one thing I would like to change - make it as pop up windows with the link from Shopping cart. Can anybody help me with some advices how to make it? that would be nice Quote Link to comment Share on other sites More sharing options...
Goanna Posted June 21, 2004 Share Posted June 21, 2004 I downloaded and installed the MS2 version and it has no dropdown menus to select country nor does it have a field to enter the zip code, and it also isnt showing the please log in for correct quotes bar. What is up with that? Quote Link to comment Share on other sites More sharing options...
JonoB Posted June 21, 2004 Share Posted June 21, 2004 Ummmmm, read the "Readme" file Quote Link to comment Share on other sites More sharing options...
Goanna Posted June 21, 2004 Share Posted June 21, 2004 hmm, lol. I guess I skipped over that part thinking it was just the credits, I went right to the install directions. Thanks. Quote Link to comment Share on other sites More sharing options...
Spaceboy Posted July 1, 2004 Share Posted July 1, 2004 I will shortly publish a new version of this contribution with some bug fixes and the fact that all text labels are localized, eg. stored in a language file. I will post here when done. Didier. Quote Published modified Contributions Link to comment Share on other sites More sharing options...
Spaceboy Posted July 2, 2004 Share Posted July 2, 2004 Version v1.90 tested and published today. URL : http://www.oscommerce.com/community/contributions,1781 Here is the changelog : 1.90 by DDB --------------- - all text labels can be localized and can be found in their propre language file - update packaging so that all files are in the correct place - wrong place of "ship to address" in case of free shipping I also did a change in the code so it is not needed anymore to click on a button to recalculate the shipping estimate when you change the country. As I only have a country field, this works for me. But for people with more listboxes, this cannot be implemented I guess. You'll have to add the "recalculate" button. Nice contribution ! Now up to the next one... B) Didier. Quote Published modified Contributions Link to comment Share on other sites More sharing options...
Spaceboy Posted July 2, 2004 Share Posted July 2, 2004 Thank a lot for the nice contribution! It works very well.Only one thing I would like to change - make it as pop up windows with the link from Shopping cart. Can anybody help me with some advices how to make it? that would be nice Do not forget that a lot of these javascripts popup windows are being blocked by Google, Norton, MSN. I just included the estimation box at the end of my shipping cart. Works for me. Didier. Quote Published modified Contributions Link to comment Share on other sites More sharing options...
talon177 Posted July 2, 2004 Share Posted July 2, 2004 Has anyone integrated ccgv with this contrib i believe virtual weight isnt added to ship in cart therefore it adds the virtual item on checkout as a weighted item. Quote Link to comment Share on other sites More sharing options...
Millie Posted July 5, 2004 Share Posted July 5, 2004 Having difficulty with this after upgrading to MS2. For a customer not logged in this error occurs the first time a customer accesses shopping_cart.php Fatal error: Call to a member function on a non-object in /home2/millie/stonymountainbotanicals-www/includes/classes/xmldocument.php on line 57 Refresh the page and the error goes away. There are a couple other errors that occur depending upon the sequence of page views, logging in and shopping. One of the other errors that appears in shopping _cart.php is Warning: htmlspecialchars() expects parameter 1 to be a string, array given in /home/usr/includes/functions/general.php on line 42. Again this is not always - I can recreate this error using a preexisting account. I suspect I missed some in changing the database from MS2.1 to MS2.2. Would appreciate any help finding the right direction. Millie PS, I updated to Ship-in cart 2.00 by Acheron in hopes of resolving problem but issues are the same. Quote Link to comment Share on other sites More sharing options...
Pixxi Posted July 8, 2004 Share Posted July 8, 2004 The htmlspecialchars() error has been covered earlier in this thread. It occurs because you're logging in more than once as the same user during the same browser session and the same oscid is being re-used, which causes problems displaying addresses - you need to add a line to your logoff.php file to close the session. The line you need to add is: // added to fix ship in cart oscsid problem... tep_session_unregister('cart_address_id'); Quote Link to comment Share on other sites More sharing options...
Pixxi Posted July 9, 2004 Share Posted July 9, 2004 Ooops - I meant to say you're logging in during the same browser session as different users but the previous oscID is being re-used. Quote Link to comment Share on other sites More sharing options...
PVK Posted July 10, 2004 Share Posted July 10, 2004 Hello acheron. I just installed your latest version (2.0) And followed all directions . After i also added your all versions fix i wanted to check if all worked as expected. In admin all seems fine , however in the catalog side it comes up with this error: Parse error: parse error, unexpected $ in /home/mywebsite/www/shop/includes/modules/shipping_estimator.php on line 348 ------------------------------------------------------------------------------------ when i then just installed the 1.83 version and changed the // Only do when something is in the cart if ($cart->count_contents() > 0) { INTO: // Only do when something is in the cart and customer is logged in if (($cart->count_contents() > 0) && (tep_session_is_registered('customer_id'))) { I did not got errors, but this is not completely a good solution i guess since by doing this i combined an old with a new part innit??? I only did this to see if i had done something wrong, but no i believe that in the 2.0 version there nust be an error ??? ------------------------------------------------------------------------------------------ Could you look at the code from my page which is giving me the error, so maybe you know how to fix it? This is the code from my shipping estimator.php: <?php /* $Id: shipping_estimator.php,v 2.00 2004/07/01 15:16:07 eml Exp $ v2.00 by Acheron (see Install.txt for partial version history) Copyright © 2004 Released under the GNU General Public License */ ?> <!-- shipping_estimator //--> <script language="JavaScript"> function shipincart_submit(sid){ if(sid){ document.estimator.sid.value=sid; } document.estimator.submit(); return false; } </script> <table align="center"><tr valign="top"><td> <?php // Only do when something is in the cart and customer is logged in if (($cart->count_contents() > 0) && (tep_session_is_registered('customer_id'))) { require(DIR_WS_LANGUAGES . $language . '/modules/' . FILENAME_SHIPPING_ESTIMATOR); // shipping cost require('includes/classes/http_client.php'); // shipping in basket //if($cart->get_content_type() !== 'virtual') { if (tep_session_is_registered('customer_id')) { // user is logged in if (isset($HTTP_POST_VARS['address_id'])){ // user changed address $sendto = $HTTP_POST_VARS['address_id']; }elseif (tep_session_is_registered('cart_address_id')){ // user once changed address $sendto = $cart_address_id; }else{ // first timer $sendto = $customer_default_address_id; } // set session now $cart_address_id = $sendto; tep_session_register('cart_address_id'); // set shipping to null ! multipickup changes address to store address... $shipping=''; // include the order class (uses the sendto !) require(DIR_WS_CLASSES . 'order.php'); $order = new order; }else{ // user not logged in ! if (isset($HTTP_POST_VARS['country_id'])){ // country is selected $country_info = tep_get_countries($HTTP_POST_VARS['country_id'],true); $order->delivery = array('postcode' => $HTTP_POST_VARS['zip_code'], 'country' => array('id' => $HTTP_POST_VARS['country_id'], 'title' => $country_info['countries_name'], 'iso_code_2' => $country_info['countries_iso_code_2'], 'iso_code_3' => $country_info['countries_iso_code_3']), 'country_id' => $HTTP_POST_VARS['country_id'], //add state zone_id 'zone_id' => $HTTP_POST_VARS['state'], 'format_id' => tep_get_address_format_id($HTTP_POST_VARS['country_id'])); $cart_country_id = $HTTP_POST_VARS['country_id']; tep_session_register('cart_country_id'); //add state zone_id $cart_zone = $HTTP_POST_VARS['zone_id']; tep_session_register('cart_zone'); $cart_zip_code = $HTTP_POST_VARS['zip_code']; tep_session_register('cart_zip_code'); }elseif (tep_session_is_registered('cart_country_id')){ // session is available $country_info = tep_get_countries($cart_country_id,true); $order->delivery = array('postcode' => $cart_zip_code, 'country' => array('id' => $cart_country_id, 'title' => $country_info['countries_name'], 'iso_code_2' => $country_info['countries_iso_code_2'], 'iso_code_3' => $country_info['countries_iso_code_3']), 'country_id' => $cart_country_id, 'format_id' => tep_get_address_format_id($cart_country_id)); } else { // first timer $cart_country_id = STORE_COUNTRY; tep_session_register('cart_country_id'); $country_info = tep_get_countries(STORE_COUNTRY,true); tep_session_register('cart_zip_code'); $order->delivery = array(//'postcode' => '', 'country' => array('id' => STORE_COUNTRY, 'title' => $country_info['countries_name'], 'iso_code_2' => $country_info['countries_iso_code_2'], 'iso_code_3' => $country_info['countries_iso_code_3']), 'country_id' => STORE_COUNTRY, 'format_id' => tep_get_address_format_id($HTTP_POST_VARS['country_id'])); } // set the cost to be able to calculate free shipping $order->info = array('total' => $cart->show_total(), // TAX ???? 'currency' => $currency, 'currency_value'=> $currencies->currencies[$currency]['value']); } // weight and count needed for shipping $total_weight = $cart->show_weight(); $total_count = $cart->count_contents(); require(DIR_WS_CLASSES . 'shipping.php'); $shipping_modules = new shipping; $quotes = $shipping_modules->quote(); $order->info['subtotal'] = $cart->total; // set selections for displaying $selected_country = $order->delivery['country']['id']; $selected_address = $sendto; //} // eo shipping cost // check free shipping based on order total if ( defined('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING') && (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true')) { switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) { case 'national': if ($order->delivery['country_id'] == STORE_COUNTRY) $pass = true; break; case 'international': if ($order->delivery['country_id'] != STORE_COUNTRY) $pass = true; break; case 'both': $pass = true; break; default: $pass = false; break; } $free_shipping = false; if ( ($pass == true) && ($order->info['total'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER)) { $free_shipping = true; include(DIR_WS_LANGUAGES . $language . '/modules/order_total/ot_shipping.php'); } } else { $free_shipping = false; } // begin shipping cost if(!$free_shipping && $cart->get_content_type() !== 'virtual'){ if (tep_not_null($HTTP_POST_VARS['sid'])){ list($module, $method) = explode('_', $HTTP_POST_VARS['sid']); $cart_sid = $HTTP_POST_VARS['sid']; tep_session_register('cart_sid'); }elseif (tep_session_is_registered('cart_sid')){ list($module, $method) = explode('_', $cart_sid); }else{ $module=""; $method=""; } if (tep_not_null($module)){ $selected_quote = $shipping_modules->quote($method, $module); if($selected_quote[0]['error'] || !tep_not_null($selected_quote[0]['methods'][0]['cost'])){ $selected_shipping = $shipping_modules->cheapest(); $order->info['shipping_method'] = $selected_shipping['title']; $order->info['shipping_cost'] = $selected_shipping['cost']; $order->info['total']+= $selected_shipping['cost']; }else{ $order->info['shipping_method'] = $selected_quote[0]['module'].' ('.$selected_quote[0]['methods'][0]['title'].')'; $order->info['shipping_cost'] = $selected_quote[0]['methods'][0]['cost']; $order->info['total']+= $selected_quote[0]['methods'][0]['cost']; $selected_shipping['title'] = $order->info['shipping_method']; $selected_shipping['cost'] = $order->info['shipping_cost']; $selected_shipping['id'] = $selected_quote[0]['id'].'_'.$selected_quote[0]['methods'][0]['id']; } }else{ $selected_shipping = $shipping_modules->cheapest(); $order->info['shipping_method'] = $selected_shipping['title']; $order->info['shipping_cost'] = $selected_shipping['cost']; $order->info['total']+= $selected_shipping['cost']; } } // virtual products use free shipping if($cart->get_content_type() == 'virtual') { $order->info['shipping_method'] = CART_SHIPPING_METHOD_FREE_TEXT . ' ' . CART_SHIPPING_METHOD_ALL_DOWNLOADS; $order->info['shipping_cost'] = 0; } if($free_shipping) { $order->info['shipping_method'] = MODULE_ORDER_TOTAL_SHIPPING_TITLE; $order->info['shipping_cost'] = 0; } $shipping=$selected_shipping; // end of shipping cost // end free shipping based on order total $info_box_contents = array(); $info_box_contents[] = array('text' => CART_SHIPPING_OPTIONS); new infoBoxHeading($info_box_contents, false, false); $ShipTxt= tep_draw_form('estimator', tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'), 'post'); //'onSubmit="return check_form();"' $ShipTxt.=tep_draw_hidden_field('sid', $selected_shipping['id']); $ShipTxt.='<table>'; if(sizeof($quotes)) { if (tep_session_is_registered('customer_id')) { // logged in if (CARTSHIP_SHOWWT == 'true') { $showweight = ' (' . $total_weight . ' ' . CARTSHIP_WTUNIT . ')'; } else { $showweight = ''; } if(CARTSHIP_SHOWIC == 'true'){ $ShipTxt.='<tr><td class="main">' . ($total_count == 1 ? ' <b>Item:</b></td><td colspan="2" class="main">' : ' <b>Items:</b></td><td colspan="2" class="main">') . $total_count . $showweight . '</td></tr>'; } $addresses_query = tep_db_query("select address_book_id, entry_city as city, entry_postcode as postcode, entry_state as state, entry_zone_id as zone_id, entry_country_id as country_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $customer_id . "'"); // only display addresses if more than 1 if (tep_db_num_rows($addresses_query) > 1){ while ($addresses = tep_db_fetch_array($addresses_query)) { $addresses_array[] = array('id' => $addresses['address_book_id'], 'text' => tep_address_format(tep_get_address_format_id($addresses['country_id']), $addresses, 0, ' ', ' ')); } $ShipTxt.='<tr><td colspan="3" class="main" nowrap>' . CART_SHIPPING_METHOD_ADDRESS .' '. tep_draw_pull_down_menu('address_id', $addresses_array, $selected_address, 'onchange="return shipincart_submit(\'\');"').'</td></tr>'; } $ShipTxt.='<tr valign="top"><td class="main"><b>' . CART_SHIPPING_METHOD_TO .'</b> </td><td colspan="2" class="main">'. tep_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br>') . '</td></tr>'; } else { // not logged in // $ShipTxt.=tep_output_warning(CART_SHIPPING_OPTIONS_LOGIN); if(CARTSHIP_SHOWIC == 'true'){ $ShipTxt.='<tr><td class="main">' . ($total_count == 1 ? ' <b>Item:</b></td><td colspan="2" class="main">' : ' <b>Items:</b></td><td colspan="2" class="main">') . $total_count . $showweight . '</td></tr>'; } if($cart->get_content_type() != 'virtual'){ if(CARTSHIP_SHOWCDD == 'true'){ $ShipTxt.='<tr><td colspan="3" class="main" nowrap>' . ENTRY_COUNTRY .' '. tep_get_country_list('country_id', $selected_country,'style="width=200"'); } //add state zone_id $state_array[] = array('id' => '', 'text' => 'Please Select'); $state_query = tep_db_query("select zone_name, zone_id from " . TABLE_ZONES . " where zone_country_id = '$selected_country' order by zone_country_id DESC, zone_name"); while ($state_values = tep_db_fetch_array($state_query)) { $state_array[] = array('id' => $state_values['zone_id'], 'text' => $state_values['zone_name']); } if(CARTSHIP_SHOWSDD == 'true'){ $ShipTxt.=' ' .ENTRY_STATE .' '. tep_draw_pull_down_menu('state',$state_array); } if(CARTSHIP_SHOWZDD == 'true'){ $ShipTxt.=' '.ENTRY_POST_CODE .' '. tep_draw_input_field('zip_code', $selected_zip, 'size="5"'); } // $ShipTxt.=' <a href="_" onclick="return shipincart_submit(\'\');">'.CART_SHIPPING_METHOD_RECALCULATE.'</a></td></tr>'; if(CARTSHIP_SHOWUB == 'true'){ $ShipTxt.=' <td><a href="_" onclick="return shipincart_submit(\'\');">'. tep_image_button('button_update_cart.gif', IMAGE_BUTTON_UPDATE_CART) . ' </a></td></td></tr>'; } } } if($cart->get_content_type() == 'virtual'){ // virtual product-download //$ShipTxt.='<tr><td colspan="3" class="main">'.tep_draw_separator().'</td></tr>'; $ShipTxt.='<tr><td class="main" colspan="3"> </td></tr><tr><td class="main" colspan="3"><i>' . CART_SHIPPING_METHOD_FREE_TEXT . ' ' . CART_SHIPPING_METHOD_ALL_DOWNLOADS . '</i></td></tr>'; }elseif ($free_shipping==1) { // order $total is free //$ShipTxt.='<tr><td colspan="3" class="main">'.tep_draw_separator().'</td></tr>'; $ShipTxt.='<tr><td class="main" colspan="3"> </td></tr><tr><td class="main" colspan="3"><i>' . sprintf(FREE_SHIPPING_DESCRIPTION, $currencies->format(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER)) . '</i></td><td> </td></tr>'; }else{ // shipping display $ShipTxt.='<tr><td colspan="3" class="main"> </td></tr><tr><td class="main"><b>' . CART_SHIPPING_CARRIER_TEXT . '</b></td><td class="main" align="left"><b>' . CART_SHIPPING_METHOD_TEXT . '</b></td><td class="main" align="right"><b>' . CART_SHIPPING_METHOD_RATES . '</b></td></tr>'; $ShipTxt.='<tr><td colspan="3" class="main">'.tep_draw_separator().'</td></tr>'; for ($i=0, $n=sizeof($quotes); $i<$n; $i++) { if(sizeof($quotes[$i]['methods'])==1){ // simple shipping method $thisquoteid = $quotes[$i]['id'].'_'.$quotes[$i]['methods'][0]['id']; $ShipTxt.= '<tr class="'.$extra.'">'; $ShipTxt.='<td class="main">'.$quotes[$i]['icon'].' </td>'; if($quotes[$i]['error']){ $ShipTxt.='<td colspan="2" class="main">'.$quotes[$i]['module'].' '; $ShipTxt.= '('.$quotes[$i]['error'].')</td></tr>'; }else{ if($selected_shipping['id'] == $thisquoteid){ $ShipTxt.='<td class="main"><a title="Select this method" href="_" onclick="return shipincart_submit(\''.$thisquoteid.'\');"><b>'.$quotes[$i]['module'].' '; $ShipTxt.= '('.$quotes[$i]['methods'][0]['title'].')</b></a> </td><td align="right" class="main"><b>'.$currencies->format(tep_add_tax($quotes[$i]['methods'][0]['cost'], $quotes[$i]['tax'])).'</b></td></tr>'; }else{ $ShipTxt.='<td class="main"><a title="Select this method" href="_" onclick="return shipincart_submit(\''.$thisquoteid.'\');">'.$quotes[$i]['module'].' '; $ShipTxt.= '('.$quotes[$i]['methods'][0]['title'].')</a> </td><td align="right" class="main">'.$currencies->format(tep_add_tax($quotes[$i]['methods'][0]['cost'], $quotes[$i]['tax'])).'</td></tr>'; } } } else { // shipping method with sub methods (multipickup) for ($j=0, $n2=sizeof($quotes[$i]['methods']); $j<$n2; $j++) { $thisquoteid = $quotes[$i]['id'].'_'.$quotes[$i]['methods'][$j]['id']; $ShipTxt.= '<tr class="'.$extra.'">'; $ShipTxt.='<td class="main">'.$quotes[$i]['icon'].' </td>'; if($quotes[$i]['error']){ $ShipTxt.='<td colspan="2" class="main">'.$quotes[$i]['module'].' '; $ShipTxt.= '('.$quotes[$i]['error'].')</td></tr>'; }else{ if($selected_shipping['id'] == $thisquoteid){ $ShipTxt.='<td class="main"><a title="Select this method" href="_" onclick="return shipincart_submit(\''.$thisquoteid.'\');"><b>'.$quotes[$i]['module'].' '; $ShipTxt.= '('.$quotes[$i]['methods'][$j]['title'].')</b></a> </td><td align="right" class="main"><b>'.$currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])).'</b></td><td class="main">'.tep_image(DIR_WS_ICONS . 'selected.gif', 'Selected').'</td></tr>'; }else{ $ShipTxt.='<td class="main"><a title="Select this method" href="_" onclick="return shipincart_submit(\''.$thisquoteid.'\');">'.$quotes[$i]['module'].' '; $ShipTxt.= '('.$quotes[$i]['methods'][$j]['title'].')</a> </td><td align="right" class="main">'.$currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])).'</td><td class="main"> </td></tr>'; } } } } } } } $ShipTxt.= '</table></form>'; $info_box_contents = array(); $info_box_contents[] = array('text' => $ShipTxt); new infoBox($info_box_contents); if (CARTSHIP_SHOWOT == 'true'){ // BOF get taxes if not logged in if (!tep_session_is_registered('customer_id')){ $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { $products_tax = tep_get_tax_rate($products[$i]['tax_class_id'], $order->delivery['country_id'],$order->delivery['zone_id']); $products_tax_description = tep_get_tax_description($products[$i]['tax_class_id'], $order->delivery['country_id'], $order->delivery['zone_id']); if (DISPLAY_PRICE_WITH_TAX == 'true') { //Modified by Strider 42 to correct the tax calculation when a customer is not logged in // $tax_val = ($products[$i]['final_price']-(($products[$i]['final_price']*100)/(100+$products_tax)))*$products[$i]['quantity']; $tax_val = (($products[$i]['final_price']/100)*$products_tax)*$products[$i]['quantity']; } else { $tax_val = (($products[$i]['final_price']*$products_tax)/100)*$products[$i]['quantity']; } $order->info['tax'] += $tax_val; $order->info['tax_groups']["$products_tax_description"] += $tax_val; // Modified by Strider 42 to correct the order total figure when shop displays prices with tax if (DISPLAY_PRICE_WITH_TAX == 'true') { $order->info['total']; } else { $order->info['total']+=$tax_val; } } } // EOF get taxes if not logged in (seems like less code than in order class) require(DIR_WS_CLASSES . 'order_total.php'); $order_total_modules = new order_total; //echo '</td><td align="right">'; // order total code $order_total_modules->process(); $info_box_contents = array(); $info_box_contents[] = array('text' => CART_OT); new infoBoxHeading($info_box_contents, false, false); $otTxt='<table align="right">'; $otTxt.=$order_total_modules->output().'</table>'; $info_box_contents = array(); $info_box_contents[] = array('text' => $otTxt); new infoBox($info_box_contents); } else { echo '<table align="center"><tr><td class="main"><i>Please login to view shipping and order total estimates.</i></td></tr></table>'; } ?> </td></tr></table> ------------------------------------------------------------------------------- I hope you can help thanks Quote Link to comment Share on other sites More sharing options...
martinmacca Posted July 10, 2004 Share Posted July 10, 2004 I think the errors in your last few lines of code, try changing the last 4 lines from new infoBox($info_box_contents); } else { echo '<table align="center"><tr><td class="main"><i>Please login to view shipping and order total estimates.</i></td></tr></table>'; } ?> </td></tr></table> to new infoBox($info_box_contents); } } ?> </td></tr></table> <!-- shipping_estimator_eof //--> I know the text Please login to view shipping and order total estimates will be missing, but it depends if you want to use it or not ? Quote Link to comment Share on other sites More sharing options...
PVK Posted July 10, 2004 Share Posted July 10, 2004 No i don't really care about that line, i just thought it should be there since acheron made the contribution and i assume that when you add a contribution it is written in such a way that you shouldn't alter it to make sure it works as expected. ----------------------------------------------------------- However i tried your solution but then the error became even worse :( This was the result: Warning: main(includes/languages/english/modules/FILENAME_SHIPPING_ESTIMATOR) [function.main]: failed to create stream: No such file or directory in /home/myshop/www/shop/includes/modules/shipping_estimator.php on line 29 Fatal error: main() [function.main]: Failed opening required 'includes/languages/english/modules/FILENAME_SHIPPING_ESTIMATOR' (include_path='.:/usr/local/lib/php') in /home/myshop/www/shop/includes/modules/shipping_estimator.php on line 29 -------------------------------------------------------------- Any ideas anyone, what is happening or wrong with acherons 2.0 contribution? i installed it on a clean ms2.2 installation and i followed the contribution to the letter. Acheron, are you there ??? :) Quote Link to comment Share on other sites More sharing options...
martinmacca Posted July 10, 2004 Share Posted July 10, 2004 you need to define FILENAME_SHIPPING_ESTIMATOR, as you did on step 5 on the install notes right <_< (5) /catalog/includes/filenames.php ADD: define('FILENAME_SHIPPING_ESTIMATOR', 'shipping_estimator.php'); that will get rid of that problem Quote Link to comment Share on other sites More sharing options...
PVK Posted July 10, 2004 Share Posted July 10, 2004 Freaky :ph34r: ! I was 100% sure i added that one, but when you pointed it out i checked it just to make sure i didn't try everything, and now it works immediately! THANKS for the pointer ! :P Quote Link to comment Share on other sites More sharing options...
martinmacca Posted July 10, 2004 Share Posted July 10, 2004 no probs ;) Quote Link to comment Share on other sites More sharing options...
danix Posted July 12, 2004 Share Posted July 12, 2004 I'm not sure if this is a known problem, but here goes. I was trying to figure out why sales tax was not being displayed in the shipping estimate. I thought perhaps it was not part of the contri, but it is. Here's why - if you enter your zipcode and select the correct state (as you should), then it displays the tax info. But, if you are lazy and just enter the zipcode (which I think many people will do) then you do not get the tax info, since it bases the tax criteria on the state and not the zip. Granted, this is a minor problem, and I'm not sure if it can be solved without reengineering the way tax is handled, such as adding to the database all valid zipcodes for the taxable state. One suggestion I have is to make the state a required field before you are able to submit the data. Quote Link to comment Share on other sites More sharing options...
Acheron Posted July 15, 2004 Share Posted July 15, 2004 No i don't really care about that line, i just thought it should be there since acheron made the contribution and i assume that when you add a contribution it is written in such a way that you shouldn't alter it to make sure it works as expected. It works perfectly as far as I know. If there are any problems which need to be addressed, PM me and I'll be happy to fix them. :) Quote Link to comment Share on other sites More sharing options...
Acheron Posted July 17, 2004 Share Posted July 17, 2004 I'm not sure if this is a known problem, but here goes.I was trying to figure out why sales tax was not being displayed in the shipping estimate. I thought perhaps it was not part of the contri, but it is. Here's why - if you enter your zipcode and select the correct state (as you should), then it displays the tax info. But, if you are lazy and just enter the zipcode (which I think many people will do) then you do not get the tax info, since it bases the tax criteria on the state and not the zip. Granted, this is a minor problem, and I'm not sure if it can be solved without reengineering the way tax is handled, such as adding to the database all valid zipcodes for the taxable state. One suggestion I have is to make the state a required field before you are able to submit the data. Do you have the PWA mod installed? By default, osC will not allow you to leave the state or zip fields blank. Same goes for adding new entries to the address book which is where this mod pulls the shipping destination from. Quote Link to comment Share on other sites More sharing options...
danix Posted July 17, 2004 Share Posted July 17, 2004 Do you have the PWA mod installed?By default, osC will not allow you to leave the state or zip fields blank. Same goes for adding new entries to the address book which is where this mod pulls the shipping destination from. I'm not sure what the PWA mod is, can you elaborate? You can see the site in action at My site It's quasi-live but you can easily see what I am explaining without actually placing an order. Quote Link to comment Share on other sites More sharing options...
Acheron Posted July 17, 2004 Share Posted July 17, 2004 Do you have the PWA mod installed?By default, osC will not allow you to leave the state or zip fields blank. Same goes for adding new entries to the address book which is where this mod pulls the shipping destination from. I'm not sure what the PWA mod is, can you elaborate? You can see the site in action at My site It's quasi-live but you can easily see what I am explaining without actually placing an order. I don't even get that selection screen, even if I re-enable the ship-in-cart for guests. By your layout, I can tell right away that you are using a different version than I am so I can only speculate. Anyway, the easiest way is for you to either: (a) add a JS so that field cannot be left blank or (B) Download a zip to state table (or create your own) and tie it to your tax zones. Quote Link to comment Share on other sites More sharing options...
motorcycle Posted July 18, 2004 Share Posted July 18, 2004 Hi, I just installed this excellent contribution. It is so cool! I did have one problem. Let me walk through it. 1 - I added an item to my cart 2 - I viewed my cart 3 - I put a zip code in the zip code box to get a shipping estimate 4 - I continued shopping 5 - I added another item to my cart 6 - I viewed my cart 7 - The shipping estimate was 100% correct, but it didn't show the zip code anymore. The zip code field was blank. To fix this I changed this line: if(CART_SHIPPING_METHOD_ZIP_REQUIRED == "true"){ $ShipTxt.=' '.ENTRY_POST_CODE .' '. tep_draw_input_field('zip_code', $selected_zip, 'size="5"'); } to this line: if(CART_SHIPPING_METHOD_ZIP_REQUIRED == "true"){ $ShipTxt.=' '.ENTRY_POST_CODE .' '. tep_draw_input_field('zip_code', $cart_zip_code, 'size="5"'); } Was this a proper fix? Maybe this could be incorporated into future versions if that is the right fix. Thanks to the contributers!!!! I am so happy my customers can get an idea of shipping costs before they sign up for an account. Quote Link to comment Share on other sites More sharing options...
blucollarguy Posted July 23, 2004 Share Posted July 23, 2004 I have installed this but get nothing, no shipping box in the cart, nerrors, nothing. I had tried ver1.8 but It never did actually give me any shipping info. I had abox in my cart, but never got a quote or breakdown of shipping available. Any one have any ideas? I have reinstalled both several times so I am sure I have defined all files where needed. Thanks for any help, 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: [email protected] 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 July 23, 2004 Share Posted July 23, 2004 Found my error, language file in /modules/shipping/ instead of just /modules. DUHHHHH!!!! Still don't get any quotes though. No info at all other than the box. Is there something special about the shopping modules? I will keep working with it but if anyone has any ideas, please let me know. 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: [email protected] 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...
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.