Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Shipping Quote in Cart 2.3.3.4 - Support Thread


Recommended Posts

@@De Dokta

 

For domestic I charge tax on products and shipping
For international I don't charge tax on products and on shipping.

not logged in

first time the modal opens it shows

Country: Japan
State: Osaka

Now I don't know if this is a coincidence or does the system really know that I am in Osaka. Either way it finally shows a price and not an "Invalid Zone" message! Heureka!
The price is showing but tax is calculated twice on the price. I guess that is a small thing that I should be able to solve.
Then choosing an international country it shows the module for international shipping and the correct price (no tax charged on shipping).

Logged in (domestic primary address, Tokyo Japan)

first time the modal opens it shows

Country: Japan
State: Tokyo

BUG 1: No price this time just "Invalid Zone" message. BUT! if i choose any other domestic state it shows a price. Same here tax calculated twice.
Switching to international country price shows correct. No tax on it.

Logged in (international primary address, Zürich Switzerland)

first time modal opens it shows

Country: Switzerland
State: Zürich

and correct shipping module with correct price. (price with no tax).
Switching to domestic country (Japan) it shows the correct module but again price with double tax on it.

So except the double tax issue on the domestic shipping module and the BUG 1 the shipping quotes finally works.

VERY, VERY WELL DONE DOC! Thank you very much! Especially since it is my shipping module that caused all the trouble. Really appreciate the work you put in to it to make this work.
 

Edited by Tsimi
Link to comment
Share on other sites

@@Tsimi

 

Hi Lambros

 

The tax issue seems to have something to do with your configuration or any modification you made. I just installed this interstate.php and the 'shipping quote in cart' files into a fresh, clean bs-gold store. Tax calculation is correct!

 

And yes, there is a bug with the first display of the zones pulldown. It makes me crazy! :x

 

J.J.

Link to comment
Share on other sites

(w00t) (w00t) (w00t)

 

@@De Dokta

 

HA! Endlich funzt es! Perfekt!

VIELEN DANK J.J.!

 

Regarding the tax prices you where right. I had a tax zone set for the shipping module but added gross(brutto) prices instead of netto prices. >_< :x :sweating:

Jetzt funktioniert alles tip top! Nochmals vielen Dank!

Link to comment
Share on other sites

This addon was originally "build in" to the shopping_cart.php page.

So getting this version here

 

http://www.oscommerce.com/forums/topic/396632-shipping-quote-in-cart-2334-support-thread/?p=1698164

 

and then adjust the visual part to Bootstrap should be what you are looking for.

The last 2-3 Versions that De Dokta posted where edited to work with a special Zones shipping module that I use.

Link to comment
Share on other sites

  • 2 weeks later...

@@Tsimi

@@mattjt83

 

Tsimi -have you noticed that when you have a get-one-free item in the cart, the shipping in cart does not show the "Free shipping for all of your cart products" ? instead I get the fedex display with the generic no quote message...

 

I do have the free item set up with 0 weight, and the Free Shipping box checked.

 

Matt - Would you have any suggestion on how to sort?

-Dave

Link to comment
Share on other sites

relevant - the above only happens if the "purchased" items have free shipping as well.

 

if the purchased item is not free shipping, everything is fine.

 

looks like get one free item needs to not have an item count, (or possibly weigh too?) if being offered with items that are free shipping??  not for sure how this works

Edited by Roaddoctor

-Dave

Link to comment
Share on other sites

  • 3 weeks later...

I'm having an issue with Canada postal codes

 

entering non-numeric like,  V5B 3M7, the entry disappears as soon as its entered. no problems with US all numeric.

 

any help please  - thank you.

-Dave

Link to comment
Share on other sites

in includes/modules/shipping_in_cart.php

 

There is this

        <label for="postcode">' . TEXT_POSTCODE . '</label><br>' . tep_draw_input_field_number('postcode', isset( $postcode ) ? tep_output_string( $postcode ) : '', 'id="postcode" style="width:100%;"') . '

I switched to this and I think it's ok...

        <label for="postcode">' . TEXT_POSTCODE . '</label><br>' . tep_draw_input_field('postcode', isset( $postcode ) ? tep_output_string( $postcode ) : '', 'id="postcode" style="width:100%;"') . '

@@greasemonkey thx for the reply!  oh and not BS - std 2.3.4

Edited by Roaddoctor

-Dave

Link to comment
Share on other sites

  • 2 weeks later...

I installed the Bootstrap version of this without any problems. Thanks again to Tsimi.

We've always had a shipping estimator on both the product and shopping cart page so I took a stab at making this work there as well.

It works with one minor exception, it doesn't bring the product price into the quote.

It seems to me like that might not be all that hard to do considering we know the product already. There's no quantity (or taxes) because there's nothing in the cart yet. product_info.php

Link to comment
Share on other sites

  • 1 month later...

I've installed the Bootstrap version and am trying to adapt it for MVS. Everything seems to be working except for the order-totals section will not reload when I click on one of the shipping options. The loading gif will appear and just spin.

 

I've plugged the variables (country, postcode, residential, and shipping) into a querystring and loaded the shipping_quotes.php file itself and everything seems to be loading properly even with the totals section of the output array.. Does anyone have any ideas?

 

