FixItPete Posted October 29, 2005 Share Posted October 29, 2005 That code is generated from this: 'text' => TEXT_EXPLAIN_ESTIMATED_SHIPPING . '<BR><CENTER>' . TEXT_COUNTRY_TO_SHIP_TO . '</CENTER><TABLE WIDTH="100%"><TR><TH colspan="2">' . tep_get_country_list('country', $country, 'onChange="this.form.submit();" style="width: 100%"') . '</th></tr><tr><td align="center" class="smallText">' . TEXT_ZIPCODE . ' ' . tep_draw_input_field('estzipcode', $estzipcode,'MAXLENGTH="20" SIZE="10"') . ' ' . tep_image_submit('button_est_ship_submit.gif', IMAGE_BUTTON_SUBMIT) . '</td></tr></TABLE>' . tep_get_estimated_shipping_quotes($country, $HTTP_GET_VARS['action'],$customer_country_id)); Yeah... it's all Greek to me. Quote I find the fun in everything. Link to comment Share on other sites More sharing options...
FixItPete Posted October 29, 2005 Share Posted October 29, 2005 That code is generated from this: 'text' => TEXT_EXPLAIN_ESTIMATED_SHIPPING . '<BR><CENTER>' . TEXT_COUNTRY_TO_SHIP_TO . '</CENTER><TABLE WIDTH="100%"><TR><TH colspan="2">' . tep_get_country_list('country', $country, 'onChange="this.form.submit();" style="width: 100%"') . '</th></tr><tr><td align="center" class="smallText">' . TEXT_ZIPCODE . ' ' . tep_draw_input_field('estzipcode', $estzipcode,'MAXLENGTH="20" SIZE="10"') . ' ' . tep_image_submit('button_est_ship_submit.gif', IMAGE_BUTTON_SUBMIT) . '</td></tr></TABLE>' . tep_get_estimated_shipping_quotes($country, $HTTP_GET_VARS['action'],$customer_country_id)); Yeah... it's all Greek to me. Ok... I think I have the size taken care of. Now for next riddle with this, then I think I'll be good. How come if I am NOT logged in and check the shipping via zipcode it gives me my answer, but then when I go to a different page the shipping estimate goes goes back to blank? My cart is fine and still there but it no longer shows the shipping amounts in the info box. Try is! www.thebestcandles.com :) Thanks for putting up with all my posts. :) Pete Quote I find the fun in everything. Link to comment Share on other sites More sharing options...
jetsetter Posted October 29, 2005 Share Posted October 29, 2005 I logged in to see what you mean. I use the ship in cart shipping_estimator.php on our store so it's a bit different. When you are not logged in, it appears the session is not registering for the zipcode. Somehow the country is though. So when not logged in, if I change the country, it sticks on all future pages. However, when I change the zipcode, it's blank on future pages. Strange. I can't be sure but in includes/modules/estimate_shipping.php around line 37, you could try registering the zipcode by adding the tep_session_register. if (tep_session_is_registered('estzipcode')) { if (isset($HTTP_POST_VARS['estzipcode'])) { $estzipcode = $HTTP_POST_VARS['estzipcode']; tep_session_register('estzipcode'); } } you could put some debug code (an echo 'here'; or something) on the line after if (tep_session_is_registered('estzipcode')) { to see if it ever gets there when the user is logged out. Quote Link to comment Share on other sites More sharing options...
FixItPete Posted October 29, 2005 Share Posted October 29, 2005 That didn't do it... Hmmm... Interesting... Let me know if you come up with any other ideas... I'm going to tinker too. :) Pete Quote I find the fun in everything. Link to comment Share on other sites More sharing options...
FixItPete Posted October 29, 2005 Share Posted October 29, 2005 Ok, I fixed it. Sort of. In: includes/functions/estimated_shipping_functions.php I made a mod that looked like this: $return .= '<tr class="ShowShipping" width="100%"><td align="center" colspan="2">' . $quotes[$i][''] . '</td></tr>'; I don't have the original line, but I modified the one that was there to look like above. At first I had it in a: if($estzipcode) { $return .= '<tr class="ShowShipping" width="100%"><td align="center" colspan="2">' . $quotes[$i][''] . '</td></tr>'; } It is this line of code that was making me lose the shipping totals. Hey, I like to know *why* it was making them get lost, just for my own education. Oh, and Joe... THANKS!!! for the help, it gave me some ideas. Should I keep your account account in my store for future testing or should I kill it? Hehe. ? :) (I saw you!) :) Pete Quote I find the fun in everything. Link to comment Share on other sites More sharing options...
jetsetter Posted October 29, 2005 Share Posted October 29, 2005 Glad you found it. These tiny things can be incredibly frustrating! Keep me as an account. I may want to buy a candle sometime. Quote Link to comment Share on other sites More sharing options...
jpldisplays Posted October 31, 2005 Share Posted October 31, 2005 Hi all... Great Contribution works welll.. I have a shippng contribution installed that puts a the freight companies logo beside each shipping options and a policy if that shipping option includes Insurance or not. I was hoping to abreviate it and take out the images as the box ends up quite long once it has wrapped all the text down the box. which file(s) would I do this in?? Cheers!! Quote Link to comment Share on other sites More sharing options...
wheeloftime Posted October 31, 2005 Author Share Posted October 31, 2005 Hi all... Great Contribution works welll.. I have a shippng contribution installed that puts a the freight companies logo beside each shipping options and a policy if that shipping option includes Insurance or not. I was hoping to abreviate it and take out the images as the box ends up quite long once it has wrapped all the text down the box. which file(s) would I do this in?? Cheers!! Look inside the estimated_shipping_functions.php and especially for the part with $return .= '<tr><td class="smallText" align="center">' . $quotes[$i]['methods'][$j]['title'] . '</td>'; Quote Link to comment Share on other sites More sharing options...
azer Posted November 3, 2005 Share Posted November 3, 2005 Ok...solved it. Here is the change exactly as it needs to be made to 1.6 Change this: CODE$info_box_contents[] = array('form' => tep_draw_form('estimated_shipping', tep_href_link(basename($PHP_SELF), '',$request_type, false), 'post'), to this: CODE$info_box_contents[] = array('form' => tep_draw_form('estimated_shipping', tep_href_link(basename($PHP_SELF), '',$request_type, false), 'post'). tep_hide_session_id(), Note that the original code ends with a comma. This should be changed to a . and there needs to be a trailing , after the tep_hide_session_id()quote] 1.coud u tell me why only few like me has this losing problem ? 2. also when i change the country and im not in to the cart page , i can see "PRODUCT NOT FOUND" even if the calculation is still working and the cart box show my product ! Quote MS2 Link to comment Share on other sites More sharing options...
wheeloftime Posted November 3, 2005 Author Share Posted November 3, 2005 1.coud u tell me why only few like me has this losing problem ?2. also when i change the country and im not in to the cart page , i can see "PRODUCT NOT FOUND" even if the calculation is still working and the cart box show my product ! Azer, 1) I don't know. I tried to reproduce this but I haven't been able so far and therefore no clue why it happens for some. I did a test though with the addition of tep_hide_session_id() and in my test environments it makes no difference so I will add it and upload an update for this 2) I am not sure if I understand from what page you encounter this 'product not found' message. I tried changing the country from several different pages and I do not see any of such message. Maybe you can give me a more exact sample of when you see this. regards, Howard Quote Link to comment Share on other sites More sharing options...
wheeloftime Posted November 4, 2005 Author Share Posted November 4, 2005 Update to Estimated Shipping v1.5 and Estimated Shipping v1.7 with UPS/USPS support Minor change for those who were experiencing a loss of their shopping cart. Should be okay now with thanks to jpool for noticing this first and giving the solution along with it ! Quote Link to comment Share on other sites More sharing options...
volupp Posted November 4, 2005 Share Posted November 4, 2005 Great constribution. I'm looking for adding the paymentfees (like OT_COD_FEE) in shoppingcart. Has someone the answer? Quote Link to comment Share on other sites More sharing options...
wheeloftime Posted November 4, 2005 Author Share Posted November 4, 2005 Great constribution. I'm looking for adding the paymentfees (like OT_COD_FEE) in shoppingcart. Has someone the answer? The Estimated Shipping contrib is meant for querying the shipping modules on beforehand. To use the order total modules before checkout you could take a similar approach. Quote Link to comment Share on other sites More sharing options...
Nicolas95 Posted November 6, 2005 Share Posted November 6, 2005 Hello, It is possible to put a postal code by defect ? To post in first the low UPS tarif. Thank's Quote Link to comment Share on other sites More sharing options...
wheeloftime Posted November 6, 2005 Author Share Posted November 6, 2005 Hello, It is possible to put a postal code by defect ? To post in first the low UPS tarif. Thank's Sorry, but I don't know what a 'postal code by defect' is/means ? I'll take a look to see if shippers with multiple quotes can be ordered with lowest rate first, should't be too hard. regards, Howard Quote Link to comment Share on other sites More sharing options...
Nicolas95 Posted November 19, 2005 Share Posted November 19, 2005 Sorry, but I don't know what a 'postal code by defect' is/means ?I'll take a look to see if shippers with multiple quotes can be ordered with lowest rate first, should't be too hard. regards, Howard Sorry for my bad english. I want that it is the zip code of the shop which makes the first calculation. This makes it possible to post the best cost of transport. if the Net surfer is not identified and its address is not yet known regard's Nicolas Quote Link to comment Share on other sites More sharing options...
Guest Posted November 19, 2005 Share Posted November 19, 2005 Sorry for my bad english. I want that it is the zip code of the shop which makes the first calculation. This makes it possible to post the best cost of transport. if the Net surfer is not identified and its address is not yet known regard's Nicolas The Net surfer enters his own zip code for the shipping estimate. This is the object of this contribution. Quote Link to comment Share on other sites More sharing options...
lambro Posted November 30, 2005 Share Posted November 30, 2005 With regards to showing a sub total of item costs, then the shipping, and after that the total, if you have a look at this contribution it appears it does this? http://www.oscommerce.com/community/contri...ch,ship+in+cart I have only looked at the screen shot, as I myslef have added THIS contribution and want to stick with it as it is simple and works extremely well. Maybe and I am not sure if this is allowed, somebody can have a look at the coding to see if a similar thing can be done with this mod. I think from the screen shot, if you get multiple choices, and costs, you can select one and have it update to final total according to your selection? Any how I will leave it to you clever ones, and keep looking back in case it can be done :-) Quote Link to comment Share on other sites More sharing options...
wheeloftime Posted December 1, 2005 Author Share Posted December 1, 2005 With regards to showing a sub total of item costs, then the shipping, and after that the total, if you have a look at this contribution it appears it does this?http://www.oscommerce.com/community/contri...ch,ship+in+cart I have only looked at the screen shot, as I myslef have added THIS contribution and want to stick with it as it is simple and works extremely well. Maybe and I am not sure if this is allowed, somebody can have a look at the coding to see if a similar thing can be done with this mod. I think from the screen shot, if you get multiple choices, and costs, you can select one and have it update to final total according to your selection? Any how I will leave it to you clever ones, and keep looking back in case it can be done :-) Hello Peter, That could be done but personally I think it would be overkill and beyond the idea of this contribution which is to give a simple estimate of the shipping costs involved. The only thing a customer has to do is a simple addition (from his head) of the total shown in the shopping cart and one of the figures of the available shipping options if you have multiple ones. Making the quotes selectable would mean another submit button, window refreshes etc. giving the contrib more weight as neccessary at this stage. regards, Howard Quote Link to comment Share on other sites More sharing options...
Guest Posted December 6, 2005 Share Posted December 6, 2005 Hello Peter, That could be done but personally I think it would be overkill and beyond the idea of this contribution which is to give a simple estimate of the shipping costs involved. The only thing a customer has to do is a simple addition (from his head) of the total shown in the shopping cart and one of the figures of the available shipping options if you have multiple ones. Making the quotes selectable would mean another submit button, window refreshes etc. giving the contrib more weight as neccessary at this stage. regards, Howard Firstly, excellent contribution - thanks. I too would also like to add the sub-total & shipping costs together to form a "grand total". I can see how it would create problems for users with multiple shipping options, but could anyone suggest how to simply add these two totals together please? I am using a very simple shipping rate, so there should be no problems. Quote Link to comment Share on other sites More sharing options...
cdickson Posted December 6, 2005 Share Posted December 6, 2005 Howard - great contribution! Thanks! I must have made an error somewhere, though, because I have not been able to get the estimated shipping box into the left column. I have installed the contribution, checked it several times, then reinstalled v1.7 and still have the same problem. My site looks like this: My column_left.php code is: <?php /* $Id: column_left.php,v 1.1 2003/09/08 19:26:22 jhtalk Exp jhtalk $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ // STS: ADD $sts_block_name = 'header2columnleft'; require(STS_RESTART_CAPTURE); // STS: EOADD if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_categories_box(); } else { include(DIR_WS_BOXES . 'categories.php'); } // STS: ADD $sts_block_name = 'categorybox'; require(STS_RESTART_CAPTURE); // STS: EOADD if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_manufacturers_box(); } else { include(DIR_WS_BOXES . 'manufacturers.php'); } // STS: ADD $sts_block_name = 'manufacturerbox'; require(STS_RESTART_CAPTURE); // STS: EOADD require(DIR_WS_BOXES . 'whats_new.php'); // STS: ADD $sts_block_name = 'whatsnewbox'; require(STS_RESTART_CAPTURE); // STS: EOADD require(DIR_WS_BOXES . 'search.php'); // STS: ADD $sts_block_name = 'searchbox'; require(STS_RESTART_CAPTURE); // STS: EOADD require(DIR_WS_BOXES . 'information.php'); // STS: ADD $sts_block_name = 'informationbox'; require(STS_RESTART_CAPTURE); // STS: EOADD require(DIR_WS_BOXES . 'shopping_cart.php'); // STS: ADD $sts_block_name = 'cartbox'; require(STS_RESTART_CAPTURE); // STS: EOADD if (isset($HTTP_GET_VARS['products_id'])) include(DIR_WS_BOXES . 'manufacturer_info.php'); // STS: ADD $sts_block_name = 'maninfobox'; require(STS_RESTART_CAPTURE); // STS: EOADD if (tep_session_is_registered('customer_id')) include(DIR_WS_BOXES . 'order_history.php'); // STS: ADD $sts_block_name = 'orderhistorybox'; require(STS_RESTART_CAPTURE); // STS: EOADD if (isset($HTTP_GET_VARS['products_id'])) { if (tep_session_is_registered('customer_id')) { $check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "' and global_product_notifications = '1'"); $check = tep_db_fetch_array($check_query); if ($check['count'] > 0) { include(DIR_WS_BOXES . 'best_sellers.php'); } else { include(DIR_WS_BOXES . 'product_notifications.php'); } } else { include(DIR_WS_BOXES . 'product_notifications.php'); } } else { include(DIR_WS_BOXES . 'best_sellers.php'); } // STS: ADD $sts_block_name = 'bestsellersbox'; require(STS_RESTART_CAPTURE); // STS: EOADD if (isset($HTTP_GET_VARS['products_id'])) { if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 'tell_a_friend.php'); } else { include(DIR_WS_BOXES . 'specials.php'); } // STS: ADD $sts_block_name = 'specialfriendbox'; require(STS_RESTART_CAPTURE); // STS: EOADD require(DIR_WS_BOXES . 'reviews.php'); // STS: ADD $sts_block_name = 'reviewsbox'; require(STS_RESTART_CAPTURE); // STS: EOADD if (substr(basename($PHP_SELF), 0, 8) != 'checkout') { include(DIR_WS_BOXES . 'languages.php'); // STS: ADD $sts_block_name = 'languagebox'; require(STS_RESTART_CAPTURE); // STS: EOADD include(DIR_WS_BOXES . 'currencies.php'); // STS: ADD $sts_block_name = 'currenciesbox'; require(STS_RESTART_CAPTURE); // STS: EOADD } // BEGIN estimated shipping --> require(DIR_WS_MODULES . FILENAME_ESTIMATED_SHIPPING); // END estimated shipping --> ?> Any help would be greatly appreciated. Quote cdickson Link to comment Share on other sites More sharing options...
wheeloftime Posted December 6, 2005 Author Share Posted December 6, 2005 Howard - great contribution! Thanks! I must have made an error somewhere, though, because I have not been able to get the estimated shipping box into the left column. I have installed the contribution, checked it several times, then reinstalled v1.7 and still have the same problem. My site looks like this: My column_left.php code is: <?php /* $Id: column_left.php,v 1.1 2003/09/08 19:26:22 jhtalk Exp jhtalk $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ // STS: ADD $sts_block_name = 'header2columnleft'; require(STS_RESTART_CAPTURE); // STS: EOADD if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_categories_box(); } else { include(DIR_WS_BOXES . 'categories.php'); } // STS: ADD $sts_block_name = 'categorybox'; require(STS_RESTART_CAPTURE); // STS: EOADD if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_manufacturers_box(); } else { include(DIR_WS_BOXES . 'manufacturers.php'); } // STS: ADD $sts_block_name = 'manufacturerbox'; require(STS_RESTART_CAPTURE); // STS: EOADD require(DIR_WS_BOXES . 'whats_new.php'); // STS: ADD $sts_block_name = 'whatsnewbox'; require(STS_RESTART_CAPTURE); // STS: EOADD require(DIR_WS_BOXES . 'search.php'); // STS: ADD $sts_block_name = 'searchbox'; require(STS_RESTART_CAPTURE); // STS: EOADD require(DIR_WS_BOXES . 'information.php'); // STS: ADD $sts_block_name = 'informationbox'; require(STS_RESTART_CAPTURE); // STS: EOADD require(DIR_WS_BOXES . 'shopping_cart.php'); // STS: ADD $sts_block_name = 'cartbox'; require(STS_RESTART_CAPTURE); // STS: EOADD if (isset($HTTP_GET_VARS['products_id'])) include(DIR_WS_BOXES . 'manufacturer_info.php'); // STS: ADD $sts_block_name = 'maninfobox'; require(STS_RESTART_CAPTURE); // STS: EOADD if (tep_session_is_registered('customer_id')) include(DIR_WS_BOXES . 'order_history.php'); // STS: ADD $sts_block_name = 'orderhistorybox'; require(STS_RESTART_CAPTURE); // STS: EOADD if (isset($HTTP_GET_VARS['products_id'])) { if (tep_session_is_registered('customer_id')) { $check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "' and global_product_notifications = '1'"); $check = tep_db_fetch_array($check_query); if ($check['count'] > 0) { include(DIR_WS_BOXES . 'best_sellers.php'); } else { include(DIR_WS_BOXES . 'product_notifications.php'); } } else { include(DIR_WS_BOXES . 'product_notifications.php'); } } else { include(DIR_WS_BOXES . 'best_sellers.php'); } // STS: ADD $sts_block_name = 'bestsellersbox'; require(STS_RESTART_CAPTURE); // STS: EOADD if (isset($HTTP_GET_VARS['products_id'])) { if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 'tell_a_friend.php'); } else { include(DIR_WS_BOXES . 'specials.php'); } // STS: ADD $sts_block_name = 'specialfriendbox'; require(STS_RESTART_CAPTURE); // STS: EOADD require(DIR_WS_BOXES . 'reviews.php'); // STS: ADD $sts_block_name = 'reviewsbox'; require(STS_RESTART_CAPTURE); // STS: EOADD if (substr(basename($PHP_SELF), 0, 8) != 'checkout') { include(DIR_WS_BOXES . 'languages.php'); // STS: ADD $sts_block_name = 'languagebox'; require(STS_RESTART_CAPTURE); // STS: EOADD include(DIR_WS_BOXES . 'currencies.php'); // STS: ADD $sts_block_name = 'currenciesbox'; require(STS_RESTART_CAPTURE); // STS: EOADD } // BEGIN estimated shipping --> require(DIR_WS_MODULES . FILENAME_ESTIMATED_SHIPPING); // END estimated shipping --> ?> Any help would be greatly appreciated. I'll give it a try but as I have no idea how STS works it's just a shot in the dark ! Looking at your description of your column left I would say you have to add something like // STS: ADD $sts_block_name = 'estimatedshippingbox'; require(STS_RESTART_CAPTURE); // STS: EOADD } below // BEGIN estimated shipping --> require(DIR_WS_MODULES . FILENAME_ESTIMATED_SHIPPING); // END estimated shipping --> ?> Question is if you need to use the real .php filename for FILENAME_ESTIMATED_SHIPPING and/or how the relation is between the include/require of an infobox and the STS_RESTART_CAPTURE part. If you can find, or have, information of how to add custom infoboxes to STS you should be set to go. Not much help I guess but this is something for someone using STS. Quote Link to comment Share on other sites More sharing options...
cdickson Posted December 6, 2005 Share Posted December 6, 2005 I'll give it a try but as I have no idea how STS works it's just a shot in the dark !Looking at your description of your column left I would say you have to add something like // STS: ADD $sts_block_name = 'estimatedshippingbox'; require(STS_RESTART_CAPTURE); // STS: EOADD } below // BEGIN estimated shipping --> require(DIR_WS_MODULES . FILENAME_ESTIMATED_SHIPPING); // END estimated shipping --> ?> Question is if you need to use the real .php filename for FILENAME_ESTIMATED_SHIPPING and/or how the relation is between the include/require of an infobox and the STS_RESTART_CAPTURE part. If you can find, or have, information of how to add custom infoboxes to STS you should be set to go. Not much help I guess but this is something for someone using STS. Thanks, Howard. At least this gives me an idea of where to start. If I can come up with the answer I'll post it here so that others using STS can use it. Quote cdickson Link to comment Share on other sites More sharing options...
wheeloftime Posted December 6, 2005 Author Share Posted December 6, 2005 Thanks, Howard. At least this gives me an idea of where to start. If I can come up with the answer I'll post it here so that others using STS can use it. If you could do that it would be great :thumbsup: Quote Link to comment Share on other sites More sharing options...
j4tan Posted January 7, 2006 Share Posted January 7, 2006 hi, i am experiencing some problem with the zipcode. After clicking process button zipcode change back to 3025, country is australia. Any idea? shipping cost stay same too. 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.