Welcome, Guest. Please login or register.
Login with username, password and session length


Need help or want to talk to other developers? Join the VirtueMart Chat! Read more...

  Advanced search

247031 Posts in 67504 Topics- by 258313 Members - Latest Member: Matej.iStraxx
Pages: [1] 2 3 ... 29   Go Down
Print
Author Topic: USPS v5 - Bundled and Unbundled shipping  (Read 368645 times)
lowmips
Global Moderator
Hero Member
*
Posts: 1134


WWW
« on: October 11, 2008, 20:08:08 pm »

Hi all,
My online shop needed to calculate the shipping cost for certain items seperately, as those items ship in their own box.  The current implementations of the USPS module were returning incorrect quotes as they were assuming all items were shipped together.  So, I rewrote the USPSv4.0 module to include this functionality.  My new module adds a new attribute to your product, which designates whether or not the product ships alone, or can be bundled with other products in your cart.  At checkout, all "bundled" items weight are combined, and that rate is queried from USPS.  Then, each "unbundled" item is queried.  All queries are then added together for a final shipping price.

I have attached the installation archive to this post.   Please view the README.txt for installation instructions.

If you come across any bugs, please post them here. I have subscribed to this topic. I have added this functionality to the UPS shipping module as well.  Please see this post for details.

Thank you,
Reggie


Show shipping estimates before the user checks out! Download plgSystemCartRates-USPSv5.zip


Versions


vm114-USPSv5.2010.04.05 (discontinued)
- Built for VirtueMart 1.1.4
- uses v3 API, and will cease to work come April, 2011


vm11x-USPSv5.2011.02.09-BASIC
- Adheres to 'drop in' concept of VirtueMart shipping modules, should work with any recent version of VirtueMart
- Supports latest v4 domestic and v2 international USPS API (IMPORTANT! The old v3 is being phased out.)
- Domestic/International handling fees
- allows for upcharging each service type
- mod_virtuemart_currencies support
- works with the "Cart Rates" plugin
- should work with any version of VM from 1.1.x+


vm117-USPSv5.2011.02.10
- v4 Domestic and v2 Inernational API support (IMPORTANT! The old v3 is being phased out.)
- Bundled/Unbundled products support
- Domestic/International handling fees
- allows for upcharging each service type
- mod_virtuemart_currencies support
- works with the "Cart Rates" plugin
- Package Dimension declaration
- GXG support
- built for VirtueMart 1.1.7
- Not yet publicly released, copies available for donation


vm118-USPSv5.2011.03.25
- all the features of the previous version, but ported to VirtueMart 1.1.8
- Not yet publicly released, copies available for donation



Updates

Updates 2011/03/02:
- Bugfix for both versions, typo prevented all services from being shown in configuration

Updates 2011/03/02:
- version 5.2011.02.09-BASIC publicly released. Thank you to all the wonderful donators!

Updates 2011/01/02:
- updated uspsv5 module and cart-rates plugin to accept new service names (with html entities)


* vm1.1.x-USPSv5.2011-02-09-BASIC.zip (21.32 KB - downloaded 114 times.)
« Last Edit: April 24, 2010, 23:27:58 pm by lowmips » Logged

Visit my website at www.lowmips.com
View my newsletters Here (sign up for newsletters on the front page of my website)
koaweb
Newbie
*
Posts: 20


« Reply #1 on: October 14, 2008, 10:10:51 am »

Hi Reggie,
Thanks for making this mod available. It seems like the product.product_form file breaks the page from the VM template and won't open correctly. Only the first few fields of the Product Information tab shows up.

Im using VM 1.1.1 and J! 1.0.15

Looking forward to using this, I hope you are able to replicate and fix it.

Thanks again.

Logged
lowmips
Global Moderator
Hero Member
*
Posts: 1134


WWW
« Reply #2 on: October 14, 2008, 14:13:53 pm »

Koaweb,
I wrote and tested this on Joomla 1.5.x and VM 1.1.x.  All I did in that specific file was add a new column with a checkbox.  Are there any error messages displayed in your browser? What browser are you using?  Could you do a "print source" on the webpage and copy the results to a file and upload them to this thread?

Thanks,
Reggie
« Last Edit: October 14, 2008, 23:29:45 pm by lowmips » Logged

Visit my website at www.lowmips.com
View my newsletters Here (sign up for newsletters on the front page of my website)
koaweb
Newbie
*
Posts: 20


« Reply #3 on: October 17, 2008, 11:03:05 am »

The page did not show any on screen error messages and my browser is FF 2.0.0.17

Theres quite a bit missing from the source code when using the Simple Layout. When viewing it in Extended Layout the CSS does not break but it still does not load beyond "Manufacturer" field on the Product Information page.

I am not able to post the source code because it goes over the char. limit for the forum. I will PM it to you if I can.

Thanks again for looking into it.

« Last Edit: October 17, 2008, 11:36:54 am by koaweb » Logged
lowmips
Global Moderator
Hero Member
*
Posts: 1134


WWW
« Reply #4 on: October 21, 2008, 22:37:03 pm »

Hi all,
Koaweb and I have done some preliminary debugging of his issue and we have decided it is most likely a Joomla version issue, but have no hard evidence.  I currently do not have a Joomla 1.0.x installation to debug the issue on.  I have successfully tested this module on Joomla version 1.5.x, so please keep this in mind if you decide to use it.  If anyone else uses Joomla 1.0.x and does or does not see this same issue please let me know so I can confirm that it is/is not a versioning issue.

