Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

MVS Shipping Cost Estimator


AllThingsTrendy

Recommended Posts

I just installed the MVS Shipping Cost Estimator v2.2. I am having a few issues:

 

ISSUE 1

I got the products_ship_estimator.php to work fine. However, I can not get the ship_estimator.php to work unless I first utilize products_ship_estimator.php. The page simply continues returning asking for the same input (zip, state and country selection).

 

ISSUE 2

The ship_estimator.php and products_ship_estimator.php is not considering that our USPS module has insurance requirements configured. Customers are getting a different price

 

ISSUE 3

The example web sites appear to have a more advanced contrib that displays the selected products on the shipping estimators. Perhaps the 2.2 version includes this and I have yet another problem?

 

If anyone can help with any of these, it would be greatly appreciated1 My site: www.allthingstrendy.com

 

David

Anthony David

AllThingsTrendy.com

Link to comment
Share on other sites

1. Both modules pass the same variables the same way. The fact that the Cart module works after the Product module is set would indicate that the Cart module is not passing its variables correctly. Do you have any modifications that would interfere with this? URL Rewriters?

 

2. Both modules use the stock osCommerce shipping modules to determine rates, the same as checkout_shipping.php. If your USPS module has a non-standard insurance addon that does not pass variables in compliance with the standard, this will not work.

 

3. The examples are not under my control, so I can only assume they've been custom modified.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

  • 3 weeks later...

I have tried this and another module for shipping estimates and both are giving me an error i just can't luck out and get rid of when a customer is not logged in i get an error returned

 

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /catalog/includes/functions/database.php on line 103

 

but when the customer is logged in it does not display this error. I am using php5 and mysql 5 as well.

 

The code from this line is

 

  function tep_db_num_rows($db_query) {
return mysql_num_rows($db_query);

 

What would be causing this error any help would be much appriciated. I am running one mod that i have uninstalled and retested that i thought might be causing the error and it wasn't the cause and that was the display prices to logged in customers only. This is mind frusterating to me as i have looked all over to try to find out what could be causing this and i can't seem to find anywere that i calling that particular line to cause the error to return only when a customer is not logged on.

 

Link to the site to see error

Link to comment
Share on other sites

That's a very odd error. The code is correct and works on many other sites. I suspect that this is a bug in an old version of PHP. What version is your shop running?

 

In any case, it seems to give a quote anyway. If you're satisfied that it gives correct quotes you can just turn the warning off. Find the following code in both ship estimator modules (two places in each)

 

tep_db_num_rows

and change it to

 

@tep_db_num_rows

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

That's a very odd error. The code is correct and works on many other sites. I suspect that this is a bug in an old version of PHP. What version is your shop running?

 

In any case, it seems to give a quote anyway. If you're satisfied that it gives correct quotes you can just turn the warning off. Find the following code in both ship estimator modules (two places in each)

 

tep_db_num_rows

and change it to

 

@tep_db_num_rows

Regards

Jim

 

We are running php version 5.2.8 (Zend: 2.2.0) I will try the above fix and see if it works. Thanks.

Link to comment
Share on other sites

Jim,

 

Thank you so much! The update has greatly helped. The ship_estimator.php seems to be working correctly now by considering insurance whether the customer is singed in or not. This is verified for domestic and international shipments.

 

The products_ship_estimator.php works perfectly if the user is signed in. However, for those not signed in:

1) It is still not considering insurance for domestic deliveries.

2) It appears to be over calculating the insurance for international deliveries. For some reason there is a $1 overage on a $530 item; which does not compute from our settings within the module.

 

This can be seen on my sight.

 

I know that I and other truly appreciate this module and your efforts to improve! Thanks again!

 

David

Anthony David

AllThingsTrendy.com

Link to comment
Share on other sites

I'm afraid I don't know the answer to this. Both ship estimators use the same code to get the data from the shipping module. I can't see how this would result in different quotes between the two. Maybe there is a coding error in there, but I just can't see it.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

  • 3 weeks later...

