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

Need help with shipping

Views: 3,630

Results 1 to 20 of 33
5 Oct 2015, 5:26 PM
#1
miru avatar

miru

New Zenner

Join Date:
Oct 2015
Posts:
30
Plugin Contributions:
0

Need help with shipping

Hello~

I'm re-creating my store with Zen Cart and I have small issue with shipping costs. I'm not very good at English, but I try my best.

My store has lot of small items that are very light (30-100 g), but they are so big that I need to get special service from Post to send them. I would need module that would allow me to choose whatever item is small or big and after that calculate the shipping cost based on the weight of the item.

If there is small + big items at shopping cart it would automatically count the whole order as big item.

Example of shipping costs:
Small items
50 g = 1 $
100 g = 2 $
250 g = 6 $

Big items
50 g = 4 $
100 g = 4,5 $
500 g = 8 $

etc.

I really hope that some one could help me with this!

5 Oct 2015, 7:56 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Need help with shipping

How are your sized items arranged? (For example, are all of your big items in a particular category?) There are several ways to look at this. All small items only in a particular category, all large items in a category or not in a category, by manufacturer, etc... The goal being to identify a particular trait that when an item from that grouping is in the cart then the applicable shipping method is used.

5 Oct 2015, 8:44 PM
#3
miru avatar

miru

New Zenner

Join Date:
Oct 2015
Posts:
30
Plugin Contributions:
0

Re: Need help with shipping

mc12345678:

How are your sized items arranged? (For example, are all of your big items in a particular category?) There are several ways to look at this. All small items only in a particular category, all large items in a category or not in a category, by manufacturer, etc... The goal being to identify a particular trait that when an item from that grouping is in the cart then the applicable shipping method is used.

They are not arranged like that. There is big and small items in all categories... There is also lot of manufacturers and even amongs them there is small and big items. Honestly, I don't think there is one trait that I could pick for different size items.

I was hoping that there would be module like this I could have added. For some reason this one didn't work at my site.

I don't mind if I have to go through all items and mark them big or small one by one.

5 Oct 2015, 8:45 PM
#4
cosmosk avatar

cosmosk

Zen Follower

Join Date:
Jan 2015
Posts:
193
Plugin Contributions:
0

Re: Need help with shipping

I'm fairly new, and what I have done to keep things simple, is base everything off weight. My items weight is just a number for me to use in a calculation. The calculation was weird at first. I think I had to change this:

Package Tare Small to Medium - added percentage:weight 0:3

I think I set this to be 0:0 and the calculations came out right.

5 Oct 2015, 8:55 PM
#5
miru avatar

miru

New Zenner

Join Date:
Oct 2015
Posts:
30
Plugin Contributions:
0

Re: Need help with shipping

^The trouble is that the difference between shipping cost can be 1-4 dollars if items weights 50 grams. :/
I can't just quess which one it will be as items are rather cheap.

6 Oct 2015, 1:18 AM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Need help with shipping

Miru:

They are not arranged like that. There is big and small items in all categories... There is also lot of manufacturers and even amongs them there is small and big items. Honestly, I don't think there is one trait that I could pick for different size items.

I was hoping that there would be module like this I could have added. For some reason this one didn't work at my site.

I don't mind if I have to go through all items and mark them big or small one by one.

So there are ways to put items in a category to then link them to some other category. As to the above plugin, I haven't used it, but it appears that the requirements to install include file merging (which means can't just upload the files for it to work). When you say "it didn't work" more information is needed in order to offer suggestions on a way forward...

6 Oct 2015, 1:20 PM
#7
miru avatar

miru

New Zenner

Join Date:
Oct 2015
Posts:
30
Plugin Contributions:
0

Re: Need help with shipping

According to my friend there was no tare group that could have been modified at taxes/area menu.

6 Oct 2015, 9:35 PM
#8
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Need help with shipping

Miru:

According to my friend there was no tare group that could have been modified at taxes/area menu.

Well, not having used the plugin, I'm not sure how that all plays into it. I don't see a specific forum on the program, but maybe either of the two that have worked on it could help if you reached out by PM. Perhaps with some more searching a thread or two would pop up about it, but beyond that I don't see what other way(s) to help on making the plugin functional for your store without going through the process of installation myself.

As to other options related to the issue at hand, either an additional plugin could be installed (numinix additional products fields for example) that would offer a toggle switch that could be used as a "big/small" item indicator and then you would want to clone one of the shipping modules that offer shipping by weight such that if no big items in the cart, then the small shipping module is active and the big is inactive, and vice versa perhaps...

19 Oct 2015, 2:45 PM
#9
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Location:
Wisconsin, USA
Posts:
674
Plugin Contributions:
12

Re: Need help with shipping

Miru:

According to my friend there was no tare group that could have been modified at taxes/area menu.

What are the configuration values set at?

