Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Need help with shipping

Need help with shipping

Locked

Views: 2,675

Results 1 to 20 of 28
This thread is locked. New replies are disabled.
10 Jul 2010, 9:06 PM
#1
enetllc avatar

enetllc

New Zenner

Join Date:
Jul 2010
Posts:
2
Plugin Contributions:
0

Need help with shipping

I need help with shipping. How do I set different shipping rates on different items. (i.e. product a shipping $15, product b shipping $10) Thanks for the help.

I am using the newest zen cart version.

10 Jul 2010, 10:28 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Need help with shipping

You could use the Per Unit perweightunit shipping module where the Product Weight products_weight is used for the shipping cost ...

To do this, be sure to change the settings in the Configuration ... Shipping/Packaging and set the Maximum Weight to 5000 and the Tare Rates to 0:0 ...

Now just enter the shipping price for each Product as the Product Weight and this will be the Product shipping per quantity for the Product ...

11 Jul 2010, 1:09 PM
#3
enetllc avatar

enetllc

New Zenner

Join Date:
Jul 2010
Posts:
2
Plugin Contributions:
0

Re: Need help with shipping

Will do, thanks I appreciate your help.

10 Aug 2010, 11:35 PM
#4
paddy_uk2007 avatar

paddy_uk2007

New Zenner

Join Date:
Aug 2007
Posts:
95
Plugin Contributions:
0

Re: Need help with shipping

Hi i have my shipping set up like this and it all works fine, but i want to set it so the customer pays a maximum shipping cost of £4.99.

meaning i may set all my products with different shipping cost but if they order more they wouldn't pay anymore then £4.99 postage.

so if i had product A = postage 99p product B = postage £2.99 and product C = postage £1.99 total would be £5.94 but i want to cap it at £4.99 so they never pay more then £4.99 no mater how many items they order.

is this possible?? please help

11 Aug 2010, 3:03 AM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Need help with shipping

You would then need to customize the shipping module that you are using that when the cost is > 4.99 it should only charge 4.99 ...

You would need to customize the code for:

    $this->quotes = array('id' => $this->code,
                          'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE,
                          'methods' => array(array('id' => $this->code,
                                                   'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY,
                                                   'cost' => MODULE_SHIPPING_PERWEIGHTUNIT_COST * ($total_weight_units * $shipping_num_boxes) +
                                                   (MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING) ) ));
12 Aug 2010, 5:09 AM
#6
paddy_uk2007 avatar

paddy_uk2007

New Zenner

Join Date:
Aug 2007
Posts:
95
Plugin Contributions:
0

Re: Need help with shipping

Ajeh:

You would then need to customize the shipping module that you are using that when the cost is > 4.99 it should only charge 4.99 ...

You would need to customize the code for:

$this->quotes = array('id' => $this->code,
                      'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE,
                      'methods' => array(array('id' => $this->code,
                                               'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY,
                                               'cost' => MODULE_SHIPPING_PERWEIGHTUNIT_COST * ($total_weight_units * $shipping_num_boxes) +
                                               (MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING) ) ));

Thanks for getting back to me but am lost..... how do i do this??? 

I know your talking about this php file 

includes/modules/shipping/perweightunit.php

but how do i edit it so it charges a max of £4.99 shipping?? what do i need to add to that page?? 

please can you help?
thanks
12 Aug 2010, 12:33 PM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Need help with shipping

You could make an IF around this ...

if ( (MODULE_SHIPPING_PERWEIGHTUNIT_COST * ($total_weight_units * $shipping_num_boxes) + (MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING) ) > 4.99) {

    $this->quotes = array('id' => $this->code,
                          'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE,
                          'methods' => array(array('id' => $this->code,
                                                   'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY,
                                                   'cost' => 4.99 )));

} else {
    $this->quotes = array('id' => $this->code,
                          'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE,
                          'methods' => array(array('id' => $this->code,
                                                   'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY,
                                                   'cost' => MODULE_SHIPPING_PERWEIGHTUNIT_COST * ($total_weight_units * $shipping_num_boxes) +
                                                   (MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING) ) ));
}

I did not test this but something like that should work ...

14 Aug 2010, 11:58 AM
#8
gatenioy avatar

gatenioy

New Zenner

Join Date:
Aug 2010
Posts:
6
Plugin Contributions:
0

Re: Need help with shipping

Hi,
How to set shipping discount in this way.
If I set the shipping for each individual Item as described above ,
for example shipping for the first item will be $6,
and for each additional Item $2
each item will be set as first item shipping price and additional shipping price.
also for multi items
Thanks

14 Aug 2010, 1:23 PM
#9
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Need help with shipping

Just use Item Rate item shipping module and set it up with:
Item Rate: 2.00
Handling: 4.00

Now the 1st item is $6.00 ($2.00 + $4.00) and each additional item is $2.00 ...

14 Aug 2010, 5:11 PM
#10
gatenioy avatar

gatenioy

New Zenner

Join Date:
Aug 2010
Posts:
6
Plugin Contributions:
0

Re: Need help with shipping

Thanks,
How to set handling for each item,
if item A -shipping is $6 and each additional is $2
Item B - shipping is $8 each additional is $3 and so on
and the buyer order both.

I saw setting handling in global not per Item.
please advice

14 Aug 2010, 5:16 PM
#11
pringle avatar

pringle

New Zenner

Join Date:
Aug 2010
Posts:
57
Plugin Contributions:
0

Re: Need help with shipping

Ok guys i need help configuring my shipping too,i will be selling small items but offering free shipping with orders over 100 pounds,so how do i set up postage? thanks,pringle.

14 Aug 2010, 5:22 PM
#12
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Need help with shipping

That would require:

Customizing the products table to manage the cost for the 1st item and the cost for each addition item on a Per Product basis

Customizing the code to allow you to add/edit the additional information for the shipping to the products table

Customizing a shipping module to calculate the new shipping cost based on the individual rates for the 1st Item and Additional Items on a Per Product basis

This is not necessarily a difficult thing to do but it is very time consuming to code everything for this type of shipping method ...

14 Aug 2010, 7:40 PM
#13
pringle avatar

pringle

New Zenner

Join Date:
Aug 2010
Posts:
57
Plugin Contributions:
0

Re: Need help with shipping

Ajeh:

That would require:

Customizing the products table to manage the cost for the 1st item and the cost for each addition item on a Per Product basis

Customizing the code to allow you to add/edit the additional information for the shipping to the products table

Customizing a shipping module to calculate the new shipping cost based on the individual rates for the 1st Item and Additional Items on a Per Product basis

This is not necessarily a difficult thing to do but it is very time consuming to code everything for this type of shipping method ...

So in the admin cp

would i go to shipping? table rate?

Also what next once i'm in table rate,thanks,pringle.

15 Aug 2010, 4:51 AM
#14
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Need help with shipping

You need to either write all of the custom code for this or hire a coder to write this code ...

There are no settings built into Zen Cart to magically write this code for you to customize this type of shipping costs on a per product per unit basis ...

24 Aug 2010, 2:43 AM
#15
paddy_uk2007 avatar

paddy_uk2007

New Zenner

Join Date:
Aug 2007
Posts:
95
Plugin Contributions:
0

Re: Need help with shipping

Ajeh:

You could make an IF around this ...

if ( (MODULE_SHIPPING_PERWEIGHTUNIT_COST * ($total_weight_units * $shipping_num_boxes) + (MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING) ) > 4.99) {

$this->quotes = array('id' => $this->code,
                      'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE,
                      'methods' => array(array('id' => $this->code,
                                               'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY,
                                               'cost' => 4.99 )));

} else {
$this->quotes = array('id' => $this->code,
'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE,
'methods' => array(array('id' => $this->code,
'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY,
'cost' => MODULE_SHIPPING_PERWEIGHTUNIT_COST * ($total_weight_units * $shipping_num_boxes) +
(MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING) ) ));
}

> 
> I did not test this but something like that should work ...

Hi thanks but that didnt work, I added 

