Login
Register

VirtueMart

WooCommerce

Others

Docs

Support

Blog

About

Forum

IMPORTANT ANNOUNCEMENT: Plugin development ceased, all plugins made available freely (GPL)

With great sadness we have to announce that we are ceasing development of all our VirtueMart, WooCommerce and Joomla plugins. Effective immediately, all our plugins -- even those that were paid downloads -- are made available for free from our homepage (GPL license still applies), but we cannot and will not provide any support anymore.

It has been a great pleasure to be part of the thriving development communities of VirtueMart as well as WooCommerce. However, during the last year it became painstakingly clear that in addition to a full-time job, a young family and several other time-consuming hobbies at professional level (like being a professional singer) the plugin development and the support that it requires is not sustainable and is taking its toll. It has been an honor, but it is now time to say good bye!

×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Number of items, but some items are free shipping 25 Sep 2014 23:41 #1

  • filing
  • filing's Avatar Topic Author
Hi,

I'm trying to wrap my head around a problem. I'm using the free version of the plugin. (Happy to buy the advanced version if that helps solve my question below)

Some background.
1. The store has 4 different shipping options.

a) USA shipping: $5 for first item, each subsequent item $2.50. 1 promo item is added as free item if cart value exceeds a certain amount ($150), and this item has 0 shipping cost. If cart value exceeds a certain other amount ($100) shipping is free. Gift Cards, no shipping cost of course.
The setup is (shortened)
Name=Free shipping above $100; 100<= Amount; 0
weight<=0.1; 0 (note: This is used for the Gift Cards and free item, so they always have free shipping)
weight<=1; Shipping=5
weight<=2; 7.5
weight<=3; 10

International shipping: Same setup, except first item is $15, each subsequent item $7.50. Certain items cost $25 per item. No free shipping. Free item is added when the cart value reaches a certain amount ($150), and this item has free shipping.
The solution is (shortened):
weight<=0.1; 0.0 (note: This is used for the Gift Cards and free item, so they always have free shipping)
weight==1; Shipping=15
weight==2; 22.5
weight==3; 30
weight==1000; 25
weight==1001; 32.5
weight==1002; 40
weight==2000; 50
weight==2001; 57.5
weight==2002; 65

Other shipping options.
b) UPS shipping by weight.
c) USPS shipping by weight.
d) FedEx shipping by weight.


Right now the store is setup with mock/fake item weights (as you probably guessed seeing the code), so the option "a" has been solved, when it is the only shipping option.
But now, 3 other shipping options needs to be enabled, which calculate shipping by weight and this will cause problems. Now the correct item weights have to be added, which breaks the option "a" solution.

My question is this.
How can I keep the shipping options/costs as described in "a" while adding real weights to the store items?
I'm guessing the "articles" option brings me partway, but that leaves a problem with Gift Cards and the free item, which should be free shipping. Any ideas?

Thanks a lot.

Number of items, but some items are free shipping 02 Oct 2014 18:03 #2

Hi,
I'm afraid the main obstacle to your problem is that our plugin does NOT calculate shipping based on costs per individual item in the order. As you correctly observe, the Articles variable will include the gift cards and other free-shipping items. And there is no direct way to detect how many gift cards and other free-shipping items are in the cart.

Your workaround of using dummy Weight values to indicate certain types of products might work as long as you have only one article in the cart (with any quantity). As soon as your customer adds two different articles with different shipping costs per article.

If all your articles are either free shipping or have the same cost (in particular, if in your setup, only the very first item in the cart is 5$ and all subsequent articles, whether the same as the first or different, are 2.5$), then you approach works.

As you need the correct weights assigned to the products for the UPS/USPS/FedEx shipping methods, you have to use any other variable that is the sum of individual product characteristics. Possible variables for this are
- TotalLenght
- TotalHeight
- TotalWidth
- or TotalPackaging.
Using any of these should behave exactly as the Weight does.

Best regards,
Reinhold
  • Page:
  • 1