Jump to content

double rates showing in all in one shipping


Claudia

Recommended Posts

I just upgraded to 1.0.26 AIOS and my shipping rates are showing twice on the checkout page.  This has always happened and I was given code to correct this, but I'm not sure it would work now.  Here is the change from some previous version of CC.  What should I do?

In All in One Shipping module, shipping.class.php, near line 212, find:

$this->debug(sprintf('<strong>&gt;&gt;&gt; Shipping zone [ID %s] matches the delivery address! Use this zone for shipping calculations.</strong>', $this->_all_zones[$i]['id']));

if ($this->_settings['multiple_zones'] == 'first') {

            $this->debug('Looking for first matching zone of best match (instead of searching for all matching zones - see AIOS module settings)');

} else {

            $this->debug('Searching for all matching shipping zones (instead of stopping at first matching zone - see AIOS module settings)');

}

Change to:

$this->debug(sprintf('<strong>&gt;&gt;&gt; Shipping zone [ID %s] matches the delivery address! Use this zone for shipping calculations.</strong>', $this->_all_zones[$i]['id']));

if ($this->_settings['multiple_zones'] == 'first') {

            $this->debug('Looking for first matching zone of best match (instead of searching for all matching zones - see AIOS module settings)');

            $closest_match_zone_id = $this->_all_zones[$i]['id'];

            break;

} else {

            $this->debug('Searching for all matching shipping zones (instead of stopping at first matching zone - see AIOS module settings)');

}

doublerates.PNG.bacdea1154d70c34a8f370f1feeaf80b.PNG

 

Link to comment
Share on other sites

AIOS v1.0.26 restricts showing the debug report to only those who are configured to see CubeCart's debug data (admin, Store Settings, Advanced tab, "IP Addresses". So, no worries about customers seeing weird stuff.

In AIOS, enable verbose debugging. Start a checkout. There should now be a red preamble to CubeCart's checkout page detailing how AIOS module calculated the package of rates.

Please copy/paste that to a text file and attach it to a reply.

 

Link to comment
Share on other sites

Sorry, no, not what I was looking for.

In admin, Store Settings, Advanced tab, Make sure you have your local IP address in the "Restrict..." text entry field (www.showmyip.com).

Then, in the AIOS module settings screen, enable the AIOS Verbose debugging.

There should now be a red preamble to CubeCart's checkout page. This is what I would like to see.

Edited by bsmither
Link to comment
Share on other sites

Good.

There seems to be an extensive collection of zones based on ranges of ZIP codes.

There seems to be an extensive collection of zones based on sets of States.

So, there is a match on Zone 2 Zips, and a match on Zone 2 States.

Aside from the idea that ranges of zips versus sets of states could be considered the exact same thing, I see that the setting "First Match" isn't working as expected.

So, as a work around, which the edit you posted above seems to be that solution, we might try to make that edit to AIOS v1.0.26.

Instead of line 212, look at the code starting at line 237.

 

Edited by bsmither
Link to comment
Share on other sites

In shipping.class.php:

Find near lines 237-240:

				$this->debug(sprintf('<strong>&gt;&gt;&gt; Shipping zone [ID %s] matches the delivery address! Use this zone for shipping calculations.</strong>', $this->_all_zones[$i]['id']));
				if ($this->_settings['multiple_zones'] == 'first') {
					$this->debug('Looking for first matching zone of best match (instead of searching for all matching zones - see AIOS module settings)');
				} else {

Change to:

				$this->debug(sprintf('<strong>&gt;&gt;&gt; Shipping zone [ID %s] matches the delivery address! Use this zone for shipping calculations.</strong>', $this->_all_zones[$i]['id']));
				if ($this->_settings['multiple_zones'] == 'first') {
					$this->debug('Looking for first matching zone of best match (instead of searching for all matching zones - see AIOS module settings)');
					$closest_match_zone_id = $this->_all_zones[$i]['id'];
					break;
				} else {

The above is the exact same edit as was posted earlier, just the line numbers have changed.

  • Like 1
Link to comment
Share on other sites

I believe the essential difference with why your rate schedules require this edit is because, among more than one zone, there are same-named Shipping Rates.

That is to say:
Zone 2 Zips has a selection rule for 40100 - 40299, with a rate rule named "USPS First Class" equals 4.81.
Zone 2 States has a selection rule for [IN, KY] named "USPS First Class" equals 4.81.

So, the "First Match" feature seems to be working correctly as it finds the first match in each Zone, on the assumption only one Zone would find any match.

 

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