if ( (MODULE_SHIPPING_PERWEIGHTUNIT_COST * ($total_weight_units * $shipping_num_boxes) + (MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING) ) > 4.99) {

$this->quotes = array('id' => $this->code,
                      'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE,
                      'methods' => array(array('id' => $this->code,
                                               'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY,
                                               'cost' => 4.99 )));

} else {


above 

$this->quotes = array('id' => $this->code,
                      'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE,
                      'methods' => array(array('id' => $this->code,
                                               'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY,
                                               'cost' => (MODULE_SHIPPING_PERWEIGHTUNIT_COST * $total_weight_units)
                                                          + MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING)));

but this did not work...... can anyone tell me what am doing wrong??

thanks
24 Aug 2010, 4:13 AM
#16
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Need help with shipping

Did you close the IF statement?

You show the top of it and what you added ... and you show what you added it above ... but you do not show a closing bracket for the IF statement ...

24 Aug 2010, 12:09 PM
#17
newbietoec avatar

newbietoec

New Zenner

Join Date:
Jul 2010
Posts:
45
Plugin Contributions:
0

Re: Need help with shipping

paddy_uk2007:

Hi thanks but that didnt work, I added

if ( (MODULE_SHIPPING_PERWEIGHTUNIT_COST * ($total_weight_units * $shipping_num_boxes) + (MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING) ) > 4.99) {

$this->quotes = array('id' => $this->code,
                      'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE,
                      'methods' => array(array('id' => $this->code,
                                               'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY,
                                               'cost' => 4.99 )));

} else {

> 
> above 
> 
> ```
    $this->quotes = array('id' => $this->code,
                          'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE,
                          'methods' => array(array('id' => $this->code,
                                                   'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY,
                                                   'cost' => (MODULE_SHIPPING_PERWEIGHTUNIT_COST * $total_weight_units)
                                                              + MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING)));

but this did not work...... can anyone tell me what am doing wrong??

thanks

That works perfect if you do this..

$total_weight_units = $shipping_weight;
    
	if ( (MODULE_SHIPPING_PERWEIGHTUNIT_COST * ($total_weight_units * $shipping_num_boxes) + (MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING) ) > 9.50) {

    $this->quotes = array('id' => $this->code,
                          'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE,
                          'methods' => array(array('id' => $this->code,
                                                   'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY,
                                                   'cost' => 9.50 )));

} else {
	
	$this->quotes = array('id' => $this->code,
                          'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE,
                          'methods' => array(array('id' => $this->code,
                                                   'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY,
                                                   'cost' => MODULE_SHIPPING_PERWEIGHTUNIT_COST * ($total_weight_units * $shipping_num_boxes) +
                                                   (MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING) ) ));

}

Notice the closing bracket for the if statement and mine is for 9.50 shipping.

25 Aug 2010, 3:36 AM
#18
paddy_uk2007 avatar

paddy_uk2007

New Zenner

Join Date:
Aug 2007
Posts:
95
Plugin Contributions:
0

Re: Need help with shipping

NewbietoEC:

That works perfect if you do this..

$total_weight_units = $shipping_weight;

if ( (MODULE_SHIPPING_PERWEIGHTUNIT_COST * ($total_weight_units * $shipping_num_boxes) + (MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING) ) > 9.50) {

$this->quotes = array('id' => $this->code,
                      'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE,
                      'methods' => array(array('id' => $this->code,
                                               'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY,
                                               'cost' => 9.50 )));

} else {

$this->quotes = array('id' => $this->code,
                      'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE,
                      'methods' => array(array('id' => $this->code,
                                               'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY,
                                               'cost' => MODULE_SHIPPING_PERWEIGHTUNIT_COST * ($total_weight_units * $shipping_num_boxes) +
                                               (MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING) ) ));

}

> 
> 
> Notice the closing bracket for the if statement and mine is for 9.50 shipping.

this really is not working for me, i have edited includes/modules/shipping/perweightunit.php i have put a copy of the whole file, can someone look at it and let me know what it is i am doing wrong thanks 

<?php /** * @package shippingMethod * @copyright Copyright 2003-2006 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: perweightunit.php 3308 2006-03-29 08:21:33Z ajeh $ */ /** * "Per Weight Unit" shipping module, allowing you to offer per-unit-rate shipping options * */ class perweightunit extends base { /** * $code determines the internal 'code' name used to designate "this" payment module * * @var string */ var $code; /** * $title is the displayed name for this payment method * * @var string */ var $title; /** * $description is a soft name for this payment method * * @var string */ var $description; /** * module's icon * * @var string */ var $icon; /** * $enabled determines whether this module shows or not... during checkout. * * @var boolean */ var $enabled; /** * Constructor * * @return perweightunit */ function perweightunit() { global $order, $db; $this->code = 'perweightunit'; $this->title = MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE; $this->description = MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_PERWEIGHTUNIT_SORT_ORDER; $this->icon = ''; $this->tax_class = MODULE_SHIPPING_PERWEIGHTUNIT_TAX_CLASS; $this->tax_basis = MODULE_SHIPPING_PERWEIGHTUNIT_TAX_BASIS; // disable only when entire cart is free shipping if (zen_get_shipping_enabled($this->code)) { $this->enabled = ((MODULE_SHIPPING_PERWEIGHTUNIT_STATUS == 'True') ? true : false); } if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_PERWEIGHTUNIT_ZONE > 0) ) { $check_flag = false; $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_PERWEIGHTUNIT_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id"); while (!$check->EOF) { if ($check->fields['zone_id'] < 1) { $check_flag = true; break; } elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) { $check_flag = true; break; } $check->MoveNext(); } if ($check_flag == false) { $this->enabled = false; } } } /** * Obtain quote from shipping system/calculations * * @param string $method * @return array */ function quote($method = '') { global $order, $shipping_weight; $total_weight_units = $shipping_weight; if ( (MODULE_SHIPPING_PERWEIGHTUNIT_COST * ($total_weight_units * $shipping_num_boxes) + (MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING) ) > 4.99) { $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY, 'cost' => 4.99 ))); } else { $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY, 'cost' => MODULE_SHIPPING_PERWEIGHTUNIT_COST * ($total_weight_units * $shipping_num_boxes) + (MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING) ) )); } if ($this->tax_class > 0) { $this->quotes['tax'] = zen_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } if (zen_not_null($this->icon)) $this->quotes['icon'] = zen_image($this->icon, $this->title); return $this->quotes; } /** * Check to see whether module is installed * * @return boolean */ function check() { global $db; if (!isset($this->_check)) { $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_PERWEIGHTUNIT_STATUS'"); $this->_check = $check_query->RecordCount(); } return $this->_check; } /** * Install the shipping module and its configuration settings * */ function install() { global $db; $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Per Weight Unit Shipping', 'MODULE_SHIPPING_PERWEIGHTUNIT_STATUS', 'True', 'Do you want to offer per unit rate shipping?<br /><br />Product Quantity * Units (products_weight) * Cost per Unit', '6', '0', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())"); $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Shipping Cost per Unit', 'MODULE_SHIPPING_PERWEIGHTUNIT_COST', '1', 'NOTE: When using this Shipping Module be sure to check the Tare settings in the Shipping/Packaging and set the Largest Weight high enough to handle the price, such as 5000.00 and the adjust the settings on Small and Large packages which will add to the price as well.<br /><br />The shipping cost will be used to determin shipping charges based on: Product Quantity * Units (products_weight) * Cost per Unit - in an order that uses this shipping method.', '6', '0', now())"); $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Handling Fee', 'MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING', '0', 'Handling fee for this shipping method.', '6', '0', now())"); $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_PERWEIGHTUNIT_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'zen_get_tax_class_title', 'zen_cfg_pull_down_tax_classes(', now())"); $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Tax Basis', 'MODULE_SHIPPING_PERWEIGHTUNIT_TAX_BASIS', 'Shipping', 'On what basis is Shipping Tax calculated. Options are<br />Shipping - Based on customers Shipping Address<br />Billing Based on customers Billing address<br />Store - Based on Store address if Billing/Shipping Zone equals Store zone', '6', '0', 'zen_cfg_select_option(array(\'Shipping\', \'Billing\', \'Store\'), ', now())"); $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Shipping Zone', 'MODULE_SHIPPING_PERWEIGHTUNIT_ZONE', '0', 'If a zone is selected, only enable this shipping method for that zone.', '6', '0', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())"); $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_SHIPPING_PERWEIGHTUNIT_SORT_ORDER', '0', 'Sort order of display.', '6', '0', now())"); } /** * Remove the module and all its settings * */ function remove() { global $db; $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key LIKE 'MODULE_SHIPPING_PERWEIGHTUNIT_%'"); } /** * Internal list of configuration keys used for configuration of the module * * @return array */ function keys() { return array('MODULE_SHIPPING_PERWEIGHTUNIT_STATUS', 'MODULE_SHIPPING_PERWEIGHTUNIT_COST', 'MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING', 'MODULE_SHIPPING_PERWEIGHTUNIT_TAX_CLASS', 'MODULE_SHIPPING_PERWEIGHTUNIT_TAX_BASIS', 'MODULE_SHIPPING_PERWEIGHTUNIT_ZONE', 'MODULE_SHIPPING_PERWEIGHTUNIT_SORT_ORDER'); } } ?>
25 Aug 2010, 5:02 AM
#19
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Need help with shipping

What version of Zen Cart are you running? :unsure:

25 Aug 2010, 5:12 AM
#20
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Need help with shipping

If you are using v1.3.9 ... you have an old version of perweightunit.php ...

If you are using an older version of Zen Cart than v1.3.9, you need to change another line of code to include what I have marked in red:

  function quote($method = '') {
    global $order, $shipping_weight, $shipping_num_boxes;