John

Link to comment
Share on other sites

  • 1 month later...

I worked with @@Tsimi back when he released his version of this add-on ..

 

http://www.oscommerce.com/forums/topic/396632-shipping-quote-in-cart-2334-support-thread/?p=1707594

 

And, this is what I have installed in my store. I am using this *just* to to provide a shipping cost estimate ... no tax, no totals.

 

In final preparations to go live in my store, I'm going through my final testing. Here are a couple of observations:

 

1) I'm in the United States, and I'm using the US Post Office as my shipper. With this add-on, I can get shipping costs to destinations within the US by ZIP code --- works fine. Outside of the US, the US Post Office does not use the Postal Code for the destination in other countries --- the postage is the same throughout the destination country. But, this add-on requires *something* to be entered in the ZIP Code field, even if the US Post Office doesn't use it. I intend to have a note in my store stating this --- international users have to enter *something* (even a blank space), but it need not be their actual Postal Code.

 

2) I have just added a SSL certificate to my store. Now, the shipping estimator DOES NOT WORK! The spinner just spins and spins. I have confirmed this by altering the .htaccess file so I can access my site both securely and un-securely, and have tested this both ways:

 

HTTPS:// -> fails

 

HTTP:// -> works

 

 

Any ideas? HELP ?!??!?!?!

 

Thanks in advance!

 

Malcolm

Link to comment
Share on other sites

*Update*

 

If I enable the 'Send Debug Email' feature in the US Post Office shipping module, I do *not* receive an email from the Post Office (I did before I installed the SSL Certificate).

 

This makes sense (I think) as it seems that the estimating module is *not* establishing contacting the US Post Office, hence, there's no way for the Post Office to return a Debug Email.

 

Malcolm

Link to comment
Share on other sites

@@Roaddoctor

 

The shopping_cart.php on my site operates as non ssl so I can't test that. Only checkout pages should be ssl.  Are you running your entire site as ssl?

 

Yes.

 

I also did some debugging (sniffing) on the site, and came up with the following error message:

Blocked loading mixed active content "http://www.glovesforglassblowers.com/catalog/shipping_quotes.php?country=223&postcode=12345&residential=false"

There's a link to what that means:

 

https://developer.mozilla.org/en-US/docs/Security/MixedContent

 

So it does appear that the error is being generated in shipping_quotes.php

 

Malcolm

Link to comment
Share on other sites

@@ArtcoInc

 

Malcolm...if I put your url in this mixed content checker...

 

https://www.jitbit.com/sslcheck/

 

I get this error....

 

Pages with unsecure content:
https://www.glovesforglassblowers.com/catalog/contact_us.php?

 

You might have other issues but try changing the email form url to https: and see what happens.

 

Dan

 

Link to comment
Share on other sites

@@Dan Cole

 

Thank you. I *think* I have found the issue you raised ... In contact_up.php file, around line 77, there is this line:

<?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=send'), 'post', '', true); ?>

Here, it is calling the tep_href_link() function. The tep_href_link() function starts off with this:

// The HTML href link wrapper function
  function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
    global $request_type, $session_started, $SID;

    $page = tep_output_string($page);

    if (!tep_not_null($page)) {
      die('</td></tr></table></td></tr></table><br /><br /><font color="#ff0000"><strong>Error!</strong></font><br /><br /><strong>Unable to determine the page link!<br /><br />');
    }

    if ($connection == 'NONSSL') {
      $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
    } elseif ($connection == 'SSL') {
      if (ENABLE_SSL == true) {
        $link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;
      } else {
        $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
      }
    } else {
      die('</td></tr></table></td></tr></table><br /><br /><font color="#ff0000"><strong>Error!</strong></font><br /><br /><strong>Unable to determine connection method on a link!<br /><br />Known methods: NONSSL SSL</strong><br /><br />');
    }

If I read this correctly, if no $connection variable is passed, it defaults to 'NONSSL', and $link resolves to HTTP_SERVER . DIR_WS_HTTP_CATALOG.

 

So, this creates a non-ssl link, resulting in the 'Page with insecure content' error.

 

To test this, I changed the line in contact_us.php to:

<?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=send', 'SSL'), 'post', '', true); ?>

Now, the site passed the SSL Check.

 

Another possible solution might be to change the tep_href_link() function to default to SSL instead of NONSSL. After all, it does check to see if ENABLE_SSL is true or not.

 

But, this is getting off topic ... :-

 

 

I have checked to see if there are any calls to tep_href_link() within shipping_quotes.php, but the only one is at the end of the file, redirection back to the home page. So, this is not the problem here :(

 

Malcolm

Link to comment
Share on other sites

@@Dan Cole

 

The original problem wasn't a 'Mixed Content' error. It was that the Shipping Estimator did not work (provide a shipping estimate) if the customer was connected to the store through HTTPS. The spinner would just spin and spin and spin and ....

 

Using @@Roaddoctor David's idea, I turned off SSL for the entire shop, and now have osC turn it on only when it needs it (checkout, create account, etc). For now, it looks like that has solved that issue.

 

Thanks!

 

Malcolm

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...