Thanks,
Reggie
Logged

Visit my website at www.lowmips.com
View my newsletters Here (sign up for newsletters on the front page of my website)
lowmips
Global Moderator
Hero Member
*
Posts: 1134


WWW
« Reply #5 on: October 21, 2008, 23:28:13 pm »

Hi all,
I added this functionality to the UPS shipping module. See this post for details.

Reggie
Logged

Visit my website at www.lowmips.com
View my newsletters Here (sign up for newsletters on the front page of my website)
kumar16
Newbie
*
Posts: 14


« Reply #6 on: November 03, 2008, 19:16:47 pm »

I installed this module and got my USPS account activated. I dont see anything when it comes to select a shipping method. I am unable to go to the payment without selecting the shipping method, which just appears blank. Any ideas? Thanks.
Logged
lowmips
Global Moderator
Hero Member
*
Posts: 1134


WWW
« Reply #7 on: November 03, 2008, 20:57:20 pm »

Have you enabled the USPSv5 module under VirtueMart?
Administration->Admin->Configuration->Shipping->The USPS Shipping v5.0. Supports bundled and unbundled shipments.

Have you enabled the appropriate shipping types under the USPSv5.0 configuration?
Administration->Store->Shipping Module List->(USPSv5.0) Configure Ship Method->Domestic/International shipping options


Hope this helps,
Reggie
Logged

Visit my website at www.lowmips.com
View my newsletters Here (sign up for newsletters on the front page of my website)
kumar16
Newbie
*
Posts: 14


« Reply #8 on: November 03, 2008, 21:51:31 pm »

Hey lowmips,

I did. I think i figured out what the problem was, the product attribute weight was not set. Once i did that, its working now. I ran into another serious problem where i am unable to change the attribute of existing products, but that is not related to this and i hope someone helps me out with that soon. Thanks for this wonderful module!
« Last Edit: November 03, 2008, 23:09:24 pm by kumar16 » Logged
lowmips
Global Moderator
Hero Member
*
Posts: 1134


WWW
« Reply #9 on: November 03, 2008, 23:06:32 pm »

here's why (this was in the original code as well, just in a different way):

// don't process shipments with no weight. we either have digital downloads, or an empty cart
$order_weight = $d['weight'];
if($order_weight <= 0) {
   return true;   
}


I think I'll add in some debug code that shows the order weight is zero.
=)
« Last Edit: November 03, 2008, 23:11:56 pm by lowmips » Logged

Visit my website at www.lowmips.com
View my newsletters Here (sign up for newsletters on the front page of my website)
lowmips
Global Moderator
Hero Member
*
Posts: 1134


WWW
« Reply #10 on: November 06, 2008, 21:09:53 pm »

Updated to remove typo introduced in last update...
Updated ps_product to do validation check on ship_alone variable.
Updated uspsv5.php to check each shipment individually against the 70lb max weight limit, instead of the combined weight of all shipments (the original way)
« Last Edit: November 07, 2008, 02:25:48 am by lowmips » Logged

Visit my website at www.lowmips.com
View my newsletters Here (sign up for newsletters on the front page of my website)
lowmips
Global Moderator
Hero Member
*
Posts: 1134


WWW
« Reply #11 on: November 14, 2008, 17:29:21 pm »

Updates 2008/11/14:
BUG NOTICE
I've found a bug where shipments with large numbers of unbundled items will cause the rate request to fail.  This is due to the XML query surpassing the maximum string length allowed in PHP.  I noticed this bug when testing my other module, UPSv2.0 with large shipments that contained around 40 individual packages.  I do not know the exact number of individual packages that will cause this failure.

Over the next week or so I will be modifying the USPSv5.0 module to include much of the new functionality I've put into the UPSv2.0 module, which will include a bugfix for this.

-Reggie
Logged

Visit my website at www.lowmips.com
View my newsletters Here (sign up for newsletters on the front page of my website)
Gaelen Hudson
Newbie
*
Posts: 6


« Reply #12 on: December 01, 2008, 21:45:16 pm »

I'v got the module installed, enabled, and configured.  However it still does not show up during checkout as an option. Just downloaded and installed today.

Using Joomla! 1.5.8 and VM 1.1.2
Logged
lowmips
Global Moderator
Hero Member
*
Posts: 1134


WWW
« Reply #13 on: December 01, 2008, 22:10:13 pm »

Put your website in debug mode, make note of the XML post and replies.

-Reggie
Logged

Visit my website at www.lowmips.com
View my newsletters Here (sign up for newsletters on the front page of my website)
Gaelen Hudson
Newbie
*
Posts: 6


« Reply #14 on: December 02, 2008, 00:54:34 am »

Good call.  When it gets to the shipping selection phase of checkout it loads the standard module then says:

Debug: Starting Shipping module: uspsv5

Debug: The order total weight is zero. Exiting USPSv5.0.

This store does not do weight based shipping. Does this mean we will not be able to use the module unles we specify a weight for each item?  We have clos to 300 products and use flat rate boxes and would rather not have to go back to put in a weight for each item.
Logged
Pages: [1] 2 3 ... 29   Go Up
Print
Jump to: