Your shopping cart is empty. Browse our Store

Magento

Open Source eCommerce Evolved

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:  11
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:  19
Joined:  2007-10-24
 

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
Member
 
Total Posts:  52
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:  11
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
Member
 
Avatar
Total Posts:  62
Joined:  2008-01-07
 
katell - 08 April 2008 03: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
Sr. Member
 
Avatar
Total Posts:  268
Joined:  2007-12-14
Normal, Illinois
 

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

 Signature 

Creativity is falling in love with the world. – Dewitt Jones
Current Project: Aqua Gear Direct • Currently Running: PHP 5.2.5/MySQL 5.0.45/Magento 1.0.19870 on HostGator

 
Magento Community Magento Community
Magento Community
Magento Community
 
VR...
Jr. Member
 
Avatar
Total Posts:  7
Joined:  2008-05-10
Paris, 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
Magento Community
Magento Community
    Back to top
 
© Copyright 2008 Varien. Magento is a trademark of Irubin Consulting Inc. DBA Varien