Guest Posted August 31, 2005 Share Posted August 31, 2005 (edited) Here is the output from debuging the module.. Looks like they require city and street address to quote? Does this look like that to you? <?xml version="1.0"?> <eCommerce version="1.1" action="Response" timestamp="2005/08/31T07:00:18" transmission_reference="758285C1"><Requestor><ID>*********</ID> <Password><![CDATA[********]]></Password></Requestor><Shipment action="RateEstimate" version="1.0" test="True"><Faults><Fault><Code>2553</Code> <Desc>Required element/node is missing.</Desc><Source>Shipment/Receiver/Address/State</Source></Fault><Fault><Code>1002</Code> <Desc>Required element/node is missing.</Desc><Source>Shipment/Receiver/Address/City</Source></Fault></Faults><Result>< Code>202</Code><Desc>The shipment could not be rated.</Desc></Result><ShippingCredentials><ShippingKey>*****</ShippingKey> <AccountNbr>*****</AccountNbr></ShippingCredentials><ShipmentDetail><ShipDate>2005-09-02</ShipDate><Service><Code>G</Code></Service><ShipmentType> <Code>P</Code></ShipmentType><Weight>1</Weight><Dimensions><Length>0</Length><Width>0</Width><Height>0</Height></Dimensions><SpecialServices> <SpecialService><Code>SAT</Code></SpecialService></SpecialServices></ShipmentDetail><Billing><Party><Code>S</Code></Party></Billing><Sender/> Sorry I mean City and State Edited August 31, 2005 by waxteddy Quote Link to comment Share on other sites More sharing options...
wheeloftime Posted August 31, 2005 Author Share Posted August 31, 2005 Did you get a chance to see this about the 50% only changes the country? <{POST_SNAPBACK}> Did you try what I wrote above or do you only want a certain part of the estimated shipping box smaller ? Quote Link to comment Share on other sites More sharing options...
wheeloftime Posted August 31, 2005 Author Share Posted August 31, 2005 Here is the output from debuging the module.. Looks like they require city and street address to quote? Does this look like that to you? <?xml version="1.0"?> <eCommerce version="1.1" action="Response" timestamp="2005/08/31T07:00:18" transmission_reference="758285C1"><Requestor><ID>*********</ID> <Password><![CDATA[********]]></Password></Requestor><Shipment action="RateEstimate" version="1.0" test="True"><Faults><Fault><Code>2553</Code> <Desc>Required element/node is missing.</Desc><Source>Shipment/Receiver/Address/State</Source></Fault><Fault><Code>1002</Code> <Desc>Required element/node is missing.</Desc><Source>Shipment/Receiver/Address/City</Source></Fault></Faults><Result>< Code>202</Code><Desc>The shipment could not be rated.</Desc></Result><ShippingCredentials><ShippingKey>*****</ShippingKey> <AccountNbr>*****</AccountNbr></ShippingCredentials><ShipmentDetail><ShipDate>2005-09-02</ShipDate><Service><Code>G</Code></Service><ShipmentType> <Code>P</Code></ShipmentType><Weight>1</Weight><Dimensions><Length>0</Length><Width>0</Width><Height>0</Height></Dimensions><SpecialServices> <SpecialService><Code>SAT</Code></SpecialService></SpecialServices></ShipmentDetail><Billing><Party><Code>S</Code></Party></Billing><Sender/> Sorry I mean City and State <{POST_SNAPBACK}> That makes more sense indeed and that information is not passed to the shipping modules which explains the error(s). The idea for me to build this was to provide shipping costs before login/register and going to the checkout. City and State information are then of course not available which seems fine for UPS and USPS but appearantly not for DHL. This means the DHL module is only to be used for logged in/registered customers and to get it working would imply to have the estimated_shipping_class.php changed. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 31, 2005 Share Posted August 31, 2005 Yeah, It looks like I have two choices. Create City and State fields to the est., or maintain my own zip code database. DHL is such a pain, they are cheap and fast, but they still have their issues... I really dont understand why its a requirement when you can get est. from the their website wih just a zip code.. Quote Link to comment Share on other sites More sharing options...
wheeloftime Posted August 31, 2005 Author Share Posted August 31, 2005 I really dont understand why its a requirement when you can get est. from the their website wih just a zip code.. <{POST_SNAPBACK}> I didn't want to say that but it wondered me too. Probably the online DHL module you have to use with osC is not (yet) on par with their normal online shipping module ?! You could inquire with them if that is going to change in the near future or if a simple setting can make the module work without the need for city and state. You can also try to adept the catalog/includes/classes/estimated_shipping_class.php but it will still only work if your customers are logged in into your site. If you reinstate the following query: $shipping_address_query = tep_db_query("select ab.entry_firstname, ab.entry_lastname, ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, ab.entry_country_id, c.countries_id, c.countries_name, c.countries_iso_code_2, c.countries_iso_code_3, c.address_format_id, ab.entry_state from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) left join " . TABLE_COUNTRIES . " c on (ab.entry_country_id = c.countries_id) where ab.customers_id = '" . (int)$customer_id . "' and ab.address_book_id = '" . (int)$sendto . "'"); $shipping_address = tep_db_fetch_array($shipping_address_query); and change 'city' => '' and 'state' => '' to 'city' => $shipping_address['entry_city'] and 'state' => ((tep_not_null($shipping_address['entry_state'])) ? $shipping_address['entry_state'] : $shipping_address['zone_name']) it should be enough to get it working with the DHL module. I haven't tested this but it should give the required information and not inferre for customers who are not logged in (and therefore can't use estimated shipping costs for DHL quotes). Quote Link to comment Share on other sites More sharing options...
Guest Posted August 31, 2005 Share Posted August 31, 2005 I replaced 'city' => '' with 'city' => 'dummy''' And the requirement for the City went away.. I was thinking about changing estimated_shipping.php to include a state selection.. $info_box_contents[] = array('form' => tep_draw_form('estimated_shipping', tep_href_link(basename($PHP_SELF), '',$request_type, false), 'post'), 'align' => 'left', 'text' => TEXT_EXPLAIN_ESTIMATED_SHIPPING . '<BR><CENTER>' . TEXT_COUNTRY_TO_SHIP_TO . '</CENTER><TABLE WIDTH="' . BOX_WIDTH . '"><TR><TH colspan="3">' . tep_get_country_list('country', $country, 'onChange="this.form.submit();" style="width:' . (BOX_WIDTH+50) . 'px"') . '</th></tr><tr><td align="left" class="smallText">' . TEXT_ZIPCODE . '</td><td align="left">' . tep_draw_input_field('estzipcode', $estzipcode,'MAXLENGTH="20" SIZE="10"') . '</td><td align="center" class="smallText">' . TEXT_ZIPCODE_SUBMIT . '</td></tr></TABLE>' . tep_get_estimated_shipping_quotes($country, $HTTP_GET_VARS['action'],$customer_country_id)); You think making a change in there and in estimated_shipping_class.php 'state' => $custstate, or something I send them an email asking them whats the deal... Quote Link to comment Share on other sites More sharing options...
wheeloftime Posted August 31, 2005 Author Share Posted August 31, 2005 I replaced 'city' => '' with 'city' => 'dummy''' And the requirement for the City went away.. I was thinking about changing estimated_shipping.php to include a state selection.. ? ? ? ? ? ? ? ?$info_box_contents[] = array('form' => tep_draw_form('estimated_shipping', tep_href_link(basename($PHP_SELF), '',$request_type, false), 'post'), ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'align' => 'left', ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'text' => TEXT_EXPLAIN_ESTIMATED_SHIPPING . '<BR><CENTER>' . ?TEXT_COUNTRY_TO_SHIP_TO . '</CENTER><TABLE WIDTH="' . BOX_WIDTH . '"><TR><TH colspan="3">' . tep_get_country_list('country', $country, 'onChange="this.form.submit();" style="width:' . (BOX_WIDTH+50) . 'px"') . '</th></tr><tr><td align="left" class="smallText">' . TEXT_ZIPCODE . '</td><td align="left">' . tep_draw_input_field('estzipcode', $estzipcode,'MAXLENGTH="20" SIZE="10"') . '</td><td align="center" class="smallText">' . TEXT_ZIPCODE_SUBMIT . '</td></tr></TABLE>' . tep_get_estimated_shipping_quotes($country, ?$HTTP_GET_VARS['action'],$customer_country_id)); You think making a change in there and in estimated_shipping_class.php 'state' => $custstate, or something I send them an email asking them whats the deal... <{POST_SNAPBACK}> So a 'dummy' for the city was already enough :D Didn't that work for a state also ?! Do you ship national as well as international ? Not all countries have states so you would have to make something similar as with the account creation. I wonder what state information DHL would want to have for countries like Holland, Belgium and others without states ? Quote Link to comment Share on other sites More sharing options...
Guest Posted August 31, 2005 Share Posted August 31, 2005 So a 'dummy' for the city was already enough :D Didn't that work for a state also ?! Do you ship national as well as international ? Not all countries have states so you would have to make something similar as with the account creation. I wonder what state information DHL would want to have for countries like Holland, Belgium and others without states ? <{POST_SNAPBACK}> Nope didnt work for state, I dont ship DHL international. There rates are to high for that. I have DHL zoned to states only. I think Ill wait to hear from DHL before I put a bunch of work into rewriting the module to include a state option. Quote Link to comment Share on other sites More sharing options...
wheeloftime Posted August 31, 2005 Author Share Posted August 31, 2005 I think Ill wait to hear from DHL before I put a bunch of work into rewriting the module to include a state option. <{POST_SNAPBACK}> Seems like a good idea. In the meantime you can always try the steps I described so at least registered customers can get their shipping quote on beforehand. grtz, Howard Quote Link to comment Share on other sites More sharing options...
tegralens Posted August 31, 2005 Share Posted August 31, 2005 You are right, those two values inside the modules/estimated_shipping.php have no influence when you want the whole box smaller.The best I could find so quickly is to change the part where you include the module (default in catalog/index.php) <?php include(DIR_WS_MODULES . FILENAME_ESTIMATED_SHIPPING); ?> to <table width="50%"> <?php include(DIR_WS_MODULES . FILENAME_ESTIMATED_SHIPPING); ?> </table> You'll have to play around with it a bit more as it only gets smaller to a certain amount after which there is no change whether I set 10%, 20% or something in that order. <{POST_SNAPBACK}> Will try this and let you know thanks Quote Link to comment Share on other sites More sharing options...
Guest Posted August 31, 2005 Share Posted August 31, 2005 Hello- State and zip are required. Regards, XML Implementation Team DHL! Err! What kind of email is that! Quote Link to comment Share on other sites More sharing options...
wheeloftime Posted August 31, 2005 Author Share Posted August 31, 2005 Hello- State and zip are required. Regards, XML Implementation Team DHL! Err! What kind of email is that! <{POST_SNAPBACK}> Must be the shortest mail ever :lol: But it's clear what they need for input so if you want to use the contribution there must be a state selection attached to it. Shouldn't be a problem now you only ship within the US. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 31, 2005 Share Posted August 31, 2005 Well, Well.. I found this in the ShipIt Documentation! There are three Override Codes available:Z1 - When you know that the Receiver\Address\PostalCode is not in the Receiver\Address\State use Z1 to override the DHL error message and generate the shipment. Note that by utilizing the Z1 override, the shipment may incur misroute fees. I updated the DHL module with the follwing code $request .= "<ShipmentProcessingInstructions>" . "<Overrides>" . "<Override>" . "<Code>Z1</Code>" . "</Override>" . "</Overrides>" . "</ShipmentProcessingInstructions>"; I then put a generic state in the class 'state' => 'Washington', I looks like it works! What a hack! only took me 8 hours.. Thanks for your help.. I still need to make sure these are correct estimates.... I manually enter addressed for shipping lables so if the customer entered there state or zipcode wrong I will know then... Quote Link to comment Share on other sites More sharing options...
wheeloftime Posted September 1, 2005 Author Share Posted September 1, 2005 Well, Well.. I found this in the ShipIt Documentation! There are three Override Codes available:Z1 - When you know that the Receiver\Address\PostalCode is not in the Receiver\Address\State use Z1 to override the DHL error message and generate the shipment. ?Note that by utilizing the Z1 override, the shipment may incur misroute fees. I updated the DHL module with the follwing code ? ? ? ? ?$request .= "<ShipmentProcessingInstructions>" . ? ? ? ? ? ? ? ? ? ? ? ?"<Overrides>" . ? ? ? ? ? ? ? ? ? ? ? ? ?"<Override>" . ? ? ? ? ? ? ? ? ? ? ? ? ? ?"<Code>Z1</Code>" . ? ? ? ? ? ? ? ? ? ? ? ? ?"</Override>" . ? ? ? ? ? ? ? ? ? ? ? ?"</Overrides>" . ? ? ? ? ? ? ? ? ? ? ?"</ShipmentProcessingInstructions>"; I then put a generic state in the class 'state' => 'Washington', I looks like it works! What a hack! only took me 8 hours.. Thanks for your help.. I still need to make sure these are correct estimates.... I manually enter addressed for shipping lables so if the customer entered there state or zipcode wrong I will know then... <{POST_SNAPBACK}> That sounds good ! A backdoor afterall which maybe isn't even surprising if they can give accuratie quotes from their own website with country/zipcode information only. You should be able to check the correctnes of the quotes quickly enough by doing sme test orders. I'm curious if it can work this way for DHL. Quote Link to comment Share on other sites More sharing options...
tegralens Posted September 2, 2005 Share Posted September 2, 2005 Will try this and let you know thanks <{POST_SNAPBACK}> I have a Problem everything looks fine but when I change the ship to country, what happens is that it empties the shopping cart and says your shopping cart is empty? Any ideas? Quote Link to comment Share on other sites More sharing options...
wheeloftime Posted September 3, 2005 Author Share Posted September 3, 2005 I have a Problem everything looks fine but when I change the ship to country, what happens is that it empties the shopping cart and says your shopping cart is empty? Any ideas? <{POST_SNAPBACK}> Look at post #53 of page 3 I have never experienced this problem but that should give you the solution. Quote Link to comment Share on other sites More sharing options...
sarah1980 Posted September 4, 2005 Share Posted September 4, 2005 Hello Sarah, I found that problem some while ago and it should be fixed after the initial 1.0 release. If you take the latest version, non-UPS or UPS, you should not have that problem anymore. regards, Howard <{POST_SNAPBACK}> Installed the 1.4 version and now get this error: Fatal error: Call to undefined function: tep_get_estimated_shipping_quotes() in /home/.sites/23/site156/web/catalog/includes/modules/estimated_shipping.php on line 48 Any ideas? Quote Link to comment Share on other sites More sharing options...
wheeloftime Posted September 4, 2005 Author Share Posted September 4, 2005 Installed the 1.4 version and now get this error: Fatal error: Call to undefined function: tep_get_estimated_shipping_quotes() in /home/.sites/23/site156/web/catalog/includes/modules/estimated_shipping.php on line 48 Any ideas? <{POST_SNAPBACK}> Sarah, How have you installed the 1.4 version ? Have you overwritten all files with the latest ones ? The error indicates there is something wrong with the catalog/includes/functions/estimated_shipping_functions.php in your installation. Check if the file is (still) there and alright. Quote Link to comment Share on other sites More sharing options...
sarah1980 Posted September 4, 2005 Share Posted September 4, 2005 Sarah, How have you installed the 1.4 version ? Have you overwritten all files with the latest ones ? The error indicates there is something wrong with the catalog/includes/functions/estimated_shipping_functions.php in your installation. Check if the file is (still) there and alright. <{POST_SNAPBACK}> Hi wheeloftime, Yup I just overwrit the old files. The estimated_shipping_functions is still there. Its also taking away the middle section of the shop so the column left (where I have the estimated shipping box installed) is sweeping from left to the middle of the page. Quote Link to comment Share on other sites More sharing options...
wheeloftime Posted September 4, 2005 Author Share Posted September 4, 2005 Hi wheeloftime, Yup I just overwrit the old files. The estimated_shipping_functions is still there. Its also taking away the middle section of the shop so the column left (where I have the estimated shipping box installed) is sweeping from left to the middle of the page. <{POST_SNAPBACK}> Must be looking "different" :D Do you by any change use a templating system for your shop ? If all files are in the correct place and you made the changes correctly the error should not occur. The same for breaking out of the column left, with a normal setup that shouldn't happen also. Without looking at your shop/code it's hard to tell where it goes wrong. If you can give a link to look at it might help to find some clue ! Quote Link to comment Share on other sites More sharing options...
omidhz Posted September 19, 2005 Share Posted September 19, 2005 Hi guys, I just have installed this great contribution on my "test shop". Actually I was looking for a contribution to install on my store that my customer could see the shipping fee for an item in the product page. I.e. when they look at a product, they be able to enter their zip could and then the contribution just show them the available shipping charge on that item only. I have noticed that many people just visit a product and if they didn't like the price they will go away because they think that their is a high shipping charge for that item, while on some of my products they can choose a shipping option that cost only $0.60. My question is, is there anyway that we could change this contribution so we could place it on the product page and it calculates the shipping charge for one item only (not the entire cart), or maybe there is a contribution for this purpose which I don't really know. If any one could help me with this I will be appreciated. Thanks to all. Quote Regards, Link to comment Share on other sites More sharing options...
chooch Posted September 25, 2005 Share Posted September 25, 2005 (edited) Hi Just tried out this mod after seeing a website having it in the shopping_cart.php WITH THIS: Sub-Total: ?39.98 Zone Rates (Shipping to GB : 0.46 kg): ?2.52 Total: ?42.50 i have checked the forum and can't find any post that specifically tells how to get a 'TOTAL' including Sub-Total and Shipping WITHIN the shopping_cart.php can anyone help please Thanks Edited September 25, 2005 by chooch Quote Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back! Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you? There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere. CHOOCH Link to comment Share on other sites More sharing options...
Cowzor Posted September 28, 2005 Share Posted September 28, 2005 I must have mucked something up.. but the title of the Estimated Shipping box when displayed to the customer is: TABLE_HEADING_ESTIMATED_SHIPPING I can't see where I went wrong on the installation of it, and everything works perfectly. I used V1.5 with UPS support (I didn't need to, I just hadn't read this thread first so grabbed the latest version) It's been installed on my shopping_cart.php Any ideas? I realise it's a painfully obvious thing.. I just don't know php at all :blush: Just tried out this mod after seeing a website having it in the shopping_cart.php WITH THIS: Sub-Total: ?39.98 Zone Rates (Shipping to GB : 0.46 kg): ?2.52 Total: ?42.50 I saw that site also but I can't remember what it was.. however I am also interested in this. But I also remember someone mentioning that you would then end up with multiple totals for each different freight rate (unless you only have one shipping option) Quote Link to comment Share on other sites More sharing options...
wheeloftime Posted September 28, 2005 Author Share Posted September 28, 2005 I must have mucked something up.. but the title of the Estimated Shipping box when displayed to the customer is:TABLE_HEADING_ESTIMATED_SHIPPING I can't see where I went wrong on the installation of it, and everything works perfectly. I used V1.5 with UPS support (I didn't need to, I just hadn't read this thread first so grabbed the latest version) It's been installed on my shopping_cart.php Any ideas? I realise it's a painfully obvious thing.. I just don't know php at all :blush: I saw that site also but I can't remember what it was.. however I am also interested in this. But I also remember someone mentioning that you would then end up with multiple totals for each different freight rate (unless you only have one shipping option) Morning Mr. Karl, The define you are missing is the one as described in 5) Add the following to the file catalog/includes/languages/english.php(also to dutch.php and the other language files if you use those): // BEGIN estimated shipping define('TABLE_HEADING_ESTIMATED_SHIPPING', 'Estimated Shipping Costs'); // END estimated shipping from the installation instructions. Just add it to the mentioned file and it should be fine. I read Chooch's remark also but I have no idea how this has been done. I am aware of only one other shipping calculator, called Ship In Cart, but I believe it does not have this kind of output. You can integrate the Estimated Shipping module in your shopping cart page also but it will not have the same output as in the sample given plus, as you already noted, it all greatly depends if you have only one shipping option or multiple. Quote Link to comment Share on other sites More sharing options...
chooch Posted September 28, 2005 Share Posted September 28, 2005 I read Chooch's remark also but I have no idea how this has been done. I am aware of only one other shipping calculator, called Ship In Cart, but I believe it does not have this kind of output.You can integrate the Estimated Shipping module in your shopping cart page also but it will not have the same output as in the sample given plus, as you already noted, it all greatly depends if you have only one shipping option or multiple. the site is: www.islamicjewellery.co.uk it is running on that site but in the cart page it looks like this script modified and not the ship in cart ms2 does anyone have any ideas? thanks Quote Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back! Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you? There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere. CHOOCH 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.