Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Why are my shipping table rate not ok in 1.0 if it’s ok in 0.9 ? 
 
katell
Jr. Member
 
Total Posts:  14
Joined:  2007-12-17
Nouméa
 

Hi,

I use table rates since 0.8 magento and with the last release 1.0 it’s break .
I’d changed nothing, I juste create new state in my country and I insert rates in shipping_tablerate in database

FOr example :
website_id = 1
dest_country_id = FR
dest_region_id = 182
dest_zip = 35300
condition_name = ‘package_value’
condition_value =’800’
price =’10’
cost =’0’

And I activate table rates in config/shipping method ?

Can u explain me How I do tablerates by destination and price in new version ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
developerx
Jr. Member
 
Total Posts:  25
Joined:  2007-10-23
 

There is a bug in the file

app\code\core\Mage\Shipping\Model\Mysql4\Carrier\Tablerate.php

this needs to be removed from the SQL Script

OR (dest_region_id=’’ AND dest_zip=’’)

 
Magento Community Magento Community
Magento Community
Magento Community
 
radders
Sr. Member
 
Total Posts:  162
Joined:  2008-03-23
 

I noticed that the release notes for 1.0 state that table rate shipping is not working and that a patch is due out to fix it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
katell
Jr. Member
 
Total Posts:  14
Joined:  2007-12-17
Nouméa
 

Thxs for your response, it’s the best way but I make a modification :

In app\code\core\Mage\Shipping\Model\Mysql4\Carrier\Tablerate.php,
I change in line 66/67

$select->where("(dest_zip=:zip)
                     OR (dest_region_id=:region AND dest_zip='')
                     OR (dest_country_id=:country AND dest_region_id='0' AND dest_zip='')
                     OR (dest_country_id='0' AND dest_region_id='0' AND dest_zip='')"
);;

By

$region $read->quote($request->getDestRegionId());
        
$country $read->quote($request->getDestCountryId());
        
$zip $read->quote($request->getDestPostcode());

        
$select->where("(dest_zip=$zip)
                     OR (dest_region_id=
$region AND dest_zip='')
                     OR (dest_country_id=
$country AND dest_region_id='0' AND dest_zip='')
                     OR (dest_country_id='0' AND dest_region_id='0' AND dest_zip='')"
);

This code come from next version, Because replace tag (:zip , :region, :country) with $bind information didn’t work in this process
(maybe we can replace :zip , :region, :country by ”?” as in other requests but it don’t work here)

 
Magento Community Magento Community
Magento Community
Magento Community
 
harry12bar
Sr. Member
 
Avatar
Total Posts:  168
Joined:  2008-01-07
 
katell - 08 April 2008 02:43 AM

Thxs for your response, it’s the best way but I make a modification :

In app\code\core\Mage\Shipping\Model\Mysql4\Carrier\Tablerate.php,
I change in line 66/67


$select->where("(dest_zip=:zip)
                     OR (dest_region_id=:region AND dest_zip='')
                     OR (dest_country_id=:country AND dest_region_id='0' AND dest_zip='')
                     OR (dest_country_id='0' AND dest_region_id='0' AND dest_zip='')"
);;

By
$region $read->quote($request->getDestRegionId());
        
$country $read->quote($request->getDestCountryId());
        
$zip $read->quote($request->getDestPostcode());

        
$select->where("(dest_zip=$zip)
                     OR (dest_region_id=
$region AND dest_zip='')
                     OR (dest_country_id=
$country AND dest_region_id='0' AND dest_zip='')
                     OR (dest_country_id='0' AND dest_region_id='0' AND dest_zip='')"
);

This code come from next version, Because replace tag (:zip , :region, :country) with $bind information didn’t work in this process
(maybe we can replace :zip , :region, :country by ”?” as in other requests but it don’t work here)

Masterful wink Cheers man ...worked a treat after asking this question for a while. Really greatful
Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
sherrie
Moderator
 
Avatar
Total Posts:  1655
Joined:  2007-12-14
Waterloo, ON
 

Thanks so much guys!  This was one of the last things I needed to fix!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Herve Guetin
Sr. Member
 
Avatar
Total Posts:  216
Joined:  2008-05-10
Lyon, FR
 

Hi all,

Does this mean that, with these changes, you are able to make shipping prices work for different countries ?
Tried to change code of Tablerates.php on the latest ver. 1.0.19870 ....

I am soooo struggling here… who’s got the clue to make multiple destinations work ?
Thank so much.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ninereeds
Jr. Member
 
Total Posts:  4
Joined:  2008-05-07
 

Hello,

I’m trying to make the following tablerates.csv work, using your method with the latest version of Magento :

“Country”,"Region/State","Zip/Postal Code","Order Subtotal (and above)","Shipping Price”
“US”,"NY",10005,20,10
“US”,"AK",55000,20,7
“US”,"AK",56000,20,8

After importation of this files I proceed to checkout as a guest with, for example with 10005 as a zipcodes for the state of New York and it doesn’t work ...

I also replaced :

$region = $read->quote($request->getDestRegionId());
$country = $read->quote($request->getDestCountryId());
$zip = $read->quote($request->getDestPostcode());

by

$bind = array(
‘zip’ => $read->quote($request->getDestPostcode()),
‘region’ => $read->quote($request->getDestRegionId()),
‘country’ => $read->quote($request->getDestCountryId())
);

But it didn’t work either....

Could you help me ? I’m a little lost....

Ninereeds

 
Magento Community Magento Community
Magento Community
Magento Community
 
00christian00
Sr. Member
 
Total Posts:  87
Joined:  2008-05-02
 

The new 1.1 alpha fix it.
I extracted the file from it,you can find it here :
http://www.magentocommerce.com/boards/viewthread/10180/

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top