19 Oct 2015, 2:55 PM
#10
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Location:
Wisconsin, USA
Posts:
674
Plugin Contributions:
12

Re: Need help with shipping

mc12345678:

Well, not having used the plugin, I'm not sure how that all plays into it. I don't see a specific forum on the program, but maybe either of the two that have worked on it could help if you reached out by PM. Perhaps with some more searching a thread or two would pop up about it, but beyond that I don't see what other way(s) to help on making the plugin functional for your store without going through the process of installation myself.

As to other options related to the issue at hand, either an additional plugin could be installed (numinix additional products fields for example) that would offer a toggle switch that could be used as a "big/small" item indicator and then you would want to clone one of the shipping modules that offer shipping by weight such that if no big items in the cart, then the small shipping module is active and the big is inactive, and vice versa perhaps...

Fairly simple it uses an observer:

    $zco_notifier->attach($this, array('NOTIFY_SHIPPING_MODULE_PRE_CALCULATE_BOXES_AND_TARE','NOTIFY_SHIPPING_MODULE_CALCULATE_BOXES_AND_TARE'));

then it takes the product's weight and adds the tare value for that group.

Example:

Group 1: has a tare weight of 1.5
Group 2: has a tare weight of 2

Widget: Weighs 2.2
Whatsit: Weights 1.8

So if you have:
2 Wigets and 3 Whatsits.

Detailed Math:
2(Wiget) + 3 (Whatsit)
2(1.5 + 2.2) + 3(2+1.8)
2(3.7) + 3(3.8)
7.4 + 11.4

the Weight would be: 18.8

then:

$shipping_weight = 18.8

Hopefully that makes it slightly more clear

20 Oct 2015, 8:21 PM
#11
miru avatar

miru

New Zenner

Join Date:
Oct 2015
Posts:
30
Plugin Contributions:
0

Re: Need help with shipping

bislewl:

What are the configuration values set at?
Sorry, I really don't understand the question. Can you be more specific?

21 Oct 2015, 2:38 PM
#12
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Location:
Wisconsin, USA
Posts:
674
Plugin Contributions:
12

Re: Need help with shipping

Miru:

Sorry, I really don't understand the question. Can you be more specific?

In the admin:
Configuration -> Product Tare Groups

21 Oct 2015, 9:48 PM
#13
miru avatar

miru

New Zenner

Join Date:
Oct 2015
Posts:
30
Plugin Contributions:
0

Re: Need help with shipping

The file was empty, it couldn't been opened.

21 Oct 2015, 10:55 PM
#14
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: Need help with shipping

This is the only "Need Help With Shipping" thread that is not closed.

Sorry if this is off the topic of the original post...but as usual, I can't find the place to start a new thread.

I've searched and read several threads related to "multiple ship origin zip codes", "shipping help", "dropship shipping", etc. None of the threads I've ran across in the last couple of days have a usable answer.

I have multiple ship origin zip codes for my products (114,000) but Zencart only has one location for shipping ORIGIN zip code...which is set in admin/configuration/shipping/packing/postal code.

I need to replace the admin ship origin zip code with each products unique ship origin zip code just before it is evaluated for UPS shipping cost. I believe(hope) that is the only change I need to make in order to get accurate shipping cost for each product.

I've added a column to my products table, "ship_zip" for each product but I need a way to plug that zip code into shipping cost evaluation process.

I have studied the ups.php module in depth and I know (think) I need to change the configuration table just before line 148:

$this->_upsOrigin(SHIPPING_ORIGIN_ZIP, $country_name['countries_iso_code_2']);

with a simple query like:

[B]$products_ship_zip[/B] = $db->query("SELECT ship_zip FROM products WHERE products_id = PRODUCT BEING EVALUATED FOR SHIPPING");

$query = ("UPDATE $configuration
SET $configuration.`configuration_value` = [B]'$products_ship_zip'[/B]
WHERE $configuration.`configuration_key` = 'SHIPPING_ORIGIN_ZIP' ");
$stmt = $db->prepare($query);
$stmt->execute();

What variable is represents the products_id during the shipping cost evaluation process?

I've tried echo testing the ups.php module but can not put my finger on the products_id variable.

Does the ups.php module evaluate shipping cost a product at a time or in bulk? I'm assuming one at at time.

Should I be setting the $products_ship_zip and changing the configuration in a different file?

Thanks in advance for any help anyone can provide.

21 Oct 2015, 11:04 PM
#15
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Location:
Wisconsin, USA
Posts:
674
Plugin Contributions:
12

Re: Need help with shipping

Miru:

The file was empty, it couldn't been opened.

When you login to your admin and go to Configuration -> Product Tare Groups

If it's empty trying running the uninstall.sql, and it will re-install

21 Oct 2015, 11:07 PM
#16
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Location:
Wisconsin, USA
Posts:
674
Plugin Contributions:
12

Re: Need help with shipping

mikeel100:

This is the only "Need Help With Shipping" thread that is not closed.

Sorry if this is off the topic of the original post...but as usual, I can't find the place to start a new thread.

I've searched and read several threads related to "multiple ship origin zip codes", "shipping help", "dropship shipping", etc. None of the threads I've ran across in the last couple of days have a usable answer.

I have multiple ship origin zip codes for my products (114,000) but Zencart only has one location for shipping ORIGIN zip code...which is set in admin/configuration/shipping/packing/postal code.

I need to replace the admin ship origin zip code with each products unique ship origin zip code just before it is evaluated for UPS shipping cost. I believe(hope) that is the only change I need to make in order to get accurate shipping cost for each product.

I've added a column to my products table, "ship_zip" for each product but I need a way to plug that zip code into shipping cost evaluation process.

I have studied the ups.php module in depth and I know (think) I need to change the configuration table just before line 148:

$this->_upsOrigin(SHIPPING_ORIGIN_ZIP, $country_name['countries_iso_code_2']);

> 
> with a simple query like:
> 
> ```php
[B]$products_ship_zip[/B] = $db->query("SELECT ship_zip FROM products WHERE products_id = PRODUCT BEING EVALUATED FOR SHIPPING");

$query = ("UPDATE $configuration
SET $configuration.`configuration_value` = [B]'$products_ship_zip'[/B]
WHERE $configuration.`configuration_key` = 'SHIPPING_ORIGIN_ZIP' ");
$stmt = $db->prepare($query);
$stmt->execute();

What variable is represents the products_id during the shipping cost evaluation process?

I've tried echo testing the ups.php module but can not put my finger on the products_id variable.

Does the ups.php module evaluate shipping cost a product at a time or in bulk? I'm assuming one at at time.

Should I be setting the $products_ship_zip and changing the configuration in a different file?

Thanks in advance for any help anyone can provide.

If the understanding of your question is correct you want to vary the origin zip code based on the zip-code it comes from?

21 Oct 2015, 11:56 PM
#17
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: Need help with shipping

Yes, that is correct. Thanks for the quick reply.

I think I have found the variable ($prid) that represents the product_id of the product being evaluated for shipping:)

I'm getting ready to plug in my code above using this variable to change the ship origin in admin and see if this changes the ship origin to the product I am testing with.

I'll post results here.

22 Oct 2015, 12:04 AM
#18
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Location:
Wisconsin, USA
Posts:
674
Plugin Contributions:
12

Re: Need help with shipping

mikeel100:

Yes, that is correct. Thanks for the quick reply.

I think I have found the variable ($prid) that represents the product_id of the product being evaluated for shipping:)

I'm getting ready to plug in my code above using this variable to change the ship origin in admin and see if this changes the ship origin to the product I am testing with.

I'll post results here.

The problem is if someone orders 2 products, then which zipcode should it use.

There is a shipping module out there that would do what your looking for, however it is no longer being sold/supported because of an issue with the licensing and the family.

If I were to do this, I would some how "hack" together a way to group the products from each zipcode and then cycle through the UPS module.

22 Oct 2015, 2:28 AM
#19
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: Need help with shipping

Around line 653 of /includes/classes/shopping_cart.php...

// products price - MIKE ADDED ship_zip
$product_query = "select products_id, products_price, products_tax_class_id, products_weight,
products_priced_by_attribute, product_is_always_free_shipping, products_discount_type,
products_discount_type_from,
products_virtual, products_model, ship_zip
from " . TABLE_PRODUCTS . "
where products_id = '" . (int)$products_id . "'";

      if ($product = $db->Execute($product_query)) {
        $prid = $product->fields['products_id'];
        $products_tax = zen_get_tax_rate($product->fields['products_tax_class_id']);
        $products_price = $product->fields['products_price'];

/*MIKE ADDED TO CHANGE SHIP ORIGIN FOR EACH PRODUCT*/		
$ship_zip = $product->fields['ship_zip'];
//echo $ship_zip." SHIP FROM ZIP";
$db->Execute("update " . TABLE_CONFIGURATION . " 
SET `configuration_value` = '$ship_zip'
WHERE `configuration_key` = 'SHIPPING_ORIGIN_ZIP' ");
/*END MIKE ADDED*/		

Echo testing showed the correct origin zip for each of the 3 products in the customers shopping cart...whether it processed the shipping module one product at a time is still fuzzy.

The code does update admin with the correct ship origin on single product testing...but, again, I'm not sure how the shipping is calculated. One product at a time or in bulk???

For now, it is better than playing roulette on my orders.

If someone could point out the pros and cons of this method, I would appreciate it.

22 Oct 2015, 2:39 AM
#20
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: Need help with shipping

So, the remaining question I have is:

Do products enter the ups.php one at a time or in bulk?

Thanks.