Re: Zones Table Rate Shipping Module
I m testing for my zonetable now and I figured something wrong. For a normal table rate, we can set end the last amount as 10000:7% to charge 7% of the Order Total.
However, in the zone table rate, I am unable to do this. If i put 30:10%, it will charge items weight more than 30kgs to RM10, instead of 10% of the total order.
Can someone give any suggestion how to deal with this? Does that means that I have to insert the value indefintely?
Re: Zones Table Rate Shipping Module
You may need to customize the module to work with the percentage as the regular Zone Rate zones shipping module does ...
Re: Zones Table Rate Shipping Module
Hi Ajeh,
I'm trying to achieve the percentage allowance as mentioned before. I want to customize the file zonetable.php and compared it to table.php to gather the required percentage information. I found out that $table_cost is defined differently and copied the extra if-loop (incl the else of course) containing the percentage into the $table_cost of the zonetable.php file.
The result, after upload is that I'm receiving $0.00 as soon as my weight reaches the last value with the percentage.
Would you possibly know if there is anything else I need to change in the zonbetable.php file? Or is there any other file I need to change?
Your help would be very much appreciated.
otti
Re: Zones Table Rate Shipping Module
Hi again,
I found the solution for the above. I had missed a line of code which was to be inserted above the total cost calculation:
$order_total_amount = $_SESSION['cart']->show_total() - $_SESSION['cart']->free_shipping_prices() ;
That fixed the problem.
Thanks anyway.
otti
Re: Zones Table Rate Shipping Module
Quote:
Originally Posted by
francesca_ph
How do I install??
pls teach me
francesca_ph, I don't know if anybody ever answered you on this but I was also trawling for the same instruction set and did not find it, so I'll write my own.
- Download the latest version zones_table_rate_for_multiple_zones_1-1.zip from the first page of this thread.
- Unzip the file maintaining the directory structure of the zip file:
i.e. \zonetable\includes\languages\english\modules\shipping\zonetable.php
and \zonetable\includes\modules\shipping\zonetable.php - Copy these files to the existing directory structure of your Zen Cart installation
i.e. webroot\includes\languages\english\modules\shipping
and webroot\includes\modules\shipping - In Zen Cart admin go to Modules -> Shipping and you should see the new Zones Table Rate option at the bottom of the modules list.
- Click on Zones Table Rate and in the right hand column it should give you a "+Install" button, click on this and the installation is complete :clap:
You can now configure the module as discussed in this thread!
B
Re: Zones Table Rate Shipping Module
Quote:
Originally Posted by
beatle
francesca_ph, I don't know if anybody ever answered you on this but I was also trawling for the same instruction set and did not find it, so I'll write my own.
- Download the latest version zones_table_rate_for_multiple_zones_1-1.zip from the first page of this thread.
- Unzip the file maintaining the directory structure of the zip file:
i.e. \zonetable\includes\languages\english\modules\shipping\zonetable.php
and \zonetable\includes\modules\shipping\zonetable.php - Copy these files to the existing directory structure of your Zen Cart installation
i.e. webroot\includes\languages\english\modules\shipping
and webroot\includes\modules\shipping - In Zen Cart admin go to Modules -> Shipping and you should see the new Zones Table Rate option at the bottom of the modules list.
- Click on Zones Table Rate and in the right hand column it should give you a "+Install" button, click on this and the installation is complete :clap:
You can now configure the module as discussed in this thread!
B
Hi
I have done exactly that and the Zones Table Rates is still not showing up in my Shipping Modules in Admin. Does anyone have any suggestions on what might be causing this. Have I missed a step somewhere, or not done something.....
I am using Zen Cart 1.3.8a
Thanks so much!!
Re: Zones Table Rate Shipping Module
I was looking for this same fix to only display certain zone tables based on weight. I tried maxidvds code below, but i get the error;
Code:
Call to a member function show_weight() on a non-object
Has anyone else tried this mod and got it working?
Thanks,
Scott.
Quote:
Originally Posted by
maxidvd
Nevermind I figured out a way.
In my
Registered Post shipping mod I added a code snippet to only display if the cart is 10kg or more:
Find this code snippet in zonestable.php:
// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_ZONETABLE_STATUS == 'True') ? true : false);
}
And directly benief it add this:
Code:
// Fishmad added: Enable only if cart contents are heavier than 10kg
if ($_SESSION['cart']->show_weight() >= 10) {
$this->enabled = true;
}
In my
Express Post shipping mod I added a code snippet to only display if the cart is less then 10kg:
Find this code snippet in zonestable.php:
// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_ZONETABLE_STATUS == 'True') ? true : false);
}
And directly benief it add this:
Code:
// Fishmad added: Enable only if cart contents are less than 10kg
if ($_SESSION['cart']->show_weight() >= 10) {
$this->enabled = false;
}
Works for me.
Re: Zones Table Rate Shipping Module
Above the IF calling the cart function add a line:
global $cart;
You will also need to set up something to manage this in the admin as the cart doesn't exist in the Admin ... so you will probably get an error in the Modules ... Shipping ... without it ...
Re: Zones Table Rate Shipping Module
Thanks Linda! Ill give that a go.
Re: Zones Table Rate Shipping Module
Thanks to Lindas help and maxidvds initial code, I now have this module turning zone tables on or off according to their weight. :smile:
I had to tweak it a bit to only show the right table according to the weight.
Here's what I did (note that the weights are in grams);
Immediately beneath the closing '}' of this code;
PHP Code:
// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_ZONETABLE_STATUS == 'True') ? true : false);
}
Add this code;
PHP Code:
// Scotts mod: Enable only if cart contents are LESS than 3kg
global $cart;
if ($_SESSION['cart']->show_weight() > 3000) {
$this->enabled = false;
}
The above code disables the zone for any weights over 3kgs (3000 grams) (and defaults to courier for us)
This code enables the other zone table (in our case Australia Post)
PHP Code:
// Scotts mod: Enable only if cart contents are HEAVIER than 3kg
global $cart;
if ($_SESSION['cart']->show_weight() < 3001) {
$this->enabled = false;
}
The initial code, if it had both tables set to the same weight (3000 in this case) - they would both show on an order weighing exactly 3kgs. So I set the second block of code to 3001.
This code will work for lbs too, just set a much smaller number ;)