Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Extra charge for specific bulky items (table-weight module)

Extra charge for specific bulky items (table-weight module)

Locked

Views: 1,926

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
8 Apr 2008, 1:17 PM
#1
shk avatar

shk

New Zenner

Join Date:
Oct 2006
Posts:
62
Plugin Contributions:
0

Extra charge for specific bulky items (table-weight module)

Im using the table shipping module, where "up to 3 kg" equals
say 10 dollars in shipping cost. This works fine.

However, any item wider than 120cm incurrs an additional
"bulky package" fee at the post office. Lets say 1 dollar.

What I would like to do is to identify these products and
make their shipping cost (weight) + 1 dollar.

Is there any way to do this? I did not find any suitable modules
in the download section, nor through searching the forum.

I suppose an clumsy way would be to just modify the weight
for those specific products, and I tried 20B as in 20 kg "bulky"
but obviously that did not work.

Any ideas? This dosn't seem too compex,
but Im not that well versed in the Zen architecture.

Sincerly
/SHK

8 Apr 2008, 2:45 PM
#2
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Extra charge for specific bulky items (table-weight module)

I had a similar challenge, and resolved it using ATTRIBUTES.

I created an attribute NAME called "Shipping Surcharge for Length"

I created an attribute VALUE called "Exceeds 100cm"

I applied the surcharge to this attribute value on the relevant products.

I made the attribute default, so that it would automatically apply to the product (ie: customer could not de-select it).

Not ideal... but a quick work-around.

9 Apr 2008, 9:18 AM
#3
shk avatar

shk

New Zenner

Join Date:
Oct 2006
Posts:
62
Plugin Contributions:
0

Re: Extra charge for specific bulky items (table-weight module)

Thanks! That's pretty clever, and would be a quick and dirty fix for my problem.

Do you know if there's any way to exclude products with certain attributes
from certain shipping modules? I'll search the forum for an answer to
this since your particular insight never came to me.
Hopefully there's an answer.

It would be perfect if I could add certain attributes such as "Wont fit in a envelope" added to a product,
being recognized by the envelope module and which will react by hiding itself.

Hopefully I can solve this myself.. if anyone has any further insight,
please do tell. I'll post my "findings" if indeed I would be so unfortunate
to be the first one to ask, though most certainly I will find that I am not =)

Again thanks, this was one of the last hurdles I had left.

Sincerly
/SHK

9 Apr 2008, 11:00 AM
#4
shk avatar

shk

New Zenner

Join Date:
Oct 2006
Posts:
62
Plugin Contributions:
0

Re: Extra charge for specific bulky items (table-weight module)

I've found a few hints while searching, but I've not been able to get it to work yet.

I found an suggestion to add an if-section with a master_categories_id filter.
This did not work, AFAIK. I checked the category id and came up with 33.
Replacing "17" with "33" did not disable the module.

 
// disable only when entire cart is free shipping 
      if (zen_get_shipping_enabled($this->code)) { 
          $this->enabled = ((MODULE_SHIPPING_ITEM_STATUS == 'True') ? true : false); 
      } 
      // disable for one master_categories_id 
      if ((IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('master_categories_id','17') > 0)) { 
          $this->enabled = false; 
      }  

I then tried to use "product_is_free" marker and see if that would trigger
the module into disable. It did not.

 
    // disable only when entire cart is free shipping
    if (zen_get_shipping_enabled($this->code)) {
      $this->enabled = ((MODULE_SHIPPING_BREV_STATUS == 'True') ? true : false);
    }
    // disable for one master_categories_id 
    if ((IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('product_is_free','1')) { 
      $this->enabled = false; 
    }  

Im pretty much stuck.
I don't know what Im doing wrong, but being able to just supply the
category_id or product_id in some similar fashion to the above
would obviously be my end all goal.

Anyone know how this is suposed to be written? I'v read and re-read
the threads that these suggestions came from.

Threads:
http://www.zen-cart.com/forum/showthread.php?t=91394&highlight=hide+shipping+module

http://www.zen-cart.com/forum/showthread.php?t=23675&highlight=in_cart_check

http://www.zen-cart.com/forum/showthread.php?t=56242&highlight=in_cart_check

Im grateful for any help I can get on this issue.

Sincerly
/SHK

9 Apr 2008, 11:23 AM
#5
shk avatar

shk

New Zenner

Join Date:
Oct 2006
Posts:
62
Plugin Contributions:
0

Re: Extra charge for specific bulky items (table-weight module)

I just realized that this code does indeed work if I just place it in my
envelope.php inside /includes/modules/shipping/ as opposed to
/includes/modules/shipping/MY_CUSTOM_TEMPLATE/

Oh well. this works perfectly now.
I just simply disable the envelope-shipping for categories with
big products. Whohoo.. =)