I have been unable to get the Products Shipping Estimator to work correctly.

 

It will work for the first product but not any subsequent requests.

 

If you clear the browser cache it will work again but only for the first product.

 

Output URL on first product: products_ship_estimator.php?pid=540&osCsid=

 

Output URL on any subsequent requests: products_ship_estimator.php?action=process&pid=540&osCsid=

 

Error message:

 

The Shipping Estimator is currently unavailable.

Error: Product was not found. Please close this window and try again.

Link to comment
Share on other sites

You have something in your code that's changing & to &. Stock osCommerce doesn't do this, so it's something you've added. You'll need to find that and fix it.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...

You have something in your code that's changing & to &. Stock osCommerce doesn't do this, so it's something you've added. You'll need to find that and fix it.

 

Regards

Jim

 

Jim - can you expand on this? I have the same problem within MVS 1.2.2, and this is the only post on the boards that is related...

 

Where do I begin to look - seo.class.php?

 

the poduct ship estimator works once per session, first click

http://www. xxxxxx.com/products_ship_estimator.php?pid=24

 

Then adds the &amp on subsequent quotes... ie breaks it. such as

 

http://www. xxxxxxx.com/products_ship_estimator.php?action=process&pid=24

 

A kick in the right direction would help. Thanks!

-Dave

Link to comment
Share on other sites

I don't know what the cause is or I would have stated it. Your SEO addon would be the first place I would look. I can't think of anything else that would product that error, although it is certainly possible that some other addon is responsible.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

I have both of these mods running perfectly in my store. You should probably download a fresh copy of osc to your computer and use a file compare program like winmerge to see where the problem is.

Link to comment
Share on other sites

I have both of these mods running perfectly in my store. You should probably download a fresh copy of osc to your computer and use a file compare program like winmerge to see where the problem is.

 

May I ask which exact version of /includes/classes/seo.class.php you are using?

 

I am working with a fresh rc2a development install with php 5.1.6, mysql 5.0.77 and have had all sorts of issues from the get go / prior to mods... so its been interesting; and a bit too time consuming. I've almost got the wrinkles sorted...so close :)

 

Where's Chemo when you need him :\

-Dave

Link to comment
Share on other sites

Here is my seo_class opening

<?php

define('USE_SEO_REDIRECT_DEBUG', 'false');

/**

* Ultimate SEO URLs Contribution - osCommerce MS-2.2

*

* Ultimate SEO URLs offers search engine optimized URLS for osCommerce

* based applications. Other features include optimized performance and

* automatic redirect script.

* @package Ultimate-SEO-URLs

* @link http://www.oscommerce-freelancers.com/ osCommerce-Freelancers

* @copyright Copyright 2005, Bobby Easland

* @author Bobby Easland

* @filesource

*/

 

/**

* SEO_DataBase Class

*

* The SEO_DataBase class provides abstraction so the databaes can be accessed

* without having to use tep API functions. This class has minimal error handling

* so make sure your code is tight!

* @package Ultimate-SEO-URLs

* @link http://www.oscommerce-freelancers.com/ osCommerce-Freelancers

* @copyright Copyright 2005, Bobby Easland

* @author Bobby Easland

*/

/**

* Modified for MySQL5 in STRICT mode

* by FWR Media

* www.fwrmedia.co.uk

*/

Link to comment
Share on other sites

You have something in your code that's changing & to &. Stock osCommerce doesn't do this, so it's something you've added. You'll need to find that and fix it.

 

Regards

Jim

 

If anyone else has this & problem, the fix is quite simple - based on a post by FWR Media elsewhere on the forums.

 

If you are having & & problems

Try this..

 

Find function tep_redirect in catalog/includes/functions/general.php

 

Find ..

        header('Location: ' . $url);

 

Replace with

        $url = str_replace('&', '&', $url);
       header('Location: ' . $url);

 

Products_shipping_estimate.php now works fine for me.

-Dave

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...