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

Need help with shipping

Locked

Views: 2,675

Results 21 to 28 of 28
This thread is locked. New replies are disabled.
25 Aug 2010, 9:45 PM
#21
paddy_uk2007 avatar

paddy_uk2007

New Zenner

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

Need help with shipping

Ajeh:

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;


Thanks for all your help this has now worked, and yes am using V1.38 as there are lots of mods i need that are currently not working on 1.39 

thanks again for all your help ;)
25 Aug 2010, 11:29 PM
#22
ajeh avatar

ajeh

Oba-san

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

Re: Need help with shipping

Thanks for the update that this is now working for you and, with your old, old, totally ancient v1.3.8, the additional code was able to work with the additional piece of code ... :cool:

15 Sep 2010, 7:38 PM
#23
cooljoe04 avatar

cooljoe04

New Zenner

Join Date:
Sep 2010
Location:
Lafayette, Indiana
Posts:
18
Plugin Contributions:
0

Re: Need help with shipping

I have read over this topic and have many mentions to the use of the product weigh as it relates to shipping; however, I have not seen an instance that looks quite like what I am trying to replicate. I am presuming that it will take some custom code, so if someone is able to point me in the right direction of what that code might be, I would greatly appreciate it.

I plan on putting the weight for all items into my ZC. I ship to the continental US only, and wish to only offer one shipping option at a time, based off of weight. As a general rule, I can cram several items into a USPS flat rate box and use it for most of my orders. This being said, I would like to see what the most weight of my product is that I can cram into one of these boxes, and then set the limit of USPS at this weight. From there, anything over that I would like to require to use UPS. I have set up both modules, and they are both displaying and quoting prices on the checkout page, but I would only like one of the two options to display at this point.

Specifically, it seems as though this page could have an IF statement put into it which says if weight >= #lbs of flat rate, display option 0 (USPS). If weight <#lbs of flat rate, display option 1 (UPS).

Am I thinking about this correctly? Would the syntax set up in this manner function correctly or would it give me problems somewhere else? (I figure it much better to ask before doing than do it and risk screwing up something.)

I am using ZC 1.3.9f

Thank you!
Joey Phillips

15 Sep 2010, 10:28 PM
#24
ajeh avatar

ajeh

Oba-san

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

Re: Need help with shipping

Let's say you did not want USPS to show if weight is > 5 ...

You can customize the module with:

    // disable only when entire cart is free shipping
    if (zen_get_shipping_enabled($this->code)) {
      $this->enabled = ((MODULE_SHIPPING_USPS_STATUS == 'True') ? true : false);
    }

// bof: do not show if weight > 5
    if (!IS_ADMIN_FLAG) {
      global $cart;
      if ($_SESSION['cart']->show_weight() > 5) {
        $this->enabled = false;
      }
    }
// eof: do not show if weight > 5

    if ($this->enabled) {

NOTE: this is not taking into account the Tare Rate if you are using it ...

15 Sep 2010, 11:26 PM
#25
cooljoe04 avatar

cooljoe04

New Zenner

Join Date:
Sep 2010
Location:
Lafayette, Indiana
Posts:
18
Plugin Contributions:
0

Re: Need help with shipping

Thank you Linda, you are a Zen Shipping Queen!

If anyone else is interested in this, being able to designate a shipper based off of cart weight, I added this code to USPS.php in catalog\includes\modules\shipping.

Alternately, I added the same code, changing it from weight > 5 to weight <= to 5 to UPS.php under catalog\includes\modules\shipping.

Works like a champ, added a product I said weighed 3lbs to my cart, proceeded to checkout and it displays USPS as only option. Went back to my cart, changed quantity to 2 of the 3lb item, updated cart and went back to checkout, now with 6lbs of items shipping the only option is UPS. Now I just need to see what the maximum weight of my products I can get crammed into a large flat rate box is and update weights accordingly.

Thank you again Linda!:cheers:
Joey Phillips

Ajeh:

Let's say you did not want USPS to show if weight is > 5 ...

You can customize the module with:

// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
  $this->enabled = ((MODULE_SHIPPING_USPS_STATUS == 'True') ? true : false);
}

// bof: do not show if weight > 5
if (!IS_ADMIN_FLAG) {
global $cart;
if ($_SESSION['cart']->show_weight() > 5) {
$this->enabled = false;
}
}
// eof: do not show if weight > 5

if ($this->enabled) {
> 
> NOTE: this is not taking into account the Tare Rate if you are using it ...
15 Sep 2010, 11:30 PM
#26
ajeh avatar

ajeh

Oba-san

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

Re: Need help with shipping

You are most welcome ... thanks for the update that this worked for you and for some of the details on how you used it ... :smile:

17 Sep 2010, 2:42 AM
#27
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Need help with shipping

Hi I have a quick question. How can issue free shipping to certain customers. Is there an add on for this. Thank You in advance.

17 Sep 2010, 3:46 AM
#28
ajeh avatar

ajeh

Oba-san

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

Re: Need help with shipping

How about a Discount Coupon for Free Shipping? :unsure: