VirtueMart Forum

VirtueMart 1.1.x [ Old version - no longer supported ] => Shipping VM 1.1 => UPS VM 1 => Topic started by: lowmips on October 21, 2008, 23:25:34 pm

Title: UPS v2.0 (multiple functionality additions)
Post by: lowmips on October 21, 2008, 23:25:34 pm
Hi all,
My father's online shop needed more functionality than the UPS v1.0 module provides, so I rewrote the module and called it UPSv2.0.  I've added numerous features as requested by other users, and have posted the updates here for the community to use.  There are several version of the code, for different reasons.  Below is a list of the features and requirements for each.

PLEASE NOTE! This module does far more than the specifications for a shipping module state it should do.  It is NOT a simple drop-in module.  I have re-written some of the specifications in order to add enhanced functionality.  This means that future VirtueMart updates may break this code! Proceed with caution when updating VM!

Here's a good post on how to get your developer access key (http://forum.virtuemart.net/index.php?topic=66867.0)

Thank you,
Reggie


Want to show your shipping rates before checkout? Download my  plugin now! (http://www.lowmips.com/joomla/index.php?option=com_phocadownload&view=category&id=4:upsv2&Itemid=18[/url)



Versions


vm11x-upsv2.2011.07.20-BASIC.zip
Requires VirtueMart 1.1.x
REQUIRES PHP v5.0 or higher!

Features:
- Simple rate shopping module with no core hacks
- Safe to install alongside any of my other modules


vm117-upsv2.2011.02.11.zip
Requires VirtueMart 1.1.7
REQUIRES PHP v5.0 or higher!

Features:
- allows for bundled and unbundled items.
- allows for shipments greater than 70lbs (fixed original XML)
- split package types into international and domestic
- customized shipping price discounts per product
- shipping insurance per product
- option to skip handling fees on free shipping items
- option to allow only certain number of a product in any package
- allows for optional "Free Shipping" image to be displayed on product flypage for products who have a shipping modifier of zero.
- allows for restriction of "Free Shipping" to only basic ground services
- allows for restricting products from being shipped to any location using country/state associations
- added option to have free shipping on orders over a certain amount
- added option to skip Pickup Type declaration (workaround for UPS Error Code: 111370, Error Description: Unsupported Pickup Type)
- very basic support for declaring L/W/H for large packages
- option to flag products as HAZMAT, add additional shipping charges, and show a HAZMAT image on the product flypage
- additional handling fee options. 2 handling fees allowed.
- freight shipping option. ignore freight items during shipping calculations, show notices and images in various locations.
- option to query shipping rates using manufacturer's address
- option to offer an "additional service" when displaying shipping rate choices
- added option to charge flat fee per product, ignoring actual UPS rate
- added option to skip handling fees on packages with only flat-fee items
- option to give free shipping per product type based on quantity
- option to charge tax only to in-state users
- option to charge different tax for products which ship from manufacturer (drop shipper)
- option to restrict products to ground shipping services
- mod_virtuemart_currencies support
- shipping tax system mirroring product tax.  You may now charge shipping tax based on vendor address, shipping address, or EU mode
- basic 'after the fact' tracking number support
- per-product shipping service restriction mechanism
- UPS Negotiated Rates support
- Option to use "Declared Value" for rate queries
- Option to override default declared value (product price) with user-defined price
- Option to trigger free shipping per product, based on other products in the cart


vm118-upsv2.2011.04.19.zip
Requires VirtueMart 1.1.8
REQUIRES PHP v5.0 or higher!

Features:
- All the features of the previous version, ported to VM1.1.8


vm119-lowmips.2011.08.22
Requires VirtueMart 1.1.9
REQUIRES PHP v5.0 or higher!

- includes vm118-upsv2.2011.04.19
- ported to VirtueMart 1.1.9
- download from my website


[attachment cleanup by admin]
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: lowmips on November 03, 2008, 23:18:51 pm
Updated to add debug notice for zero weight orders.
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: lowmips on November 06, 2008, 21:07:59 pm
Updated to fix typo introduced in last update...
Updated ps_product to validate ship_alone variable
Updated upsv2.php to check each shipment individually against the 150lb max weight limit, instead of the combined weight of all shipments (the original way)
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: opwdecks on November 07, 2008, 18:15:36 pm
I downloaded today and installed all the files. What do you mean in the installation:

"add a new field called 'ship_alone' to the 'jos_vm_product' table.  See upsv2.sql for SQL query."
   
How would I do this?

Thanks
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: lowmips on November 07, 2008, 18:38:21 pm
Hi opwdecks,
You'll need to either manually create that new field in your MySQL database under the table jos_vm_product(easy to do from phpMyAdmin), or run the SQL script I supplied to automate it a bit (also in phpMyAdmin).


-Reggie
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: opwdecks on November 07, 2008, 19:35:08 pm
Thank you very much!
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: rinny on November 07, 2008, 20:20:42 pm
Ok Reggie, Mike and I gave it a good run-through.

Good note:  It is now calculating shipping +150 LBS (breaking my large "ships separately" boxes down into individual queries to the UPS server) which is definitely what this module needs to be useful whatsoever. (Thanks again for even thinking of and creating this!)

Bad note:  Shipping was thrown off again, even for orders less than 150 lbs.  A 52 lb. case should be 17.36, but is showing as 13.01.  Going to revert back to how we had it previously until we can create a fix.
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: lowmips on November 07, 2008, 20:34:39 pm
That's odd. Did you try it with recent values? I know our shipping costs have come down greatly due to oil prices lowering.  Do you get the correct amount if you go to UPS.com and manually enter it?

-Reggie
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: rinny on November 07, 2008, 20:51:36 pm
Actually, I was looking at the 2008 rate chart, which is wrong.  A 44 lb. box according to the rate chart is 15.96, but according to Calculate Time & Cost it's 17.28.  The module is outputting 13.01. :(
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: lowmips on November 07, 2008, 21:11:33 pm
I'll need more info to help.
Real world shipping weights, dimensions, source+dest zipcodes, service types, and prices would be good.

thanks,
Reggie
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: lowmips on November 10, 2008, 03:31:55 am
Updates: 2008/11/09:
-Split package type into domestic and international options.
-Updated UPS XML Rate return parsing code to support packages larger than 70lbs. 

KNOWN BUG: I have uploaded this version as UPSv2.0_2008-11-09.zip because of a bug I have not worked out yet. On the configuration page, the "UPS Worldwide Expedited SM" option will toggle off and on for no apparent reason, and the config file remains unchanged reguardless of the setting.  If you depend on this service please do not use this version! All other services seem to function correctly.  If anyone has an idea as to why this is happening, please let me know! It's driving me bananas!
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: quickturn on November 11, 2008, 06:34:37 am
Hi there - I can't seem to make changes to my product after installing this. Do I need to change permissions somehow? I try to change the weight, units in box, etc. and it keeps reverting back.

Also, I'm getting the following error:

Error: UPS was not able to process the Shipping Rate Request.. Error Code: 110003, Error Description: Maximum number of packages exceeded (50)

But the total weight in the cart is only 30lbs.
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: lowmips on November 11, 2008, 13:39:50 pm
Hi quickturn,
Which version of the UPS2.0 module are you using? How about Joomla/VM? Also,
did you really have more than 50 items in the cart?

-Reggie
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: quickturn on November 11, 2008, 14:48:45 pm
Hello - Joomla 1.5, VM 1.1, vm_ups_v2.0_2008-11-09

Also, we are selling bulk flash drives so the average order should have more than 50 pieces. But a box of 10 only weighs a couple pounds.
Thanks!

www.quickturnflash.com
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: lowmips on November 11, 2008, 15:07:56 pm
The inability to change product details is very odd. I just checked again on my site to be sure, and I'm having no problems.  Do you have any other custom code running?

As for the 50 seperate packages, that is a UPS XML request restriction and is not supported in any current UPS shipping module that I know of.  I can add it to my list of things to do, but it will be some time before I get to it as I am currently working on 2 other modifications.

-Reggie
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: quickturn on November 11, 2008, 22:01:47 pm
I have a template installed but again, I was able to edit products before this. I hope I ran the mySQL portion of this mod correctly. Unfortunately, I'm not sure how I could even reverse the changes at this point. And of course, I didn't make backups.
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: lowmips on November 11, 2008, 22:25:03 pm
I'd suggest downloading the latest stable Virtuemart package, then manually extract and overwrite the files listed in my README.TXT with the original versions.  Those are the only files I modified.  Then switch back to the original UPS module.

joomla\administrator\components\com_virtuemart\languages\product\english.php
joomla\administrator\components\com_virtuemart\html\product.product_form.php
joomla\administrator\components\com_virtuemart\html\product.product_display.php
joomla\administrator\components\com_virtuemart\classes\ps_product.php

Keep in mind this was built for and tested on Joomla 1.5.x and VirtueMart 1.1.x.  If you are running this on any previous versions of either I cannot say what would happen.

You can manually drop the new field from the database using phpMyAdmin, but leaving it as is should be OK as well since nothing will use it once you revert back to the original files.

Sorry to hear you are having trouble.
-Reggie
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: quickturn on November 11, 2008, 22:38:54 pm
Thanks Reggie, if it wasn't for the product editing issue, this mod is perfect and exactly what I was looking for. I might even try to install it again, to see if it fixes the issue. of course, I'll make backups this time. :)

FYI: I am in fact using Joomla 1.5 and Virtuemart 1.1
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: lowmips on November 11, 2008, 22:54:28 pm
Please try reinstalling the module first. I've made (and fixed) several typos that made it into the zip file over the past few days (see the Updates section above). It's worth a shot before you revert back anyway. =)

Reggie
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: quickturn on November 12, 2008, 01:03:07 am
Which file should I download?

vm_ups_v2.0_2008-11-09.zip

or


vm_ups_v2.0.zip
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: quickturn on November 12, 2008, 01:13:33 am
I'm still seeing "ship_alone2" in the sql file in each archive, by the way.
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: quickturn on November 12, 2008, 01:31:11 am
Ok, so I replaced your files with the VM install files one by one and tested after each file was replaced. As soon as I replaced the final file (joomla\administrator\components\com_virtuemart\classes\ps_product.php), I was able to edit products again.
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: lowmips on November 12, 2008, 01:34:24 am
I'm still seeing "ship_alone2" in the sql file in each archive, by the way.
Thanks for pointing that out. I don't know how that happened. I specifically remember checking the file 2 or 3 times before uploading it. I guess I shouldn't try to code when sick, huh?

-Reggie
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: lowmips on November 12, 2008, 01:35:22 am
Which file should I download?
vm_ups_v2.0_2008-11-09.zip
or
vm_ups_v2.0.zip
vm_ups_v2.0.zip is an older version.
vm_ups_v2.0_2008-11-09.zip has updated functionality at the expense of one known bug. Once I get that bug worked out, I'll only have one download called vm_ups_v2.0.zip available, with all new code rolled into it.
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: quickturn on November 12, 2008, 02:41:19 am
So it looks like my configuration specifically has a problem with something within the ps_product.php file. Perhaps its another module or maybe the template I'm using? Not sure, either way ... thanks for taking time out of your schedule to create and support this useful module. Hopefully I'll get to use it at some point.
Title: UPS v2.0.2008.11.14
Post by: lowmips on November 14, 2008, 17:15:20 pm
Major Updates: 2008/11/14:
-Added support for modifying shipping cost by product. You can now give shipping discounts based on item type.
-implemented basic caching system to reduce network activity for shipments with multiple unbundled same weight packages
-implemented basic product info caching system to reduce database queries for shipments with multiple same items
-Added support for more than 50 shipments (UPS only allows 50 packages per rate request)
- Download file:_ups_v2.0_2008-11-14.zip
Please note, the bug from version UPSv2.0_2008-11-09.zip is still present in this version.  If you need to use the "UPS Worldwide Expedited SM" service, do not use this module!

I've tested this module with various test data with varying discounts for bundled and unbundled items, and hand calculated the resulting prices.  All test results equaled my hand calculations.  This was done with about 5 datasets.
Title: UPS v2.0 Bundled and Unbundled Shipping
Post by: lowmips on November 17, 2008, 22:37:01 pm
Major Updates: 2008/11/17:
-Added support for declaring a shipping insurance value
-download file vm_ups_v2.0_2008-11-17.zip
Please note, the bug from version UPSv2.0_2008-11-09.zip is still present in this version.  If you need to use the "UPS Worldwide Expedited SM" service, do not use this module!
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: opwdecks on November 19, 2008, 13:37:45 pm
Thanks! The Free Shipping for a particular product is exactly what I needed!
Title: UPS v2.0
Post by: lowmips on November 20, 2008, 16:05:14 pm
Update: 2008/11/20
- archive vm_ups_2008-11-17.zip had incorrect product.product_display.php file.
Please download new file zip file and use the updated product.product_display.php within.  File size should be 9804 bytes.
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: Mike K. on November 20, 2008, 18:18:49 pm
I think you are on the right track with this..  and I'm glad someone is finally paying attention to the UPS module and its over 70 lb and inability to ship items separately.

We are getting an error that I would assume weights are not being transmitted correctly.

Error: UPS was not able to process the Shipping Rate Request.. Error Code: 111030, Error Description: Packages must weigh more than zero pounds.
UPS_Ground_FSC _FSC

The items had weights in the database...

One other question -  if we use the shipping modifier to allow certain items to ship free  (zero percent) -  are these items at 0% relegated to only shipping free?  Or can we add their weight into the cost if the user selects overnight or second day air for delivery method?   (In other words..  those items ship free if standard shipping is chosen -  but if the user picks overnight, then the "free ship" items are charged the more expensive overnight rates)

I guess most importantly -  any idea of whats causing the error?
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: lowmips on November 20, 2008, 19:04:30 pm
Mike,
Put your site into debug mode and see what the XML request/replies are.  That should get you started on debugging your error.

As for the shipping modifier, it modifies the prices for ALL rates currently. Breaking it down further would require more code.


-Reggie
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: cferrell on November 20, 2008, 19:45:01 pm
Hi Reggie,  I work with Mike and I'm trying to debug this.  I've got virtuemart in debug mode, so let me give you some more info on what we're seeing

Here's the XML reply from UPS: 
<?xml version="1.0"?><RatingServiceSelectionResponse><Response><TransactionReference><XpciVersion>1.0001</XpciVersion></TransactionReference><ResponseStatusCode>1</ResponseStatusCode><ResponseStatusDescription>Success</ResponseStatusDescription></Response><RatedShipment><Service><Code>03</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>54.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>21.17</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>21.17</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery></GuaranteedDaysToDelivery><ScheduledDeliveryTime></ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>21.17</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>21.17</MonetaryValue></TotalCharges><Weight>53.5</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>54.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>12</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>54.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>62.90</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>62.90</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>3</GuaranteedDaysToDelivery><ScheduledDeliveryTime></ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>62.90</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>62.90</MonetaryValue></TotalCharges><Weight>53.5</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>54.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>02</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>54.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>79.86</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>79.86</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>2</GuaranteedDaysToDelivery><ScheduledDeliveryTime></ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>79.86</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>79.86</MonetaryValue></TotalCharges><Weight>53.5</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>54.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>13</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>54.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>198.85</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>198.85</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery><ScheduledDeliveryTime></ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>198.85</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>198.85</MonetaryValue></TotalCharges><Weight>53.5</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>54.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>14</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>54.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>241.19</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>241.19</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery><ScheduledDeliveryTime>8:00 A.M.</ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>241.19</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>241.19</MonetaryValue></TotalCharges><Weight>53.5</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>54.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>01</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>54.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>204.57</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>204.57</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery><ScheduledDeliveryTime>10:30 A.M.</ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>204.57</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>204.57</MonetaryValue></TotalCharges><Weight>53.5</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>54.0</Weight></BillingWeight></RatedPackage></RatedShipment></RatingServiceSelectionResponse>

It looks like we're at least getting back some shipping cost from them, but in your code I see from debugging:

Debug: Caching rates for weight: 53.53 and insurance:
Debug: Added unbundled weight: 53.53. Orig price: . New price: 0
Debug: Added unbundled weight: 53.53. Orig price: . New price: 0

and then:

$0.00) - Weight: 53.53 , Fee: [[0(1)]+0](1)]


Do we maybe have the module configured incorrectly?
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: cferrell on November 20, 2008, 19:48:30 pm
Oh, and I forgot.  We're seeing the FSC problem seems to have to do with a Fuel Surcharge constant.  I put the FSC for the enabled types of shipping to 0, but it seems to still be happening.
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: lowmips on November 20, 2008, 19:49:57 pm
The XML response you posted is a valid succesful response. Was there still an error message posted ??


ps. In the future, please paste the XML response in a text file and attach it to your message, instead of pasting it directly into a forum post =)
Title: UPS v2.0 Update
Post by: lowmips on November 20, 2008, 19:56:35 pm
Update 2: 2008/11/20
- added option to skip handling charges on packages with free shipping
- removed bug where in certain cases handling was being charged twice (original UPSv1.0 code)
- please use file vm_ups_v2.0_2008-11-20.zip
Please note, the bug from version UPSv2.0_2008-11-09.zip is still present in this version.  If you need to use the "UPS Worldwide Expedited SM" service, do not use this module!
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: cferrell on November 20, 2008, 20:11:47 pm
I think the relevant portion of the debug output is:

Debug: Caching rates for weight: 53.53 and insurance:
Debug: Added unbundled weight: 53.53. Orig price: . New price: 0
Debug: Added unbundled weight: 53.53. Orig price: . New price: 0

and then:

$0.00) - Weight: 53.53 , Fee: [[0(1)]+0](1)]

Look at the Fee calculation above.  It comes out $0.00 everytime.
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: lowmips on November 20, 2008, 20:17:11 pm
Can you attach the XML request also please?
Also, which version of the UPSv2.0 module are you using?
How many items are in the cart? How many bundled? How many unbundled?


What worries me is the original price is showing a blank.
Debug: Added unbundled weight: 53.53. Orig price: . New price: 0
Debug: Added unbundled weight: 53.53. Orig price: . New price: 0

That is very odd.  From your XML response we should be getting an original charge of $21 and up!
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: cferrell on November 20, 2008, 20:29:55 pm
Attached is the UPS request and response.

The version we're using is the one 11-17-08 you posted today with the fix for the product.product-display.php with 9xxx bytes or so.

There is one item in the cart, unbundled.

[attachment cleanup by admin]
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: lowmips on November 20, 2008, 20:56:32 pm
cferrell:
Joomla version? Virtuemart version?

product price? padding? shipping modifier? handling fee?

I'm scratching my head on this one, I've tested one unbundled product on my site and it came through fine, as always.

-Reggie
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: cferrell on November 20, 2008, 21:02:00 pm
Maybe this will help: 

In upsv2.php around line 320, right before

for ($rateLooper=0;$rateLooper<count($tmpRates);$rateLooper++) {

// the looper for unbundled items

I put $vmLogger->debug($tmpRates);

right below

$tmpRates=&$this->get_ups_rates($shipments[$shipmentLooper]
['weight'],$shipments[$shipmentLooper]['insurance']);

and get back

Debug: Array
(
[2] => Array
(
[ServiceCode] => 02
[ServiceName] => UPS 2nd Day Air
[BillingWeight] => 54.0
[transportationCharges] => 79.86
[ServiceOptionsCharges] => 0.00
[TotalCharges] => 79.86
[GuaranteedDaysToDelivery] => 2<br>
)

[5] => Array
(
[ServiceCode] => 01
[ServiceName] => UPS Next Day Air
[BillingWeight] => 54.0
[transportationCharges] => 204.57
[ServiceOptionsCharges] => 0.00
[TotalCharges] => 204.57
[GuaranteedDaysToDelivery] => 1<br>
)


It seems to me that the interesting bit there above is the index of the array (2 and 5).

So if count($tmpRates) comes up with 2, then it's going to index 0 and 1 in the loop, and not get the indexes 2 and 5.

Or am I totally off here?
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: cferrell on November 20, 2008, 21:23:11 pm
Something else that might be interesting.  I can't seem to turn off the UPS Worldwide Expedited SM in the configuration of your module.  I save it, but it always comes back checked.
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: lowmips on November 20, 2008, 21:27:24 pm
Worldwide Expedited SM -> See the bug notice about that.


Weird array indice thing ->
Very very weird.  If you'll look at the get_ups_rates function, it counts the <RatedShipment> nodes in the response, and loops through them one at a time, assigning the information gathered to the array $shipments.  $shipments has arrays at indice 0 to indice ($childCount). $shipments is what is actually returned, and is what $tmpRates refers to.

Try this:
remove the ampersand from the call. It may have something to do with $shipments not being a global variable and being referred to outside of the function.

Also, put this vmLogger call at the bottom of ups_get_rates, before the return:
$vmLogger->($shipment);
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: cferrell on November 20, 2008, 22:31:53 pm
Removed the ampersands from the calls to get_ups_rates in bundled and unbundled, and put a $vmLogger->debug($shipment) right before the return in get_ups_rates.

Unsuprisingly, got back this right before the return in get_ups_rates :

Debug: Array
(

(
[ServiceCode] => 03
[ServiceName] => UPS Ground
[BillingWeight] => 54.0
[transportationCharges] => 21.17
[ServiceOptionsCharges] => 0.00
[TotalCharges] => 21.17
[GuaranteedDaysToDelivery] => <br>
)

[2] => Array
(
[ServiceCode] => 02
[ServiceName] => UPS 2nd Day Air
[BillingWeight] => 54.0
[transportationCharges] => 79.86
[ServiceOptionsCharges] => 0.00
[TotalCharges] => 79.86
[GuaranteedDaysToDelivery] => 2<br>
)

[5] => Array
(
[ServiceCode] => 01
[ServiceName] => UPS Next Day Air
[BillingWeight] => 54.0
[transportationCharges] => 204.57
[ServiceOptionsCharges] => 0.00
[TotalCharges] => 204.57
[GuaranteedDaysToDelivery] => 1<br>
)

)


I'm going to take another look at that UPS XML result to see how many rates it's sending back.

I added UPS ground as a shipment method, and that's why there's elements of the array now.
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: Mr Justin on November 20, 2008, 23:23:36 pm
I have a Question I am using Joomla 1.5.8 and vm 1.1.2 i am trying to set up the latest version of the UPS v2.0 2008.11.20

When i add any items to my cart and go to the shipping part of the check out i get this error

Error: Error processing the Request to UPS.com
Error: We could not find a UPS shipping rate. Please make sure you have entered a valid shipping address. Or choose a rate below.

When i tern on both v1.0 and v.2.0 It shows Two out puts that's the only time v2.0 seems to work why is?
example

UPS Ground ($16.12)


UPS Ground ($16.12)

When just v1.0 is on it works like it did be for. This works like this with any kind of Shipping Method turned on or off in v2.0 but if there all ones on v1.0 are on it shows up like this.

UPS Ground ($16.12)
UPS 3 Day Select ($19.82)
UPS 2nd Day Air ($24.51)
UPS Next Day Air ($34.21)


UPS Ground ($16.12)
UPS 3 Day Select ($19.82)
UPS 2nd Day Air ($24.51)
UPS Next Day Air ($34.21)

Any one know what i missed?
Thank You for you time


Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: cferrell on November 20, 2008, 23:38:01 pm
I'm pretty sure I know why the indices of the $shipment array are the way they are.

In get_ups_rates there's a

for ($i = 0; $i < $rate_list->getLength(); $i++) {

...

then there's a

switch-case in another loop below that.  in the case statments, there's statements like $shipment[$i]["ServiceCode"] = .....

So even though the service types that we're not interested in are getting ignored with

if ( in_array($currNode->childNodes[0]->getText(),$myservicecodes) )  {

the indexes are still based off that outer loop of $i.

Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: cferrell on November 21, 2008, 00:26:20 am
Got the indices squared away by initializing a variable outside of that outer loop and then incrementing it for each service we're interested in, but why does $final_price = round($full_price - $discount_price,2) // around line 327 always return 0?

I'm guessing that $full_price and/or $discount_price are strings, but I'm not a PHP expert so not sure how to convert to floats.

Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: lowmips on November 21, 2008, 00:32:00 am
cferrell:
Good find. I'm amazed that I didn't encounter this flaw in my testing since the implementation of ups_get_rates (several revisions ago).  I'll implement a seperate counter to indicate how many useful results we've gotten, and populate $results based off of that.

Nice debug work.
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: lowmips on November 21, 2008, 00:41:35 am
Update 3 2008/11/20
- removed bug where get_ups_rates function was returning an array with non-sequential indices (thanks cferrell for noticing and debugging this)
- please redownload vm_ups_v2.0_2008-11-20.zip and use the new upsv2.php file
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: Mike K. on November 22, 2008, 18:04:53 pm
We installed with the latest changes -  and so far testing shows that for the first time in years, we are getting accurate UPS costs on all sizes of packages.  We ran several test packages through of different weights, including multiple high weight packages, single packages of high and low weight, mixed carts of high weight and low weight items - and got comparative estimates on the same items from UPS over the phone.  They were all almost spot on between what the VM cart with the 2.0 module charged and what UPS said that they would charge.

I realize that what I am saying is that a shipping module is working correctly, which should not be such a big deal -  but for anyone who uses VM and shipped items over 70 lbs or groups of items over 70 lbs using the 1.0 module - we have consistently lost money because the 1.0 module broke or gave a false (low) shipping charge every time the cart went over 70 lbs. 

I hope that it will continue to work as well in the live environment as it did in our tests.  IMHO, this module should continue to be developed and improved - and be considered for the core in the next release.
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: lowmips on November 22, 2008, 18:35:36 pm
Mike,
I'm glad it's working well for you.  I'll continue to develop it as I have time.  However, priority number one for me right now is finding income, as I am currently unemployed and looking for work.  Most of the updates I've implemented are a direct result of several users offering donations for the work.  They paid my rent this month =).  If you find that this module helps your business save money or run more efficiently, please consider a donation.

As for future updates, I have a user who would like his bundled shipments to never exceed the 150lb maximum.  That is, automatically break any bundled shipments that exceed the limit into separate shipments.  Now, for his specific case, I could probably relatively quickly hard code something that works just for him, but I'd like to make it generic enough to work for everyone.

The most glaring issue I can see is how do we determine which items to split into which shipments? Do we simply assume that any items flagged as "bundled" should be OK to mix and match however we want?  I could then start with the heaviest item and try adding the next heaviest items to the package and so on.  Or do we need some way to flag which items can ship with which other items? For example, I probably would not want to ship a number of larger items with a very small item. Would we want 140lbs of books in the same box as a CD?

Also, we'll need a way of recording how the split was done, and be able to present this information within the order's page in VirtueMart.  I've half a mind to revamp the way the entire cart/checkout process works to facilitate this and other functionality.

Also, there are L/W/H considerations. Which items would most efficiently go together into a set of know sized boxes?  In the future, I'd like to implement a box-stuffing algorithm that uses the L/W/H of the product and a set of box known sizes to efficiently pack packages.  However, in my research on the subject I've found no open source algorithms for this.  I've only found links to papers on such algorithms, which have to be paid for to be viewed.  I'm not about to pay $25 or more to view a paper which *might* hold an answer.

If you or anyone has any ideas or answers for these future updates, please post them here or feel free to email me.

-Reggie
Title: UPS v2.0 Bundled and Unbundled Shipping
Post by: lowmips on December 01, 2008, 14:53:58 pm
Update: 2008/12/01
- removed another bug in function get_ups_rates which would cause only a small subset of UPS rates to be used, even if more were checked in the config.
- please re-download vm_ups_v2.0_2008-11-20.zip and use the new upsv2.php
Title: Re: UPS v2.0 Bundled and Unbundled Shipping
Post by: lowmips on December 01, 2008, 21:02:03 pm
Update #2 2008/12/01
- removed typo in upsv2.sql which caused a bug that disabled saving changes to products
- please rename the field 'ship_insurance' to 'ship_insured' in your jos_vm_product table
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on December 03, 2008, 19:40:03 pm
Major Update: 2008/12/03
- Added support for maximum number of a product in a package
- completely reworked the package stuffing algorithm in preparation for future functionality additions/improvements
- removed logics bug from Override_Source_Zip code.  Leaving the text "Override_Source_Zip" in the text box will now work correctly.
- uninvented reinvented wheel. removed $products cache array and started using ps_product::get_field and ps_product::set_field.  Updated both functions to include product price information.
- *IMPORTANT*: this version requires PHP version 5 or higher
- Please download vm_ups_v2.0_2008-12-03.zip

Please note, the bug from version UPSv2.0_2008-11-09.zip is still present in this version.  If you need to use the "UPS Worldwide Expedited SM" service, do not use this module!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on December 04, 2008, 15:05:47 pm
Update: 2008/12/04
- version vm_ups_v2.0_2008-12-03.zip
- BUGFIX: removed bug where using an override zip code caused fatal errors.
- please re-download vm_ups_v2.0_2008-12-03.zip and use the new upsv2.php within
- thank you opwdecks for your patience in dealing with this bug and helping me fix it
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on December 09, 2008, 14:17:55 pm
Update 2008/12/06
- version vm_ups_v2.0_2008-12-06.zip
- removed bug where some shipping rates were being modified when they should not
- optional "Free Shipping" image to be displayed on product flypage for products who have a shipping modifier of zero.
- option for restriction of "Free Shipping" to only basic ground services
- added detailed debug information to final checkout page
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Rogerio1979 on December 14, 2008, 11:57:58 am
Does this work for this:

- UPS Tracking
- UPS Rates & Services Selection
- UPS Time in Transit
- UPS US Adress Verification
- UPS File download for Quantum View
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on December 14, 2008, 22:36:44 pm
the UPSv2.0 module currently utilizes the UPS Rates & Services API, nothing else.
Title: UPS v2.0 Update
Post by: lowmips on December 19, 2008, 22:51:47 pm
Update 2008/12/18
- version vm_ups_v2.0_2008-12-18.zip
- implemented system to restrict shipping a product to any location


I've implemented a restriction system based on country/state associations to ensure your product is not shipped somewhere it should not be.

In the administration panel under "Shipping", choose "Create Shipping Restrictions".  Give your new restriction a name, an optional description, and choose a country/state pair.  Click "save", or click "Apply" and add more country/state pairs if needed.  You can add as many country/state pairs to a restriction as you want.

Now go to your product's administration page, and choose the "Shipping" tab.  Select the appropriate Shipping Restriction from the drop-down list, and click "Save" or "Apply".

You've now restricted your product from being sold/shipped to someone in a country/state where it should not be!

If you find this feature useful, please consider a donation!
Thanks,
Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: opwdecks on December 20, 2008, 20:23:35 pm
This is great if certain products cannot be shipped to certain states. I asked to have this implemented for my store since I cannot ship some of my products to certain states due to VOC regulations. Big fines if I do. I have seen other posts that were looking for this exact same thing. Example: wine sites are not allowed to ship to every state.

Thanks for this!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on December 22, 2008, 00:10:41 am
Update 2008/12/21
- ***BUGFIX***
- Please re-download version 2008.12.18
- If you are using version 2008.12.06 please upgrade to the latest version.
- affected files: upsv2.php, ps_config.php
- I thought I had cleared the "UPS Worldwide Expedited SM" toggle bug, however in the process of doing so I broke the functionality of the UPSv2 module completely.  The only reason it was working for me is because I had not overwritten my upsv2.cfg.php, so some old values were left in place and caused me to miss the new bug.  I recently wiped my dev box clean and reinstalled everything and came across this bug.  I have undone the "bugfix" code for the "UPS Worldwide Expedited SM" toggle bug in order to restore the UPSv2 module to working order.  This may reintroduce the "UPS Worldwide Expedited SM" toggle bug.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on December 22, 2008, 20:00:27 pm
A Note for International Users

It has come to my attention that some international users may receive a UPS error code 111370, Error Description: Unsupported Pickup Type. This could happen in any version of the UPS module, 1.0 and 2.0 included.  From a post on the osCommerce forums I've determined that UPS has stated the PickupType is unnecessary for certain countries, and attempting to use it will result in the error.  So for now, if you are getting this error do the following:

in upsv2.2008.12.18, open upsv2.php and go to line 503-506
Code: [Select]
// pickup type
$xmlPost .= " <PickupType>";
$xmlPost .= "  <Code>".$this->ups_pickup_type."</Code>";
$xmlPost .= " </PickupType>";

simply comment all three lines out.

Code: [Select]
// pickup type
//$xmlPost .= " <PickupType>";
//$xmlPost .= "  <Code>".$this->ups_pickup_type."</Code>";
//$xmlPost .= " </PickupType>";

I will add a feature to skip pickup type declaration in my next version of upsv2.0.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: darren.mrtn1 on December 24, 2008, 13:41:04 pm
Hi,
This is exactly what i have been looking for.

although as my site is based in Australia we do not use UPS

would it be possible to adapt this to use with the - "Standard Shipping module with indiviual configured carriers and rates. RECOMMENDED !" ?

as this is what i actually use at the moment

Regards
Darren
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on December 30, 2008, 21:20:45 pm
Update 2008/12/30
-version vm_upsv2.2008.12.22
-added option to have free shipping on orders over a certain amount
-added option to skip Pickup Type declaration (workaround for UPS Error Code: 111370, Error Description: Unsupported Pickup Type)
Title: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 06, 2009, 00:02:57 am
Update 2009/1/1
 - internal restructuring of UPSv2.0 in preparation of future updates
 - moved ups rates cache into $_SESSION to provide better caching opportunities
 - added workaround to fix bug in XML reply parser when cURL is not used
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: WebJIVE on January 13, 2009, 02:04:51 am
I hate to bother you guys but I have a question on this module.  I think I made some wrong assumptions..

I have a client who has packages which can be 300lbs and after installing this killer VM addon, I thought it would take the total weight and break it down into a multi-package shipping (maybe create 3 ship items with the total weight/3 get the shpping costs and add it together) to get around the 140lb max UPS has per package?

I have a fireplace store who wants to ship UPS and understands that the max per package is around 140lbs and wants to ship the packages in about 70lbs per box as a work-around.

Thoughts?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 13, 2009, 02:09:47 am
That is correct.  It can break down packages into smaller single shipments.  It should by default attempt to distribute the weight such that you never have packages larger than 150lbs (as long as the individual item is no larger than 150lbs).  If you wish your packages to be of lesser total weight, you could set the "ship alone" setting for individual products, or use the "max per package" setting to insure that only small quantities of each heavy item are in any one package.

If you need further assistance, or a new addition to the UPSv2.0 module to suit your needs, please contact me.

Thanks,
Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: WebJIVE on January 13, 2009, 05:10:57 am
Thanks Reggie.  If I can get this working correctly, I'll definitely make a good donation to your project.  This functionality should be part of the base system IMHO  :-)

I'll be back with results.  BTW, whenever I set the weight to 150, I get an error from the UPS system that the weight exceeds 150lbs, any ideas on that?

Regards,
Eric
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 13, 2009, 05:28:13 am
Yes sorry, the way the UPS online tool works is it accepts any weight *up to* 150lbs.  Anything 150 or over cannot be processed by UPS.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: WebJIVE on January 13, 2009, 06:06:29 am
Thats been my experience in the past. Does your addon split the weight so that packages are lower than 150?  I notice that I get that error until I lower the package weight to 140lbs.  Intersting
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: WebJIVE on January 13, 2009, 06:25:26 am
I have tried every conceivable combination but, I'm still getting this in debug.

Debug: Starting Shipping module: upsv2
Debug: Source zip was set to override: ->72212<-
Debug: upsv2::create_shipment() Error adding product pid 4 to the shipment!
Notice: We are unable to ship UPS as an error occured. Please select another shipping method.
Notice: The error was: Could not add item "Southern Pecan" as it exceeds the maximum weight allowed (150).upsv2::create_shipment() Error adding product pid 4 to the shipment.

help...  :-)

[attachment cleanup by admin]
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 13, 2009, 14:32:54 pm
OK I see the problem.  I've always seen each product as an inseparable unit.  Here's an example of how I view it:

Let's say you're selling a carton of earplugs (this is the single product, as listed in VM's product page).  The carton (Unit) has multiple smaller boxes within it (Units in packaging), and each box has a handful of earplugs (Units in box).  We are selling the entire carton, and would never break the carton down into subpackages, we sell the whole thing at once.  That is why our product is "Carton of earplugs", not "individual box of earplugs".

The "Unit", "Units in packaging" and "Units in box" are all ignored by the shipping module as it is today.  Shipments are filled based on the product weight field, and the individual weights are never reduced.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 13, 2009, 14:36:57 pm
Thats been my experience in the past. Does your addon split the weight so that packages are lower than 150?  I notice that I get that error until I lower the package weight to 140lbs.  Intersting

Be sure you have considered any padding.  This is configurable in the module and later considered during calculating the rates.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: WebJIVE on January 13, 2009, 15:03:17 pm
Ahh... I kinda have a backwards situation. I have a fireplace store that wants to use UPS to ship gas logs, the grate, etc. and the combined weight is around 300lbs.  What they want to do is ship these in separate containers each weighing a 100lbs or less.  What I was thinking was your addon took the total weight, divided it out, and requested multiple shipping rates for each package (say 3 in this instance) and then combined the shipping price. 

This would be an elegant way to ship heavy items via UPS with VM talking to UPS for correct shipping prices to complete the cart?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 13, 2009, 15:21:42 pm
WebJIVE,
I can think of a few solutions.  In order of complexity (and cost):

a) Split the item into three separate products in VM.  Make each one a "related product" of the other. Make a note in each item's description that you'll need the other two.  This way the actual weights are considered and correctly queried.

b) add custom code to the necessary shipping modules that consider the number of items in the package.  For products >150lbs, split the total weight by that number (which is inaccurate and only gives a ballpark figure for actual shipping cost).

c) Split the item into three separate products in VM.  Create custom code such that when the "main" item is added to the cart, the other two are automatically added as well.  Possibly hide the other two items so they cannot be added by themselves (i.e. make them uncatagorized).  Notify the user why two more items were added to the cart.  Do not allow those two items to be removed manually.  Automatically remove them if the main item is removed.

d) (this one would take significantly more time)  Rework the product system so that "subitems" can be added to a product.  Include actual weights to be considered when calculating shipping.  Works much like C) but is less of a hack.  Has more configurable options.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: WebJIVE on January 13, 2009, 15:29:40 pm
Thank for the ideas!  I was heading down the same paths.  The problem is this is a CHEAP customer so I may tell them they will have to configure/add shipping costs to the product manually.  My sales guy sold this one to get his feet wet (I wanted to walk but didn't) and I don't want to bleed on this one any more than I have to  :-P
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 13, 2009, 15:34:58 pm
Thank for the ideas!  I was heading down the same paths.  The problem is this is a CHEAP customer so I may tell them they will have to configure/add shipping costs to the product manually.  My sales guy sold this one to get his feet wet (I wanted to walk but didn't) and I don't want to bleed on this one any more than I have to  :-P

Well there is another solution.  Leave it as is so that it will not check out due to UPS bombing, and have a note on the product saying "call to order/get shipping fee" or something similar.

Good luck, let me know if you need any customizations later.
-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: WebJIVE on January 13, 2009, 16:31:14 pm
I'll definitely keep you in mind for that.  If you want to, PM me your rates and if this customer were to decide to cough up some dough for a customization like this, I'll contact you.  :-)
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: SA_Chick on January 30, 2009, 20:41:40 pm
This module has worked great for us, so far. But we have run into a slight problem on a certain product. Some of our exhaust downpipes are irregular sizes, and UPS adds a dimensional weight and extra cost. Your module does NOT calculate these dimensions, correct? Only weight?

Is there a way for you to account for the dimensions? or is there another module that calculates weight + dimensions? Any help would be great.

Thanks!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 30, 2009, 20:55:05 pm
That's correct, the current implementation does not account for dimensions.
Please contact me if you would like a quote on adding this ability.  Please note there are some "gotchas" we'll have to work through.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: SA_Chick on January 30, 2009, 21:02:45 pm
No worries. I just needed to confirm this, in fact, does not calculate dimensions. We got burned a bit on a few of these before we realized it wasn't doing this.

Can't afford to have anything custom made at the moment, but thanks for the offer. Will remember you in the future though.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 02, 2009, 20:25:58 pm
Hi all,
I've updated UPSv2 to add support for VirtueMart 1.1.3. Please note! I have not extensively tested the updates, I have only tested them on my website, so please back up your existing files before replacing with the new ones, and ideally install and test these files on a test server before using them in your live production environment!


Here are the specific files affected:

joomla\administrator\components\com_virtuemart\classes\shipping\upsv2.ini
       - just updated the version numbers

joomla\administrator\components\com_virtuemart\classes\shipping\upsv2.php
   - moved shipment info save from ps_checkout to upsv2::save_rate_info()

joomla\administrator\components\com_virtuemart\classes\ps_checkout.php
   - removed all upsv2 code from this module. can use the default VM1.1.x code now (this file was not updated in VM1.1.3 so you can leave it as is)

joomla\administrator\components\com_virtuemart\classes\ps_html.php
   - added UPSv2 file lister code
   
joomla\administrator\components\com_virtuemart\classes\ps_order.php
   - added UPSv2 order deletion code (delete shipment info from vm_order_shipment)

joomla\administrator\components\com_virtuemart\html\admin.show_cfg
   - added UPSv2 config options

added necessary language to the following:
joomla\administrator\components\com_virtuemart\languages\admin\english.php
joomla\administrator\components\com_virtuemart\languages\common\english.php
joomla\administrator\components\com_virtuemart\languages\product\english.php

-Reggie
Title: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 16, 2009, 20:07:18 pm
Hi all
Just wanted to post a shameless plug for my Cart Rates (http://www.lowmips.com/joomla/software-shop-11.html) plugin.

This plugin allows you to show the UPS shipping rates in the cart itself, and also the lowest rate in the mini cart.  If the user is not logged in, the plugin requests the user to input their country and zip code in order to get the rates.  If the user is already logged in, it uses the user's current mailing address.

Thanks and enjoy!
-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: opwdecks on February 21, 2009, 16:06:50 pm
Works great! You can see it here on my website:

www.opwdecks.com

Just add a product to cart and then view cart to see how this works.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 23, 2009, 19:40:10 pm
Update 2009/2/23
- version vm_ups_v2.0_2009.02.23.zip
- minor update to remove PHP warning messages when in VM administration
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Hunter-nl on February 24, 2009, 23:48:29 pm
I've a strange possible "bug".
The UPS v2.0.2009.02.23 gives me the correct shipping options and prices. But after selecting the right option and go to the next step (payment options) then the basket provides me a shipping/handle costs with a value of 0.00 EURO
I can't discover why this happens.

Basket (in dutch):
Naam     Art.nr.     Prijs     Aantal / Vernieuwen     Subtotaal
Productname ABC123    € 578,00   1              € 578,00
Subtotaal:    € 578,00
Verzend- en handlingskosten:    € 0,00
BTW:    € 109,82
     
Totaal:    € 687,82

In debug global vars I have this:
$_POST:     
$_GET:    view=>frontpage
$_COOKIE:    
$_SESSION:    __default=> {Array}
userstate=> {Array}
VMCHECK=>OK
auth=> {Array}
savedcart=> {Array}
cart=> {Array}
recent=> {Array}
ps_vendor_id=>1
minimum_pov=>0.00
vendor_currency=>EUR
last_page=>checkout.index
product_sess=> {Array}
rate_cache=> {Array}
vmUseGreyBox=>0
vmCartDirection=>0
vmMiniCart=>
restricted_cart_items=> {Array}
shipment=> {Array}
upsv2%7CUPS%7CUPS+Standard%7C%26euro%3B+8%2C97=>1
upsv2%7CUPS%7CUPS+Saver%7C%26euro%3B+21%2C95=>1
upsv2%7CUPS%7CUPS+Worldwide+Express+Plus+SM%7C%26euro%3B+57%2C04=>1
upsv2%7CUPS%7CUPS+Worldwide+Express+SM%7C%26euro%3B+24%2C59=>1
ccdata=> {Array}
     
$vars:    option => com_virtuemart
Itemid => 1
user_id => 62
page => checkout.index
func => checkoutProcess
zone_qty => 1
ship_to_info_id => 8daa206003e858f3818db834006d5e6a
shipping_rate_id => upsv2%7CUPS%7CUPS+Standard%7C%26euro%3B+8%2C97
payment_method_id => 0
checkout_last_step => 2
formSubmit => Volgende >>
__utma => 212179599.343846742.1224743231.1230980557.1231001103.136
__utmz => 212179599.1224743231.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
ja_purity_tpl => ja_purity
ys-vmlastpage => s:http://joomla.shop.net/administrator/index2.php?pshop_mode=admin&page=store.shipping_module_list&option=com_virtuemart
ys-vmconfiguration-active => s:ext-comp-1009
ys-debugpanel-active => s:ext-comp-1004
virtuemart => ae02d385848d08552939b52dbe543a09
fe4ed9c8f1d958e8eff083ed4ca044b7 => 2b7fb56104c195f88618ee4f19091a52
de56a0d045e35d807c9b3448e777be53 => 80e96c446712cf1ef26383077af14a36
view => frontpage
user_info_id =>
order_subtotal_withtax => 687.82
payment_discount => 0
total => 578
weight => 1.25
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 25, 2009, 01:20:34 am
It looks like a malformed rate. For example, the first rate listed in your session cache is:
Quote
upsv2%7CUPS%7CUPS+Standard%7C%26euro%3B+8%2C97=>1
translated to non-URL friendly, that looks like:
Quote
upsv2|UPS|UPS+Standard|&euro;+8,97

I'm guessing it is bombing on the last part, &euro;+8,97
I'll have to check out the code and see what's up.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 25, 2009, 01:58:46 am
Update 2009/2/24
- version vm_ups_v2.0_2009.02.24.zip
- added basic support for declaring L/W/H. Useful for large packages which require using dimensional weight instead of real weight.
- Thanks Kyle Kruzick from Kruzick.com for underwriting this addition!


How to use
---------------
In the VM admin panel go to:
Admin->Configuration->"Shipping" tab

Under "Choose your store's general shipping options" there are two new options
1) Declare product Length/Width/Height for shipping estimates
2) Restrict Length/Width/Height declaration to unbundled packages

Currently, this is useful for large, unbundled packages consisting of 1 virtuemart item that is very large.

PLEASE NOTE!
This is a very basic implementation of declaring L/W/H! It is very "dumb" in that if you enabled L/W/H for all packages, only the L/W/H for the last item placed in the package will be declared! We currently do not have a way to intelligently add items to a package with respect to overall L/W/H! If you know of any good open source box stuffing algorithms, please contact me!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 25, 2009, 02:05:04 am
I've a strange possible "bug".
The UPS v2.0.2009.02.23 gives me the correct shipping options and prices. But after selecting the right option and go to the next step (payment options) then the basket provides me a shipping/handle costs with a value of 0.00 EURO


Actually, after having looked at the code and re-reading your post, I think everything in the code is OK.  The rate is not malformed.  I'm not sure why the price isn't persisting from the shipping to the payment screens, it may take some custom debugging to figure out.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Hunter-nl on March 01, 2009, 20:57:48 pm
I've found the cause of the problem. Due US and European difference in currency format (characters , and . switched) and the returned values from UPS caused the problem.
I've fix it now. Here's a diff output:
Code: [Select]
Left file: /web/administrator/components/com_virtuemart/classes/shipping/upsv2.php
Right file: \upsv2.0_2009.02.24\joomla\administrator\components\com_virtuemart\classes\shipping\upsv2.php
157c157
< if( $this->dest_country == "NLD") { //domestic if NLD
---
> if( ( $this->dest_country == "US") || ( $this->dest_country == "PR") || ( $this->dest_country == "VI")){ //domestic if US, PR or VI
198c198
< global $vmLogger, $weight_measure, $VM_LANG, $CURRENCY_DISPLAY;
---
> global $vmLogger, $weight_measure, $VM_LANG;
240,241c240
< //$shipping_rate_id = urlencode(__CLASS__."|UPS|".$value['ServiceName']."|".str_replace('&euro;','',$value['TotalCharges']));
< $shipping_rate_id = urlencode(__CLASS__."|UPS|".$value['ServiceName']."|".$value['TotalCharges']);
---
> $shipping_rate_id = urlencode(__CLASS__."|UPS|".$value['ServiceName']."|".str_replace('$','',$value['TotalCharges']));
251c250
< $html .= "(<b>".$CURRENCY_DISPLAY->getFullValue($value['TotalCharges'])."</b>)";
---
> $html .= "<strong>(".$value['TotalCharges'].")</strong>";
403c402
< global $vmLogger, $VM_LANG; //, $CURRENCY_DISPLAY;
---
> global $vmLogger, $VM_LANG, $CURRENCY_DISPLAY;
406,408c405,407
<     // UPS returns Charges in EUR.
<         // So we have to convert from EUR to Vendor Currency if necessary
<         if( $_SESSION['vendor_currency'] != "EUR" ) {
---
>     // UPS returns Charges in USD ONLY.
>         // So we have to convert from USD to Vendor Currency if necessary
>         if( $_SESSION['vendor_currency'] != "USD" ) {
444c443
<                 $tmp = $GLOBALS['CURRENCY']->convert( $value['TotalCharges'], "EUR", $vendor_currency );
---
>                 $tmp = $GLOBALS['CURRENCY']->convert( $value['TotalCharges'], "USD", $vendor_currency );
461,462c460
<                   //  $value['TotalCharges'] = $CURRENCY_DISPLAY->getFullValue($charge);
<                     $value['TotalCharges'] = $charge;
---
>                     $value['TotalCharges'] = $CURRENCY_DISPLAY->getFullValue($charge);
478,479c476
<                     //$value['TotalCharges'] = $value['TotalCharges']. " EUR";
<                     $value['TotalCharges'] = $charge;
---
>                     $value['TotalCharges'] = $value['TotalCharges']. " USD";
494,495c491
<                 //$value['TotalCharges'] = $CURRENCY_DISPLAY->getFullValue($charge);
<                 $value['TotalCharges'] = $charge;
---
>                 $value['TotalCharges'] = $CURRENCY_DISPLAY->getFullValue($charge);
503c499
<                     if ($value['ServiceName']=="UPS Standard"){
---
>                     if ($value['ServiceName']=="UPS Ground"){
513,514c509
<                     //$value['TotalCharges'] = $CURRENCY_DISPLAY->getFullValue($charge);
<                     $value['TotalCharges'] = $charge;
---
>                     $value['TotalCharges'] = $CURRENCY_DISPLAY->getFullValue($charge);
612c607
< $xmlPost.= "         <Code>CM</Code>";
---
> $xmlPost.= "         <Code>IN</Code>";
634c629
< $xmlPost .= " <CurrenceyCode>EUR</CurrenceyCode>";
---
> $xmlPost .= " <CurrenceyCode>USD</CurrenceyCode>";
738d732
< $retRates[$resultsCount]["RatedShipmentWarning"] = $currNode->childNodes[$nodeLoop]->getText();
803c797
< $retRates[$resultsCount]["isBasic"] = false;  // currently the only "basic" service
---
> $retRates[$resultsCount]["isBasic"] = true;  // currently the only "basic" service
815c809
< $retRates[$resultsCount]["isBasic"] = true; // possible future "basic" service?
---
> $retRates[$resultsCount]["isBasic"] = false; // possible future "basic" service?
Maybe you can make it more configurable, like: which currency to be used for UPS communication, dimension unit (CM or IN), which service is the basic service? and which country is domestic.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 02, 2009, 04:16:47 am
I don't have experience with "diff", maybe I'm interpreting wrong, let me know if I am.  I'm also pretty tired at the moment ;)

Code: [Select]
< //$shipping_rate_id = urlencode(__CLASS__."|UPS|".$value['ServiceName']."|".str_replace('&euro;','',$value['TotalCharges']));
< $shipping_rate_id = urlencode(__CLASS__."|UPS|".$value['ServiceName']."|".$value['TotalCharges']);
---
> $shipping_rate_id = urlencode(__CLASS__."|UPS|".$value['ServiceName']."|".str_replace('$','',$value['TotalCharges']));

So you are not stripping the euro symbol, but you are stripping any dollar sign from the TotalCharges value?


Code: [Select]
<     // UPS returns Charges in EUR.
<         // So we have to convert from EUR to Vendor Currency if necessary
<         if( $_SESSION['vendor_currency'] != "EUR" ) {

So UPS does return euro values now?  The documentation I read as well as the original module pointed to USD only.

Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Tcom on March 06, 2009, 08:18:05 am
I have tried to add this mod about 11 times with no luck - surely something I am doing - but here is my bigger problem - I can't get past a 70 pound weight restriction.  Is there a file which this mod depends on which needs to be updated?  Without fail, no matter what I do, once I reach 70 pounds the shipping module wigs out and only adds the handling charge.  I included a screen print as an attachment.  The starnge thing is that it seems to calculate SOMETHING as you can see in the area to the right of the charge in the attached image, but that is only a description, never part of the actual shipping charges.  I have replaced all the ups fils and gone through them line by line but there is no refernce to the 70 pound weight limit.  I know this isn't the perfect category for this post but it occured after installing this mod - as well as before, and after removing it.  Any ideas would be GREATLY appreciated...

[attachment cleanup by admin]
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Tcom on March 06, 2009, 08:29:59 am
This post provided a modified ups.php file which seems to work.  Hope it helps someone...

http://forum.virtuemart.net/index.php?topic=42460.0
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 06, 2009, 13:57:09 pm
Hi Tcom,
What info does putting your shop into debug mode give you?  The module allows for items up to 150 lbs, which is the actual UPS max (see upsv2.php around line 56, the hard coded max weight declaration; also line 171, where the shipment class is given this max weight).

I am assuming you're using one of the latest Joomla and VirtueMart releases, along with PHP5 or greater, and the latest upsv2 module.

Feel free to email the debug info to me.
-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Tcom on March 07, 2009, 03:11:30 am
Thanks lowmips.  I don't think the problem was with your code. I think I had some issues with my upgrade - namely that after upgrading to 1.1.3 I had issues with the county mod (because the file which was modified was replaced) so I ended up restoring SOME of the files from the upgrade.  I had so many problems with UPS that I don't have the ambition to try anything else yet.  Unfortunately I didn't find your mod until I spent a week trying to get past the 70 pound issue in the original installation. I'll probably try your mod again because it seems to do a lot but for now I'm good with the current solution.  After I try it again, I'll post my results and let you know what happened.  Thanks for the followup and thanks for contributing the code.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Paladin Brewer on March 07, 2009, 23:56:16 pm
So what happens if I try to install this with PHP 4.4.9? Anyway to get it to work?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 08, 2009, 18:20:45 pm
So what happens if I try to install this with PHP 4.4.9? Anyway to get it to work?

The basic version will work with PHP4.x.
In the newest version, you'll get a nice parser error and script death.  There's no way to get it to work in anything below version 5 as it is.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Hunter-nl on March 08, 2009, 19:55:06 pm
I don't have experience with "diff", maybe I'm interpreting wrong, let me know if I am.  I'm also pretty tired at the moment ;)

Code: [Select]
< //$shipping_rate_id = urlencode(__CLASS__."|UPS|".$value['ServiceName']."|".str_replace('&euro;','',$value['TotalCharges']));
< $shipping_rate_id = urlencode(__CLASS__."|UPS|".$value['ServiceName']."|".$value['TotalCharges']);
---
> $shipping_rate_id = urlencode(__CLASS__."|UPS|".$value['ServiceName']."|".str_replace('$','',$value['TotalCharges']));

So you are not stripping the euro symbol, but you are stripping any dollar sign from the TotalCharges value?


Code: [Select]
<     // UPS returns Charges in EUR.
<         // So we have to convert from EUR to Vendor Currency if necessary
<         if( $_SESSION['vendor_currency'] != "EUR" ) {

So UPS does return euro values now?  The documentation I read as well as the original module pointed to USD only.


No, I didn't strip anything. The $value['TotalCharges'] contains only the value without any currency sign. I changed the code a bit so the TotalCharges keeps all the time as value.
Code: [Select]
<                   //  $value['TotalCharges'] = $CURRENCY_DISPLAY->getFullValue($charge);
<                     $value['TotalCharges'] = $charge;
---
>                     $value['TotalCharges'] = $CURRENCY_DISPLAY->getFullValue($charge);
(multiple occurence)

And only when it's needed to display the value, then the currency will be added.
Code: [Select]
< $html .= "(<b>".$CURRENCY_DISPLAY->getFullValue($value['TotalCharges'])."</b>)";
---
> $html .= "<strong>(".$value['TotalCharges'].")</strong>";

In europe, UPS returns the values in EUR.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: headguru on March 08, 2009, 20:17:46 pm
Hi lowmips,

I have loaded your lastest version from 2/24/09 and was able to work through it.  (Newbie).  It has some great features and your work is greatly appreciated.

After entering the same UPS settings from before (XML Access)where it worked, but could not get over the 70lb thing.  I am now getting the following errors:

Error: Error processing the Request to UPS.com
Error: We could not find a UPS shipping rate. Please make sure you have entered a valid shipping address. Or choose a rate below.


When I run it in debug, I get the following:

Debug: Starting Shipping module: upsv2
Debug: class.Shipment::addPackage() Adding a new bundled package
Debug: upsv2::get_rates_array() using cached rate for country: US, zip code: 53059, weight:12.12,insurance:0 , and L/W/H of 0/0/0.
Error: Error processing the Request to UPS.com
Error: We could not find a UPS shipping rate. Please make sure you have entered a valid shipping address. Or choose a rate below.
Debug: The Shipping Module 'standard_shipping' couldn't
find a Shipping Rate that matches the current Checkout configuration:
Weight: 12
Country: USA
ZIP: 53059


Any help you could provide would be greatly appreciated.

Thanks

[attachment cleanup by admin]
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 08, 2009, 23:38:51 pm
Headguru:
It looks like there is a problem with the caching system. Try the following:

In upsv2.php, around like 535, comment out this:

Code: [Select]
if (isset($this->rate_cache[$this->dest_country][$this->dest_zip]["$weight"]["$insurance"]["$length"]["$width"]["$height"])) {
$vmLogger->debug("upsv2::get_rates_array()  using cached rate for country: $this->dest_country, zip code: $this->dest_zip, weight:$weight,insurance:$insurance , and L/W/H of $length/$width/$height.");
return $this->rate_cache[$this->dest_country][$this->dest_zip]["$weight"]["$insurance"]["$length"]["$width"]["$height"];
}

And let me know if that fixes it. Thanks.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 08, 2009, 23:40:35 pm
Hunter-nl:

Thanks for clearing that up. I'll work that into the code next week.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: headguru on March 09, 2009, 02:14:14 am
Reggie,

I attempted to comment that out and I got the following error when it calculated shipping.  All the template format disappeared, I had the shopping cart text and the error message:
Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in /home/homefood/public_html/administrator/components/com_virtuemart/classes/shipping/upsv2.php on line 542

I am fairly certain that this is because I commented it wrong, but take a look:

Code: [Select]
// TODO: find out if using an array with this many dimensions is a bad idea.
/*
if (isset($this->rate_cache[$this->dest_country][$this->dest_zip]["$weight"]["$insurance"]["$length"]["$width"]["$height"])) {
$vmLogger->debug("upsv2::get_rates_array()  using cached rate for country: $this->dest_country, zip code: $this->dest_zip, weight:$weight,insurance:$insurance , and L/W/H of $length/$width/$height.");
return $this->rate_cache[$this->dest_country][$this->dest_zip]["$weight"]["$insurance"]["$length"]["$width"]["$height"];
*/
}

$retRates = array();  // this will be returned
$resultsCount = 0; // number of rates returned that matched our list of accepted service types

Help!!!!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: wivelden on March 09, 2009, 06:41:37 am
I get errors with this on php versions 5.2.7 and above. All versions below this work fine.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: wivelden on March 09, 2009, 06:48:10 am
One more thing...using your latest version I tick show delivery days and it doesnt show them. It works with the USPS one I have but not this one.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 09, 2009, 13:34:19 pm
I get errors with this on php versions 5.2.7 and above. All versions below this work fine.

any specific errors?

Quote
One more thing...using your latest version I tick show delivery days and it doesnt show them. It works with the USPS one I have but not this one.
Delivery days are not always returned from UPS. It shows only what it gets.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: wivelden on March 09, 2009, 19:09:39 pm
PHP Version 5.2.7, 5.2.8 & 5.2.9:

Top of page before cart contents:

Quote
Notice: Undefined index: restriction_number in C:\wamp\www\administrator\components\com_virtuemart\classes\ps_product.php on line 1105

Notice: Undefined index: restriction_number in C:\wamp\www\administrator\components\com_virtuemart\classes\ps_product.php on line 1114

Below please select shipping method:

Quote
Notice: Use of undefined constant PSHOP_USE_LWH - assumed 'PSHOP_USE_LWH' in C:\wamp\www\administrator\components\com_virtuemart\classes\shipping\upsv2.php on line 177

Notice: Undefined property: upsv2::$useLWH in C:\wamp\www\administrator\components\com_virtuemart\classes\shipping\upsv2.php on line 376

Notice: Undefined index: BillingWeight in C:\wamp\www\administrator\components\com_virtuemart\classes\shipping\class.Shipment.php on line 181

Notice: Undefined index: TransportationCharges in C:\wamp\www\administrator\components\com_virtuemart\classes\shipping\class.Shipment.php on line 182

Notice: Undefined index: ServiceOptionCharges in C:\wamp\www\administrator\components\com_virtuemart\classes\shipping\class.Shipment.php on line 183

Notice: Undefined index: ServiceOptionCharges in C:\wamp\www\administrator\components\com_virtuemart\classes\shipping\class.Shipment.php on line 183

Notice: Undefined index: TotalCharges in C:\wamp\www\administrator\components\com_virtuemart\classes\shipping\class.Shipment.php on line 207

Notice: Undefined index: BillingWeight in C:\wamp\www\administrator\components\com_virtuemart\classes\shipping\class.Shipment.php on line 181

Notice: Undefined index: TransportationCharges in C:\wamp\www\administrator\components\com_virtuemart\classes\shipping\class.Shipment.php on line 182

Notice: Undefined index: ServiceOptionCharges in C:\wamp\www\administrator\components\com_virtuemart\classes\shipping\class.Shipment.php on line 183

Notice: Undefined index: ServiceOptionCharges in C:\wamp\www\administrator\components\com_virtuemart\classes\shipping\class.Shipment.php on line 183

Notice: Undefined index: TotalCharges in C:\wamp\www\administrator\components\com_virtuemart\classes\shipping\class.Shipment.php on line 207

Notice: Undefined variable: html in C:\wamp\www\administrator\components\com_virtuemart\classes\shipping\upsv2.php on line 245
Then it returns the results.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 09, 2009, 19:19:06 pm
Those are not "errors" they are warnings (or "notices").  This shows up a lot in VM. You should set your PHP warnings to a less strict level (error_reporting in your PHP.ini). You have E_NOTICE turned on (or E_ALL).

Cleaner code would declare the variables before using them, and check array indices existance before attempting to use them, and would take longer to implement.  I have not done this simply because the original VM code does not do it either. (Lazy? Maybe =))

If someone would be willing to donate for a few hours of my time to make it nicer, I would be happy to clean it up some more. Otherwise, it will definitely be on my "TODO" list for when I'm not trying find work.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: wivelden on March 09, 2009, 22:20:42 pm
Thanks for the reply. Glad its nothing major. Turned off display errors.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 10, 2009, 05:00:07 am
Reggie,

I attempted to comment that out and I got the following error when it calculated shipping.  All the template format disappeared, I had the shopping cart text and the error message:
Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in /home/homefood/public_html/administrator/components/com_virtuemart/classes/shipping/upsv2.php on line 542

I am fairly certain that this is because I commented it wrong, but take a look:

Code: [Select]
// TODO: find out if using an array with this many dimensions is a bad idea.
/*
if (isset($this->rate_cache[$this->dest_country][$this->dest_zip]["$weight"]["$insurance"]["$length"]["$width"]["$height"])) {
$vmLogger->debug("upsv2::get_rates_array()  using cached rate for country: $this->dest_country, zip code: $this->dest_zip, weight:$weight,insurance:$insurance , and L/W/H of $length/$width/$height.");
return $this->rate_cache[$this->dest_country][$this->dest_zip]["$weight"]["$insurance"]["$length"]["$width"]["$height"];
*/
}

$retRates = array();  // this will be returned
$resultsCount = 0; // number of rates returned that matched our list of accepted service types

Help!!!!

You missed the closing bracket '}'
comment it out one more line down.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: headguru on March 10, 2009, 21:51:27 pm
Reggie,

I fixed the comment out.  See:
Code: [Select]
}

// check our cache to see if we've queried for this weight
// TODO: find out if using an array with this many dimensions is a bad idea.
/*
if (isset($this->rate_cache[$this->dest_country][$this->dest_zip]["$weight"]["$insurance"]["$length"]["$width"]["$height"])) {
$vmLogger->debug("upsv2::get_rates_array()  using cached rate for country: $this->dest_country, zip code: $this->dest_zip, weight:$weight,insurance:$insurance , and L/W/H of $length/$width/$height.");
return $this->rate_cache[$this->dest_country][$this->dest_zip]["$weight"]["$insurance"]["$length"]["$width"]["$height"];
}
*/

I am back to getting the following on the checkout page:

Please select a Shipping Method!
Error: Error processing the Request to UPS.com
Error: We could not find a UPS shipping rate. Please make sure you have entered a valid shipping address. Or choose a rate below.


When in debug, I get the following on the top of the page:

Debug: Using existing Session 84cbbefec6e4fadc0349f4c24348e0c5, ID: 32e8d25i6un7h0amov5f23cdo0.
Debug: calculating tax based on shipping address


On the bottom of the page:

Debug: Starting Shipping module: upsv2
Debug: class.Shipment::addPackage() Adding a new bundled package
Debug: Using the cURL library for communicating with www.ups.com


XML POST:
Code: [Select]
<?xml version="1.0"?><AccessRequest xml:lang="en-US"> <AccessLicenseNumber>1C3D8883C02521D8</AccessLicenseNumber> <UserId>XXXXXX</UserId> <Password>XXXXXXX</Password></AccessRequest><?xml version="1.0"?><RatingServiceSelectionRequest xml:lang="en-US"> <Request>  <TransactionReference>  <XpciVersion>1.0001</XpciVersion>  </TransactionReference>  <RequestAction>rate</RequestAction>  <RequestOption>shop</RequestOption> </Request> <PickupType>  <Code>01</Code> </PickupType> <Shipment>  <Shipper>   <Address>    <PostalCode>53059</PostalCode>    <CountryCode>US</CountryCode>   </Address>  </Shipper>  <ShipTo>   <Address>    <PostalCode>53059</PostalCode>    <CountryCode>US</CountryCode>    <ResidentialAddressIndicator/>   </Address>  </ShipTo>  <ShipFrom>   <Address>    <PostalCode>53059</PostalCode>    <CountryCode>US</CountryCode>   </Address>  </ShipFrom>  <Package>   <PackagingType>    <Code>00</Code>   </PackagingType>   <PackageWeight>    <UnitOfMeasurement>     <Code>LBS</Code>    </UnitOfMeasurement>    <Weight>12.12</Weight>   </PackageWeight>  </Package> </Shipment></RatingServiceSelectionRequest>
XXXXX = redacted user id and password

XML Result:
Code: [Select]
<?xml version="1.0"?><RatingServiceSelectionResponse><Response><TransactionReference><XpciVersion>1.0001</XpciVersion></TransactionReference><ResponseStatusCode>1</ResponseStatusCode><ResponseStatusDescription>Success</ResponseStatusDescription></Response><RatedShipment><Service><Code>03</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>13.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>11.68</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>11.68</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery></GuaranteedDaysToDelivery><ScheduledDeliveryTime></ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>11.68</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>11.68</MonetaryValue></TotalCharges><Weight>12.1</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>13.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>12</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>13.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>16.66</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>16.66</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>3</GuaranteedDaysToDelivery><ScheduledDeliveryTime></ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>16.66</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>16.66</MonetaryValue></TotalCharges><Weight>12.1</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>13.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>02</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>13.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>20.86</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>20.86</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>2</GuaranteedDaysToDelivery><ScheduledDeliveryTime></ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>20.86</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>20.86</MonetaryValue></TotalCharges><Weight>12.1</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>13.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>13</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>13.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>31.21</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>31.21</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery><ScheduledDeliveryTime></ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>31.21</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>31.21</MonetaryValue></TotalCharges><Weight>12.1</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>13.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>14</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>13.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>68.42</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>68.42</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery><ScheduledDeliveryTime>10:00 A.M.</ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>68.42</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>68.42</MonetaryValue></TotalCharges><Weight>12.1</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>13.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>01</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>13.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>36.64</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>36.64</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery><ScheduledDeliveryTime>12:00 Noon</ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>36.64</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>36.64</MonetaryValue></TotalCharges><Weight>12.1</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>13.0</Weight></BillingWeight></RatedPackage></RatedShipment></RatingServiceSelectionResponse>
I hate to be a pain in the A**, but this is still an issue.  Ideas?

Thanks Again,

Tom

Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 10, 2009, 22:28:00 pm
headguru:
It may be quicker to do a debug session on your live site than posting back and forth to each other.  PM me the URL/log in credentials if you want me to take a closer look.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: headguru on March 11, 2009, 00:02:12 am
Reggie,

You are the man.  I thank you so much for all of your help.  This is a fantastic app that you put together. 

Tom ;D
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 12, 2009, 00:25:23 am
Update 2009/3/11
- version vm_ups_v2.0_2009.03.11.zip
- added HAZMAT functionality (Thanks Scott from Opwdecks.com for underwriting this feature)
- cleaned up code dealing with showing shipping rates.  Should now work with Euro.  Thanks hunter-nl for tracking down and debugging this.  Please note I have *not* tested this code with Euro set as the shop currency.
- Added UPSv2 usage instructions back in to README.TXT!  I'm amazed no one has complained in the past 2 months that it has been missing (I traced how far back I forgot them!)

=)
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: romszone_com on March 17, 2009, 17:00:04 pm
This looks like a great update, I'm going to install it on try it out. Thanks for the hard work you put in to this project.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mastergle on March 18, 2009, 20:23:59 pm
Hi all
Just wanted to post a shameless plug for my Cart Rates (http://www.lowmips.com/joomla/software-shop-11.html) plugin.

This plugin allows you to show the UPS shipping rates in the cart itself, and also the lowest rate in the mini cart.  If the user is not logged in, the plugin requests the user to input their country and zip code in order to get the rates.  If the user is already logged in, it uses the user's current mailing address.

Thanks and enjoy!
-Reggie


Hi Reggie,

Could help me please get your Cart Rates plugin? How much are you selling it? Or, if you are OK with donation, please let me know.

I have a site that I'm currently working on, and I wanted to have this feature that would let customers enter their zip code and get an estimate shipping cost via UPS only. Please let me know your thoughts.


Thanks,

Mastergle
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 18, 2009, 20:26:20 pm
Hi,
The CartRates program is available on my website www.lowmips.com.  You can also follow the link in the original post.

Thanks for the interest!

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mastergle on March 18, 2009, 20:35:28 pm
Hi,
The CartRates program is available on my website www.lowmips.com.  You can also follow the link in the original post.

Thanks for the interest!

-Reggie


Hi Reggie,

I went there and added the product to the shopping cart, but I couldn't proceed to the checkout at all! It's like if the link to the shopping cart is taking me back to the software shop page. I'm not sure what's going on there. Please take a look and let me know.

Thanks,

Mastergle
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 18, 2009, 20:38:33 pm
Hmm. Not sure what's going on there. If you'd like to just send paypal payment to reggie@lowmips.com I will email you a copy.

Thanks,
Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mastergle on March 18, 2009, 20:39:27 pm
Did you sell this product to http://www.opwdecks.com ? If so, how did he proceed to the payment?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 18, 2009, 20:40:49 pm
By the way, which version of UPSv2 are you using? If it is the latest, I've updated the CartRates program for that version.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mastergle on March 18, 2009, 20:42:52 pm
Hmm. Not sure what's going on there. If you'd like to just send paypal payment to reggie@lowmips.com I will email you a copy.

Thanks,
Reggie

Hi Reggie,

Unfortunately, I don't have a paypal account. I'm not sure what you want me to do now. I can go ahead and open up a new account with paypal, but I'm not very familiar with the process at all. If you could guide me though, that would be great ;)


Thanks,

Mastergle
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mastergle on March 18, 2009, 20:44:12 pm
By the way, which version of UPSv2 are you using? If it is the latest, I've updated the CartRates program for that version.

I haven't used any of the version yet. But I'm opting for the latest version.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mastergle on March 18, 2009, 20:46:38 pm
Let me ask you a quick question: does your latest UPSv2 version include a shipping cost estimator based on the zip code as well?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 18, 2009, 20:50:59 pm
Mastergle,
PM me your email address and we'll work something out, thanks.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mastergle on March 18, 2009, 20:57:01 pm
Mastergle,
PM me your email address and we'll work something out, thanks.

Reggie

Here's my email address: mastergle2002@gmail.com

Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 18, 2009, 21:11:20 pm
Ah...my new theme is covering up the "Show Cart" button.  I'll have to fix that!
And SEF wasn't playing nice with VM. I've turned it off for VM.


Hi,
The CartRates program is available on my website www.lowmips.com.  You can also follow the link in the original post.

Thanks for the interest!

-Reggie


Hi Reggie,

I went there and added the product to the shopping cart, but I couldn't proceed to the checkout at all! It's like if the link to the shopping cart is taking me back to the software shop page. I'm not sure what's going on there. Please take a look and let me know.

Thanks,

Mastergle
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: headguru on April 20, 2009, 03:13:09 am
Hello Reggie,

First, I wanted to let you know this module is kicking *ss. ;D

I do have a request/question.  Is it possible to set up a "handling fee" up to a specific dollar amount? 

Example:  A $5 handling fee for orders under $40. (not including shipping)  Orders $40 and above would not have a handling fee.

Thanks Much,

Tom
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on April 20, 2009, 15:11:30 pm
That would require a bit more customization...it cannot handle multiple handling fees as is.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: george.ohler on April 24, 2009, 14:46:39 pm
First of all, thank you for the contribution you've made to VirtueMart by developing this module. 

I have a few questions about some of the features/options you can enable on the module and whether they work or it is something I am doing wrong...

Under the shipping module configuration there are 3 checkbox options:

Show Delivery Days Quote?      
Show Delivery ETA Quote?      
Show Delivery Warning?

From the tooltip it would appear to me that these options would give additional text info regarding each shipping method at the page where the customer selects their shipping method, IE: UPS Ground (7-10 days blah blah blah).

However enabling these options does not provide with any additional info to the customer when they do select their shipping method.

My question is, am I correct in assuming that this is what those module options are intended to do, and if so, why are they not displaying?

OR

Are they meant to display somewhere else (I have not tested a transaction from start to confirm), such as in the order e-mail?

Thanks
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on April 24, 2009, 14:54:36 pm
These options are intended to display exactly what they describe.

However, they only display this information when it is returned from the UPS query, and  I have never seen this information returned!  This was something included in the original UPS module, and my module was built based on that...I'm guessing that UPS originally did return this info, but stopped at some point.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on April 24, 2009, 16:47:35 pm
Update 2009/4/22
- version vm_ups_v2.0_2009.04.22.zip
- Additional handling fee functionality.  Two different handling fees allowed, based on total order value
- Thanks to Tom from homefoodgourmet.com for underwriting this feature!

========================================
    Handling Fees
========================================
To set a basic handling fee, enter it in the "Handling Fee" input box.  All orders will have this fee by default.
To set a different handling fee on higher value orders, set the price in the "Handling Fee 2" input box, then
enter the minimum order amount for the fee to apply in the next line.  For example, if you wish to have a
$5 handling fee on all orders under $50, and no handling fee for orders $50 and above, set the fees as following:
Handling Fee: $5
Handling Fee 2: $0
Handling Fee 2 Mimimum Order Amount: $50



Future Updates:
I would like to change the handling fee function to allow for any number of handling fees for any number of total order ranges.  If anyone would like to underwrite this update, please contact me.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: rdhinman on April 28, 2009, 17:42:58 pm
How do you deal with multiple box weights? 

Example: A customer orders 5 items that don't fit in one box.  Because there is a second box, the total weight would be higher than the combined weight of the 5 items.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on April 28, 2009, 21:04:39 pm
Good question =)

You'll need to use some combination of bundled, unbundled, and max-per-box settings to accomplish what you need to do. Once a box is full, the next box will be filled with the remaining products (or create more boxes if it is full).

 Without more specific information about the products and your setup, that's all the advice I can give.

I wish I had an open-source box stuffing algorithm to handle this, but I've yet to find one.

I also have considered implementing a shipping-relation mechanism which would allow you to specify which items can be shipped together, but have never received enough interest (or funding!) to give it any further thought.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on May 12, 2009, 21:08:51 pm
I have released my "Cart Rates" Joomla plugin under the GPL.  Navigate to the download page on my website (http://www.lowmips.com) in order to obtain a copy.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: rudy84 on May 14, 2009, 03:06:27 am
A basic question about updating database. How to update the 'upsv2.sql' to php my admin. Or if to insert table & column manually, please reply with very specific instruction. Because the readme file is not telly instruction.

I'm noob. Thanks & appreciate any help.

Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on May 14, 2009, 17:35:08 pm
Rudy,
The easiest way would be to log in to phpMyAdmin and select your Joomla database.  Then, select the "SQL" button on the top left.  Copy and paste everything from the upsv2.sql file into the window that pops up and click "Go".

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: quickturn on May 28, 2009, 20:09:45 pm
The Cartrates functionality is fantastic but I still can't figure out hot to move the shipping estimator up under the product line item display. it is always under the checkout button. I tried to do that attach to and "cartrates" thing but couldn't figure it out.

Can someone explain this to me like I'm a 5 year old?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on May 28, 2009, 21:17:10 pm
Hi quickturn,
Basically you'll need to add an empty xml element to your template, and reference that element in the cartrates setup ("Attach to").

In the example provided, i used a <cartrates /> element in the basket_b2c.html.php file.  That should place the cartrates output just under the last order total line.  If you need it in another position, you may need to place the element in a different file.  I don't have my VirtueMart code in front of me to find the location you're looking for.  If you need more help PM me and I'll check it out later.

Hope this clears it up!
-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mcpilot on May 29, 2009, 14:33:11 pm
I Just installed the upsv2 for VM 1.1.3. The server is running PHP5.

The install seemed fine, and I do see shipping options in the product update area where I can set the number of products per package.

However, in the "list shipping modules" section of the store, I can't enable the upsv2 method. When I click to configure, I get this: "Cannot instantiate class upsv2.php"

Any idea why I might be getting that error?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on May 29, 2009, 15:49:43 pm
Check your server logs. That would be where I would start.  It sounds like a possible PHP/server issue.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on May 29, 2009, 17:50:15 pm
************ BUGFIX **************

Update 2009/5/28
- version vm_ups_v2.0_2009.05.28.zip
- fixed a bug where product weights in units other than lbs/kg were not converted correctly

Symptom: Very high shipping prices for very light items.

The issue manifest itself when products were defined in small weight units, such as oz.  The ps_product::get_weight() function I was using simply retrieved the numerical weight from the product table, which then was assumed to be lbs.  The ps_shipping_method::get_weight() function corrects this as it considers the unit of measure and correctly converts to lbs/kgs.


If you are running version 2009.4.22, simply replace these files:
\joomla\administrator\components\com_virtuemart\classes\shipping\upsv2.ini
\joomla\administrator\components\com_virtuemart\classes\shipping\class.Package.php
\joomla\administrator\components\com_virtuemart\classes\shipping\class.Shipment.php

For all versions previous to 2009.4.22, please do a full install.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: ljtimmyb on June 15, 2009, 09:16:28 am
When I go in the admin section to shopping and wanna add a shipper, i get a blank page, no 404, but a white blank page. I also get the errorcode 250003 when I try to checkout... Help??

Mail me please: tim@ljtimmyb.be

Thx!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on June 15, 2009, 15:48:50 pm
Hi,
"shippers" are not part of the UPSv2 module. Please post your question in the main shipping forum.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on June 23, 2009, 22:21:19 pm
I was wondering if you could help me troubleshoot a problem I am having with this module. I just installed the latest version.

After I add a product to my cart and proceed to checkout to selecting a shipping option(step 2 of 4) I receive these errors:

[Notice: We are unable to ship UPS as an error occured. Please select another shipping method.]

[Notice: The error was: class.Shipment::addItem() max_per_package for pid 19 was 0!upsv2::create_shipment() Error adding product pid 19 to the shipment.]

I understand that 'pid 19' is referring to the item I added to my cart but I do not understand how to solve this problem. My fedex shipping process is working but I really need ups to be up and running. Thank you so much for any of your help.

max_per_package has been set to zero, so you've effectively allowed NONE of that item to be shipped.  Go into that particular product's setup page, and set the maximum per package to a number higher than zero.  The default was something like 99999.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on June 23, 2009, 22:22:42 pm
ps. I believe pid=19 will correspond to the "Id" on the Product list page (last column in that table).
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: soundoholic on June 25, 2009, 21:50:34 pm
Thanks for your help lowmips! It ended up being a problem with my account number. I was told the wrong xml # so it obviously wouldn't work. Easy fix!

I'm just having a hard time with the prices not matching up with what they should be. A 9 pound package from 57717 to 80120 should have a ground shipping charge of 8.76 and a 2 day of 44.89. I'm getting about half of that.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: waywardnite on June 26, 2009, 15:17:32 pm
This module has been just what we were looking for so far, but we are having one major glitch. I wanted to test what would happen if a customer outside the US placed an order as we are hoping to get many international customers. When using an address from London I got the following error when being routed to the shipping area in checkout after entering the address.

Code: [Select]
Fatal error: Call to a member function f() on a non-object in /homepages/11/d289064064/htdocs/autohaus/administrator/components/com_virtuemart/classes/shipping/upsv2.php on line 120
Any help would be greatly appreciated:)
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on June 26, 2009, 15:23:09 pm
There's a typo on that line. I'm surprised this hasn't come up before.
PM me your email address and I'll send you an updated file to test.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: waywardnite on June 26, 2009, 15:43:31 pm
Thanks Reggie. All fixed! That was the quickest reply and fix I've ever received on a script. Just amazing thanks so much:)
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on June 26, 2009, 15:48:12 pm
No problem.  You caught me just as I was finishing my coffee, and checking email.

=)

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on June 26, 2009, 15:50:35 pm
****BUGFIX*****

Update 2009/6/26
- version vm_ups_v2.0_2009.06.26.zip
- fixed a typo bug in the international shipping code which resulted in a fatal error
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: quickturn on June 29, 2009, 20:16:02 pm
Reggie - first of all, thanks again for this fantastic contribution. Any chance you'll be able to get the Scheduled ETA or Days Quotes option to work with 2.0 and the Shipping Estimator? Since I've upgraded to 2.0 and installed the estimator, the Scheduled ETA option no longers works. I made sure to check it in 2.0's config.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on June 29, 2009, 20:41:36 pm
Hi quickturn,
The UPSv2 module shows all returned ETA estimates. However, I have not seen them returned from the online API in many months. I've been asked this on several occasions and have checked the returned XML data manually. They just aren't being returned.

When did you install the v2 module?

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: quickturn on July 01, 2009, 21:16:13 pm
I just installed it a couple of weeks ago.

Tt works GREAT by the way. The Shipping Estimator is a life saver.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 01, 2009, 21:27:20 pm
There has been no major change to the XML data being sent, just a few tweaks. So, I always assumed that the problem is on UPS's end. If I get free time or an underwriter to pay for some time, I'll compare the v1.0 vs my v2.0 and see if I can figure it out.

Glad you like the shipping estimator.  It was formerly a commercial plugin, but I recently released it under the GPL, hoping to drive more traffic to my website. If possible, please consider a donation!

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: soundoholic on July 02, 2009, 00:23:59 am
Is their a way to add a separate fee for international orders?

Thanks,
Chris
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 02, 2009, 00:41:37 am
Not as it stands now.  The fees are applied to all orders.

-Reggie
Title: UPSv2.0 Update
Post by: lowmips on July 02, 2009, 17:45:24 pm
Update 2009/7/02
- version vm_ups_v2.0_2009.07.02.zip
- Added new tabs in the module configuration.
- "Usage" tab shows UPSv2 feature usage
- "Donation" tab lists recent donators and their websites
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: headguru on July 03, 2009, 18:42:16 pm
Hi Reggie,

I updated the your latest version and I get the following when I attempt to go into your module configuration:
/home/greenho1/public_html/administrator/components/com_virtuemart/classes/shipping/upsv2.cfg.php :: Writeable
Shipping Module Configuration: upsv2.php

Fatal error: upsv2::require_once() [function.require]: Failed opening required '/home/greenho1/public_html/administrator/components/com_virtuemart/classes/shipping/upsv2/upsv2.config.tmpl.php' (include_path='.:/usr/local/php52/pear') in /home/greenho1/public_html/administrator/components/com_virtuemart/classes/shipping/upsv2.php on line 997

It seems that everything is working in the store on the front end for processing orders.

Any Ideas?

Thanks,

Tom
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 03, 2009, 19:11:22 pm
Hi Reggie,

I updated the your latest version and I get the following when I attempt to go into your module configuration:
/home/greenho1/public_html/administrator/components/com_virtuemart/classes/shipping/upsv2.cfg.php :: Writeable
Shipping Module Configuration: upsv2.php

Fatal error: upsv2::require_once() [function.require]: Failed opening required '/home/greenho1/public_html/administrator/components/com_virtuemart/classes/shipping/upsv2/upsv2.config.tmpl.php' (include_path='.:/usr/local/php52/pear') in /home/greenho1/public_html/administrator/components/com_virtuemart/classes/shipping/upsv2.php on line 997

It seems that everything is working in the store on the front end for processing orders.

Any Ideas?

Thanks,

Tom

Does that file exist (upsv2.config.tmpl.php), and is it in the proper directory (/home/greenho1/public_html/administrator/components/com_virtuemart/classes/shipping/upsv2/), and does it have the proper access rights?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: headguru on July 03, 2009, 20:10:01 pm
I think I figured it out.  I just updated Joomla from 1.5.10 to 1.5.12.  That changed something.  I did a new reload of the UPS v2.0 and it is working fine now.  Sorry    :-[
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 06, 2009, 19:20:40 pm
*** ATTENTION Saumya ***

I received your message about the UPSv2 module via my lowmips.com message system, however the email address you entered bounced! Maybe a typo? Please PM your email address to me.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: waywardnite on July 07, 2009, 15:52:06 pm
Hi,

I think I finally have almost everything worked out. The last problem I have left is a very strange error in IE. It seems to only occur after the shopping cart step while checking out. I get an error at line 3 and character 1.

The reason I'm asking here is that this seems to have something to do with the core vm files that were edited in the upsv2 module. When I installed it I noticed it changed my (submit) buttons on those pages but didn't notice any error as I use firefox for development. Now that I'm testing I found that that error pops up in IE. Any idea how i can fix it? I'm really stumped on this one. Thanks in advance.

Site url; http://autohausaccessories.com/index.php
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 07, 2009, 16:04:52 pm
waywardnite, see your PM inbox.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: d3vlabs on July 10, 2009, 06:10:50 am
how do i get it show up in shipping methods:

http://raymondsfurniturestore.com/index.php

i have the module enabled and configuration saved.
it also shows up under shipper.
do i need to assign a shipping rate? well wouldnt that defeat the purpose of calculated shipping?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 10, 2009, 14:21:49 pm
how do i get it show up in shipping methods:

http://raymondsfurniturestore.com/index.php

i have the module enabled and configuration saved.
it also shows up under shipper.
do i need to assign a shipping rate? well wouldnt that defeat the purpose of calculated shipping?

d3vlabs,
Did you select any service types?  If you're still having issues, put your website into debug mode and run through a checkout again. Maybe there's another issue.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: FinallyInSeattle on July 11, 2009, 19:01:42 pm
Hi!  I just started reading through the posts on the UPS side of the board since it appears that I have to switch from Fedex due to their limits on "declared value" on certain types of shipments.

I require a signature on shipments above a certain dollar amount for protection against chargebacks.  Due to this, I want the customer to be able to select "Hold for Pickup" or "Saturday Delivery" as options when they check out.  Are these features available in your module?

Thanks in advance!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 11, 2009, 20:01:01 pm
No, these options are not in the module.  If you'd like to underwrite these additions, contact me via PM or email.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 14, 2009, 15:42:53 pm
Update 2009/7/14
- version vm_ups_v2.0_2009.07.10.zip
- freight shipping option. ignore freight items during shipping calculations, show notices and images in various locations.
- thanks to Stephen from www.pacificenviro.com for underwriting this feature!
- bugfix: very small weight items cause UPS to return an error. Thanks Chris from www.KeysCreekLavenderFarm.com for finding this and helping me test the fix
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 26, 2009, 23:50:12 pm
Hi all,
I have someone interested in having me implement a per-product zip code override.  This person drop ships several items from different locations.  Unfortunately, he could not underwrite the feature entirely by himself.  If anyone else is interested in having this feature developed, please contact me with the amount you're willing to contribute.

Thanks,
Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Saturday Morning Comics! on August 09, 2009, 08:17:46 am
Hi Lowmips or anyone who has dealt with this error. I have gotten a couple of errors that I haven't been able to find in the posts ... if I missed them, I apologize (please direct me to the post).

Notice: We are unable to ship UPS as an error occured. Please select another shipping method.

Notice: The error was: class.Shipment::addItem() max_per_package for pid 17 was 0!upsv2::create_shipment() Error adding product pid 17 to the shipment.


The weight if the item is 14.9 oz, and I am using the latest ver. of your module.

Here is what the debugging came up with:

Debug: ERROR: class.Shipment::addItem() max_per_package for pid 17 was 0!

Debug: upsv2::create_shipment() Error adding product pid 17 to the shipment!

XML Post:
http://production.shippingapis.com/ShippingAPI.dll/ShippingAPI.dll?API=RateV3&XML=<RateV3Request USERID="xxxx" PASSWORD="xxxx"><Package ID="0"><Service>All</Service><ZipOrigination>92871</ZipOrigination><ZipDestination>92870</ZipDestination><Pounds>0</Pounds><Ounces>16</Ounces><Size>REGULAR</Size><Machinable>FALSE</Machinable></Package></RateV3Reques

XML Result:
<RateV3Response><Package ID="0"><ZipOrigination>92871</ZipOrigination><ZipDestination>92870</ZipDestination><Pounds>0</Pounds><Ounces>16</Ounces><Size>REGULAR</Size><Machinable>FALSE</Machinable><Zone>1</Zone><Postage CLASSID="3"><MailService>Express Mail</MailService><Rate>15.00</Rate></Postage><Postage CLASSID="13"><MailService>Express Mail Flat-Rate Envelope</MailService><Rate>17.50</Rate></Postage><Postage CLASSID="1"><MailService>Priority Mail</MailService><Rate>4.95</Rate></Postage><Postage CLASSID="16"><MailService>Priority Mail Flat-Rate Envelope</MailService><Rate>4.95</Rate></Postage><Postage CLASSID="28"><MailService>Priority Mail Small Flat-Rate Box</MailService><Rate>4.95</Rate></Postage><Postage CLASSID="17"><MailService>Priority Mail Regular/Medium Flat-Rate Boxes</MailService><Rate>10.35</Rate></Postage><Postage CLASSID="22"><MailService>Priority Mail Large Flat-Rate Box</MailService><Rate>13.95</Rate></Postage><Postage CLASSID="4"><MailService>Parcel Post</MailService><Rate>4.90</Rate></Postage><Postage CLASSID="5"><MailService>Bound Printed Matter</MailService><Rate>2.33</Rate></Postage><Postage CLASSID="6"><MailService>Media Mail</MailService><Rate>2.38</Rate></Postage><Postage CLASSID="7"><MailService>Library Mail</MailService><Rate>2.26</Rate></Postage></Package></RateV3Response>

I went into the product and tried to change the Max #, and it would never save ... it kept defaulting back to unfilled areas.
Any help is appreciated.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on August 09, 2009, 15:53:49 pm
Product ID 17 is set to have ZERO per package.  It can never be shipped. You should change it to 1 or more in the max per package setting.  So you had the right idea.  Sounds like maybe a SQL issue. Make sure you've made all the SQL updates listed in upsv2.sql file.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Saturday Morning Comics! on August 12, 2009, 01:21:09 am
Silly question ... but where is the sql file located to edit? I have been unsuccessful in finding it. Thanks for all your help.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on August 12, 2009, 01:22:51 am
it's in the root directory of the archive.
look for a file called upsv2.sql
-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Saturday Morning Comics! on August 14, 2009, 08:55:33 am
Thank you for all our help!!! The module is now functional and has no errors ... however only 2nd Day air is showing up and I have a lot of options selected.

Here is the debug:
Debug: Starting Shipping module: upsv2
Debug: Source zip was set to override: ->92870<-
Debug: class.Shipment::addPackage() Adding a new bundled package
Debug: upsv2::get_rates_array() using cached rate for country: US, zip code: 92870, weight:1.969875,insurance:0 , and L/W/H of 0/0/0.
Debug: upsv2::modify_rates() Adding handling fee 1


Thanks again for the assist ... I will also attach this to my other post (just in case).
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on August 14, 2009, 14:27:20 pm
is the xml request/reply available in the debug message? post those here (remove your username/password though).

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Saturday Morning Comics! on August 15, 2009, 05:42:13 am
Ok, I actually found a workaround. I am a currently a home-run business, and don't need to have UPS pickup. So I chose Letter Center, thinking it meant a UPS Store. With that option it only gave me 1 shipping method; 2nd Day Air. After my above post, I decided to play around with the settings and log out each time. When I changed it to Customer Counter or No Pickup type, it actually gave me 3 options I was wanting; Ground, 2nd Day Air, and 3 day select.

Lowmips, could you elaborate on these settings and the delivery methods are determined by them? The only other ones I would probably want access to would be Standard and Express Saver.

Thanks Again.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on August 15, 2009, 22:32:44 pm
First of all, you posted your username and password in the XML.  I again advise you to remove those!

Now, the settings allow you to choose which services you want to offer.  Just because you "enable" any service does not mean it will show up! Basically, it is saying "if this option is returned in the xml reply, I want to show it to the user".  So depending on your delivery type, package type, and other factors, you'll get varying results.  Most users leave it at "no pickup" to get the most general services returned.

As for which pickup type offers which services, you'd need to go to UPS's website and look them up.  I don't have that matrix in any handy form.  UPS stores most likely vary on their offered services.  They *definitely* vary on price!

Hope this helps.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Saturday Morning Comics! on August 15, 2009, 22:54:13 pm
It definitely does! Thank you for the info and your time.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: headguru on August 17, 2009, 03:06:50 am
Hi Reggie,

Have you incorporated Aravot's "IE7 Abort Fix" into your version of ps_config.php?

See posting at:  http://forum.virtuemart.net/index.php?topic=51089.0 (http://forum.virtuemart.net/index.php?topic=51089.0)

Thanks,

Tom
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on August 17, 2009, 03:23:38 am
Hi Tom,
I'll look into it when I get some time.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: headguru on September 01, 2009, 14:29:55 pm
Hi all,
I have someone interested in having me implement a per-product zip code override.  This person drop ships several items from different locations.  Unfortunately, he could not underwrite the feature entirely by himself.  If anyone else is interested in having this feature developed, please contact me with the amount you're willing to contribute.

Thanks,
Reggie
Hi Reggie,
A couple of questions for you.
1) Have you had any responses to this query and do you have an idea of the underwriting costs for this feature?
2)  If you were going to use any other shopping cart solution in Joomla, what would be your choice and why?

Thanks,

Tom
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on September 01, 2009, 14:36:02 pm
1) I have had some others interested, but no solid backers.  I do however have a client interested in implementing a similar feature, shipping "from the manufacturer".  The manufacturer will have additional information provided, namely the zip code.  Sort of like the zip override but not as flexible.

2) I currently have no experience with any other shopping carts.  I researched several when I started, and VM seemed to be the most hackable (customizable sense of the word, not security).
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: soundoholic on September 03, 2009, 18:21:54 pm
I have v2.0.2009.05.28. Does the latest version allow for you to make a separate fee for international orders?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on September 03, 2009, 18:30:06 pm
The full feature list is in the first post. And no, there is currently no separate fee for international orders.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: soundoholic on September 03, 2009, 18:35:44 pm
The full feature list is in the first post. And no, there is currently no separate fee for international orders.

-Reggie

Thanks Reggie. I thought it said there was a section for each. Thanks for all of your help. You made a good product great.

chris
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on September 03, 2009, 18:38:17 pm
Nope, that is for package types.  You can define one package for domestic and one for international.  But if you'd like to add an international fee, we can talk. =)

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: VitalBodies on September 14, 2009, 18:07:45 pm
What is the latest on shipping from multiple vendors?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on September 14, 2009, 18:11:10 pm
Pending project approval, I will be adding a "ship from manufacturer" override feature today/tomorrow.  In the manufacturer setup page, there will be new input fields for country/state/zip.


Incidentally, I will also be adding an "additional service" feature which will show additional shipping prices for a customizable service name.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: VitalBodies on September 16, 2009, 18:51:31 pm
Pending project approval, I will be adding a "ship from manufacturer" override feature today/tomorrow.  In the manufacturer setup page, there will be new input fields for country/state/zip.


Incidentally, I will also be adding an "additional service" feature which will show additional shipping prices for a customizable service name.

Wow, sounds exciting! Really nice to see that you are moving this forward.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on September 16, 2009, 19:07:24 pm
Still waiting on approval from my client. This may take longer than I expected.  ;)
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: prodezign on September 24, 2009, 15:50:06 pm
First of all, thanks for all your hard work thus far on the UPS module. The addition of a "ship from manufacturer" option would be an outstanding feature. I will be more than happy to contribute funds to get this feature up and running. Let me know what I can do to help.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on September 24, 2009, 16:07:00 pm
The client I mentioned stopped responding to emails. Not sure why.  Everything was ready to go, just needed final confirmation.  If I clear my current project list and still do not hear from them, I'll start soliciting underwriters for the feature here in this post.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: pjwirth on September 24, 2009, 16:59:45 pm
So lets say I have a 200lb package.

Will this split it up into smaller ones so the correct shipping rate will be calculated?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on September 24, 2009, 17:03:40 pm
If the shipment is comprised of products that are set to "ship alone", then yes, it will be split up into several packages.
-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: seanklowe on September 24, 2009, 20:45:34 pm
Really interested in implementing this but have a question first.  My issue is that I have a client (similar to the flash drive guy) who has products which individually weigh a pound or 2, but the fulfillment center puts them in DIM weight boxes.  So if someone orders 1-2 it's one price, if they order 3-4 its another price, 5-12 another price, and then sells in increments of 12 which is at a per box price.  I set up the store to work indiv., case of 12, and case of 48 as child products to help the shipping issue.  My question is how to "bundle" 3-4 to equal one weight, and 5-12 another weight?  The way my UPS works now is it just increases weight per product added.  My question is, does your update fix that?  Or am I misunderstanding the bundle feature?  Thanks very much for your reply.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on September 24, 2009, 20:52:52 pm
the bundled/unbundled feature will allow you to set a "max per box" of a certain number items, however the shipping fee will be an actual fee queried from UPS, not a fee that you manually enter into a config somewhere.  Also, this will not cover your various prices for 1-2, 3-4, 5-12 items.  I think you might need a customized module for that.  There are some quantity-based modules out there.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: pjwirth on September 28, 2009, 19:21:20 pm
So lets say I have a 200lb package.

Will this split it up into smaller ones so the correct shipping rate will be calculated?
If the shipment is comprised of products that are set to "ship alone", then yes, it will be split up into several packages.
-Reggie

So if I have one product that weights 200lbs in a cart. It will be split up? Or will this only split it up if the total weight of the sum of all products is over 200.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on September 28, 2009, 19:30:25 pm
No. It will not "split up" products, only "Packages" containing products.
If you have a 200lb product, you cannot ship it normally via UPS, as it exceeds the weight limit. If you have 8 25lb products, yes the module can then split the order into separate packages.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: pjwirth on September 29, 2009, 18:10:42 pm
I am curious if anyone has implemented the vm_upsv2.0.zip alongside the custom attributes extended hack in VM 1.1.2?

Anyone have suggestions before I dive into it?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: rjwatkins83 on September 29, 2009, 20:13:59 pm
The option to choose UPS Shipping wasn't showing up on the front end and I've worked through some of the problems with things I've found on the board.  I've configured my UPS module, added the correct XML access code, and made sure I entered weights for my products (that's one I forgot to do at first!).

Now when I get to the Please Select a Shipping Method screen, I get 2 error messages:

Error: The requested URL returned error: 404
Error: Internal Error processing the Request to UPS.com

I put it in debug mode, and above the error messages it added:

Debug: Starting Shipping module: ups
Debug: Using the cURL library for communicating with www.ups.com

This same things happens both when I use the old UPS module and the new one (the basic version that can be used with PHP 4.X).

If someone could help that would be great - maybe I missed a step or there's a hack I need to download...?  I am using Virtuemart 1.1.3 on Joomla 1.5 if that info helps!  I'v ebeen at this for a while, and I just can't figure out what I could be doing wrong, it might be somethign simple but so far I haven't gotten any suggestions. 

Thanks!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on September 29, 2009, 20:30:29 pm
Is your UPS URL set to:
https://www.ups.com:443/ups.app/xml/Rate
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: rjwatkins83 on September 29, 2009, 20:42:16 pm
Yes it is for the UPS v.20 module.  I didn't see an option to change it in the first module.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on October 02, 2009, 02:29:32 am
Update 2009/7/14
- version vm_ups_v2.0_2009.10.01.zip
- added additional shipping restriction mechanism: zip code ranges
- thanks Scott from http://www.opwdecks.com/ for underwriting this update!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on October 04, 2009, 00:18:43 am
Update 2009/10/01
***BUGFIX***
- please re-download version vm_ups_v2.0_2009.10.01.zip
- fixed "unable to select rates from other shipping modules" bug
- When using firefox, UPSv2, and other shipping modules, Firefox will interpret html label tags in a very strange way. Removed all label tags in rate selection radio list
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: headguru on October 29, 2009, 01:49:49 am
Hello Reggie,

How is it goin?   ;D

I got a little issue goin on here and am hoping you can help.

I updated with your last version and had a little problem.  In the product detail area in the area where your stuff is supposed to be like shipping modifier, max per box, etc...  Those items are not there.  The data is there when you save and Virtuemart gives you that one page view of the product you just entered or updated.

I also got an error when importing the upsv2.sql.  I received the following message:

Error
SQL query:

/* * Version 2009.07.10 * Reggie Campbell * * TODO: Make this SQL smarter * */ ALTER TABLE `jos_vm_product` ADD COLUMN `ship_alone` CHAR( 1 ) NOT NULL DEFAULT 'N' AFTER `ship_code_id` ;

MySQL said: 

#1060 - Duplicate column name 'ship_alone'


Any ideas?

Let me know.

Thanks,

Tom
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on October 29, 2009, 02:47:10 am
The SQL I wrote is not "smart enough" to understand which columns already exist.  YOu'll need to skip the ones that are already there and just use the new columns.

Some day, my SQL-fu will be good enough to do this in the SQL itself.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: headguru on October 29, 2009, 04:04:55 am
Reggie,

Does it just skip that and keep going, or do I need to do something more with the SQL import?

Secondly, the first part of my problem:
I updated with your last version and had a little problem.  In the product detail area in the area where your stuff is supposed to be like shipping modifier, max per box, etc...  Those items are not there.  The data is there when you save and Virtuemart gives you that one page view of the product you just entered or updated.
Actually it is the input fields that are missing for the shipping modifier, max per box etc...  Any ideas?

Thanks,
Tom
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on October 29, 2009, 13:33:16 pm
Quote
Does it just skip that and keep going, or do I need to do something more with the SQL import?
It probably bombed right after that.  You'll need to import it line by line, copy-paste each line to see if it works. I.E., don't use the "import" feature in phpmyadmin..use the SQL Query tool.

Quote
Secondly, the first part of my problem:
Try re-copying the files over...sounds like it may be missing product.product_form.php.  

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: bulesz on October 31, 2009, 19:25:37 pm
Hello,

This hack is impossible to make alive without knowing what is the
"UPS access code" ??

Could you explain?

Many thanks,
B.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on October 31, 2009, 19:28:31 pm
When you sign up for UPS Online Tools, you are given:
User ID
User Password
XML Access code

You must plug these into the module for it to work.
-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: bulesz on October 31, 2009, 19:31:40 pm
Thanks for the quick answer!

Is there possible with your hack to make free shipping over x total value of the order? but the express option still there?
I mean over 99USD free shipping, but there is an option if you need expresss delivery then it cost X. ?

Thanks,
B.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on October 31, 2009, 19:34:19 pm
Yes, in the admin configuration "shipping" tab enter the appropriate amount under "Enable Free Shipping for orders equal to or greater than".  Then also check "Restrict free shipping to basic ground services".

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: bulesz on October 31, 2009, 19:37:09 pm
OH! I mentioned about the USPS module! ?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on November 04, 2009, 03:44:58 am
Update 2009/11/03
- two versions released:

- version vm_ups_v2.0_2009.10.19.zip
- option to query shipping rates using manufacturer's address
- option to offer an "additional service" when displaying shipping rate choices

- version vm_ups_v2.0_2009.10.25.zip
- use with VirtueMart 1.1.4
- this is like version 2009.10.19, but ported to VM1.1.4
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: airkewld on November 14, 2009, 19:33:34 pm
Works great! You can see it here on my website:

www.opwdecks.com

Just add a product to cart and then view cart to see how this works.

Hey Scott, Love the site. I have also downloaded this plug in but I can not get it to show up on the site. Any way to see some screen shots of how you set it up?  you can email me at pete@airkewld.com
Of if Reggie can, that would be great as well.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on November 16, 2009, 04:40:02 am
Did you get it to work?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: VitalBodies on November 16, 2009, 19:46:41 pm
Hi all,
I have someone interested in having me implement a per-product zip code override.  This person drop ships several items from different locations.  Unfortunately, he could not underwrite the feature entirely by himself.  If anyone else is interested in having this feature developed, please contact me with the amount you're willing to contribute.

Thanks,
Reggie

Any news on shipping form multiple manufacturers? Does this announcement mean that you have added the feature?
http://www.lowmips.com/joomla/component/idoblog/viewpost/32
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on November 16, 2009, 20:02:19 pm
That's correct.  You can now have each product's shipping rates queried from the manufacturer's address.  The manufacturer config has been updated to include address information.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: VitalBodies on November 16, 2009, 20:12:39 pm
Wow, radical! That is just so cool!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: righteye on November 20, 2009, 20:49:26 pm
I've tried searching for this... not having much luck. I am running Virtuemart 1.14 and have attempted to upload the UPS v2.0 10.25.09. I ran the SQL script - I see the Shipper Restrictions but am getting "Error: Function Not Registered. restrictionadd is not a valid VirtueMart function." When I try to add something. Is this a database issue? Thanks for any help.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on November 20, 2009, 20:56:35 pm
Yes, sounds like a database issue.  Try running each SQL command individually.  If anything bombs, you should get a nice error message to relay here.  Run through each line before reporting back though. You will obviously get errors on the lines that have already successfully completed.

It is probably bombing somewhere before lines 34-37, which insert the proper function permissions into your function table.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: VitalBodies on November 21, 2009, 03:21:44 am
That's correct.  You can now have each product's shipping rates queried from the manufacturer's address.  The manufacturer config has been updated to include address information.

-Reggie

I could not wait to try this this new updated version.
I am new to your UPS component but thankful that you are working on VirtueMart.
I installed the update and updated the SQL.
I am getting errors - likely to be something minor - new at this...
ERROR MESSAGE:
Error: UPS was not able to process the Shipping Rate Request. Error Code: 111210, Error Description: The requested service is unavailable between the selected locations.

The "selected locations" seem to be related to THE SHIPPER and THE SHIPPING RATES LIST. Any help is APPRECIATED.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: VitalBodies on November 21, 2009, 06:28:34 am
One feedback suggestion I have is that you might consider adding more suggestions/details within the read me txt about what settings to use in programs like PHPMyAdmin when importing the SQL.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on November 21, 2009, 15:48:37 pm
That's correct.  You can now have each product's shipping rates queried from the manufacturer's address.  The manufacturer config has been updated to include address information.

-Reggie

I could not wait to try this this new updated version.
I am new to your UPS component but thankful that you are working on VirtueMart.
I installed the update and updated the SQL.
I am getting errors - likely to be something minor - new at this...
ERROR MESSAGE:
Error: UPS was not able to process the Shipping Rate Request. Error Code: 111210, Error Description: The requested service is unavailable between the selected locations.

The "selected locations" seem to be related to THE SHIPPER and THE SHIPPING RATES LIST. Any help is APPRECIATED.

Put your shop into debug mode.  Find out what the source/destination addresses are, according to the module.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on November 21, 2009, 18:16:29 pm
**Update 2009-11-21**
- version info in version 2009.10.25 was incorrect.  Fixed upsv2.ini to reflect correct version.
- added explicit call to require ps_country.php in class.Shipment.php, instead of relying on previous inclusions.
Title: Error with UPS 2, Error Code: 111210...
Post by: VitalBodies on November 22, 2009, 01:48:58 am
Quote
Put your shop into debug mode.  Find out what the source/destination addresses are, according to the module?

-Reggie
Wow, where would I find that in the debug info?
Is this it?:
Code: [Select]
AND (shipping_rate_zip_start <= '97439' OR  LENGTH(shipping_rate_zip_start) = 0 )
AND (shipping_rate_zip_end >= '97439' OR  LENGTH(shipping_rate_zip_end) = 0 )

I did not find SOURCE or DESTINATION.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on November 22, 2009, 02:11:17 am
That's not it.  I don't know what that is.

I was thinking I had added a lot of debug info when the UPSv2 module starts up, including source/dest default zip codes.  Maybe I removed those parts.

Here are some things to check:
What is your shop's address set to? Have you set an override ZIP code in the UPSv2 module? Have you designated items as shipping from their manufacturer? If so, what address did you give them? Did you give all products' manufacturers a valid address (namely country/ZIP code)?

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: VitalBodies on November 22, 2009, 03:08:47 am
That's not it.  I don't know what that is.

I was thinking I had added a lot of debug info when the UPSv2 module starts up, including source/dest default zip codes.  Maybe I removed those parts.

Here are some things to check:
What is your shop's address set to? Have you set an override ZIP code in the UPSv2 module? Have you designated items as shipping from their manufacturer? If so, what address did you give them? Did you give all products' manufacturers a valid address (namely country/ZIP code)?

-Reggie

Ok I looked through it all but it is overwhelming.
I did a keyword search for the two words I mentioned. If the are words that are compound words like "compound_word" I am not sure the search would have found them. Compound is unlikely to be the correct term for that kind of word though.

I am using CSV Improved to import products and in that sense I do have a zip with each product to show it comes from a given manufacturer.

Over-ride? I left the default PHRASE in that field and did not add a zip there, should the field be blank? Although, rethinking this question you most likely mean in the UPS 2 module not the UPS module - so i will have to check.

Create/Edit A Shipping Rate? Should I have a weight higher than 70?
The item might weighs more - I think 73 pounds US weight.
Dang, wrong module again, I will check.
Module? Hmm, I did not think about a module, I do not see it listed under modules in Joomla? Oh my, I needed to (at the very least) enable the new module here:
Store > Shipping Module Configuration > upsv2.php - within Joomla within VirtueMart within Store...
As bonehead as that is, I can see how I could have missed that : )
You might add tht to the Read ME TXT?

Ok, round two.

Pretend you just woke up from a heavy sleep, where all the usual obvious stuff is hazed over... Then write the Readme. Well At least that might be what some of us need : )

Also, if you hand off packages to the driver or the counter pre-printed what do you choose?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: VitalBodies on November 22, 2009, 03:34:57 am
Getting closer. As you know, the module needs to be configured and enabled.
Configured in the STORE section of Virtuemart and enabled in the ADMIN section.
I made the old UPS module so that it is no longer enabled also.
Getting much closer to having this working.
No errors.
Not to sure about the shipping rate though as it seems really low. Need to check the source and destination..
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: VitalBodies on November 22, 2009, 05:28:09 am
Found destZip but have not found source yet?
Am I looking for srcZip?
It matches the destZip...
With your new module I must need new and additional info in the database to make this all work.
My overall sense so far is that the module itself is working properly.
Will not totally know until my database is updated.

Do you know what fields are required for shipping from multiple vendors to work?
Meaning those beyond normal shipping/shipping from one vendor?
At the very least I suspect "Ships from manufacturer:".
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on November 22, 2009, 16:12:15 pm
I'm not quite following what you're doing.  Are you searching the source code itself?

As for setting up products to use their manufacturer's address, here's the text taken from the "Usage" tab:

Quote
========================================
    Ship From Manufacturer
========================================
This feature allows you to override the shipping settings and calculates shipping rates from the manufacturer's address.

To set up the manufacturer's address, go to:
Administration->Manufacturer->List Manufacturers->(click the appropriate one)->(click the "Address" tab)

To set up a product to ship from it's manufacturer, on the product setup page click the "shipping" tab
and select "Ships from manufacturer"
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: VitalBodies on November 22, 2009, 21:10:30 pm
I'm not quite following what you're doing.  Are you searching the source code itself?

As for setting up products to use their manufacturer's address, here's the text taken from the "Usage" tab:

Quote
========================================
    Ship From Manufacturer
========================================
This feature allows you to override the shipping settings and calculates shipping rates from the manufacturer's address.

To set up the manufacturer's address, go to:
Administration->Manufacturer->List Manufacturers->(click the appropriate one)->(click the "Address" tab)

To set up a product to ship from it's manufacturer, on the product setup page click the "shipping" tab
and select "Ships from manufacturer"

I am trying to figure out what the table/column heading name would be in the spreadsheet to add "ships from manufacturer" to the spreadsheet? Along with the name I need to know what to put in each cell in the row to say which products ship from the manufacturer.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on November 22, 2009, 21:47:20 pm
table jos_vm_product:
ship_from_manu (make it a "Y" for yes, "N" for no)
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: VitalBodies on November 23, 2009, 06:13:07 am
table jos_vm_product:
ship_from_manu (make it a "Y" for yes, "N" for no)

Thanks. Do you know what the other table headings would be:
If the item ships separately (not bundle-able)?
Is that ship_alone - Y or N?
Ships Freight?
Is that ship_freight - Y or N?
Maximum per box?
Is that max_per_package - 0-9999
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on November 23, 2009, 15:20:30 pm
That's right!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Vicki Payne on December 09, 2009, 00:45:52 am
Hi, Reggie - sorry to jump into the middle of this long thread... I've just installed your UPSV2 for VM 1.1.4 (Joomla! 1.5.15) and it immediately caused problems with my additional images thumbnails. I've discovered that you're using an older version of administrator/components/com_virtuemart/classes/ps_product.php - and that when I replace your file with the default VM 1.1.4 file, the thumbnail problem is fixed. I don't know what other problems this older file may be causing, but the latest version is at least 30 lines longer in code than the prev version, so it well may be causing other issues.

I'll hand-paste your changes into the latest ps_product.php (thanks for marking them clearly) -- and will let you know if I run into any other issues!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on December 09, 2009, 00:51:03 am
Thanks for the notice.  I'll correct it when I get a chance.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Vicki Payne on December 09, 2009, 01:46:33 am
Here is my corrected file (as a txt file), if that helps. Hopefully I've inserted all your changes correctly - I'm not getting any errors, at least.

Edit - Reggie pointed out I had commented out a crucial piece - so I've removed my file. Please download his updated version of UPSv2... thanks
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on December 09, 2009, 02:04:56 am
Thanks Vicki! I'll check it out when I get a chance.
-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on December 10, 2009, 16:29:46 pm
Update 2009/12/10
- vm114-ups_v2.0_2009.10.25 code for ps_product.php was accidentally built using files from VM113
- please re-download the archive and replace ps_product.php with the new file
- thanks Vicki Payne for pointing this out!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: airkewld on December 11, 2009, 03:28:49 am
Works great! You can see it here on my website:

www.opwdecks.com

Just add a product to cart and then view cart to see how this works.
Reggie, I have tried to get this to work, but I must be overlooking something. What is an XML Node? Any info on what to put in which column?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on December 11, 2009, 03:39:06 am
check out the examples included in the cartrates archive.  the xml node is near/at the bottom of the page.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on December 25, 2009, 06:53:56 am
I noticed two of my downloads were "deleted by admin". I do not know who deleted them, or why, but I have added them back to the post.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: pinksnyper on December 31, 2009, 21:35:41 pm
Does this module help you charge tax on shipping for same-state (USA) purchases? I.E. in PA we need to include shipping rates in the 6% tax charged on products.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on December 31, 2009, 21:59:35 pm
Does this module help you charge tax on shipping for same-state (USA) purchases? I.E. in PA we need to include shipping rates in the 6% tax charged on products.

It does not. That would be a nice addition!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: amcinnis on January 05, 2010, 19:12:35 pm
We have installed the module and have found that after the module has been installed, Virtuemart no longer forwards the user to Paypal to pay for their order.  Has anyone else had problems with this?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 05, 2010, 19:31:51 pm
Which version, and when did you download/install it? This issue has been fixed recently.
-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: SparksArts on January 06, 2010, 23:44:37 pm
Hi, Reggie

I'm having the same problem - when a customer checks out with PayPal it goes to the Thanks for Your Order page instead of the PayPal site. I thought it was a problem with VM 1.1.4. So today Jan 6, 2009 I downloaded and reinstalled your latest version vm_ups_v2.0_2009.10.25 but nothing changed. It still won't take you to the PayPal site for payment.

When you updated UPSv2 to fix this issue, what was the change you made? What code in which file? Maybe I can check that my version is correct.

Do you have any other ideas how I can troubleshoot this?

I just ran some tests with different shipping methods and they all result in the same issue. I turned off UPSv2 module and turned on your USPS module as the only option. Then I switched off all shipping modules except the "Standard Shipping module with individual configured carriers and rates." Same thing happens with all of them. So it may not be your shipping module after all. But now I'm stumped on how to locate the problem.

Installing your UPSv2 module does overwrite many core files, so will VM use those changes even if your module isn't being used?

Here is some other information about my setup and what I've done to troubleshoot this:

Joomla 1.5.15
VirtueMart 1.1.4
My Payment Methods are PayPal and custom Credit Card for offline processing.

This is what happens. When I run a test order to pay with PayPal at the end when I click the Confirm Order button, instead of going to the PayPal login page like it should, it goes to a Thank you for your order page on my site. There's a link to view the order in Order Maintenance and that page has a big button that says "PayPal - Click here to pay."

This is what I've tried to attempt to narrow down the problem. None of these changes has made any difference, so that rules them out as the cause of the problem.

PayPal Extra Payment Info - The code I'm using is exactly the same code I have on another site that's working perfectly. However, that other site is running VM 1.1.3.

VM Theme - I am using RocketTheme Mynxx template which has a custom theme for VM. I have this same theme with the exact same settings on my other site that's working fine. Also, I switched to the default theme and the problem still occurs. So it's not the theme.

Other payment methods - I disabled my custom credit card payment method and ran it with only the PayPal option. Problem still occurs.

I tried it with the Joomla SEO setting in Global Configuration both on and off. No difference.

In the VM Configuration, "Enable the Cookie Check?" is disabled.

This problem has occurred both before and after I added a custom SSL certificate and dedicated IP address. So it's not the SSL.

What else could it be?
Richard
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: SparksArts on January 06, 2010, 23:50:01 pm
Reggie,

I'm also having trouble with your cart rates plugin. I'm pretty sure I have it set up correctly. And your UPSv2 shipping module is the only one activated. See the attached screenshots for all my settings. I activated injection message and it shows the tags are empty <cartrates></cartrates>. But the rates do show if I go through the checkout.

Thanks for your help!
Richard


[attachment cleanup by admin]
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 07, 2010, 00:39:51 am
Paypal Routing Issue:

My apologies.  It seems I fixed the issue but forgot to post the updated module here on the forums. Please re-download and extract the joomla/administrator/components/com_virtuemart/html/checkout.thankyou.php file and replace your current one.


CartRates issue:
It looks like the <cartrates /> tag is being parsed, but something went wrong in between.  Have you tried it with the shop in debug mode? I've included a few checks that should log any issues that come up, with debug mode on.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: SparksArts on January 07, 2010, 01:26:00 am
Reggie

Thanks for the quick response! I turned on debug, but didn't see anything in the output on the Cart page that appears to be related to cartrates plugin. Maybe I just don't know what to look for. See attached for the output.

Richard

[attachment cleanup by admin]
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 07, 2010, 01:33:43 am
If there were an error, it should have shown it.  Must be something else.  Not really sure at this point.  It would take a debugging session to figure it out.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: SparksArts on January 07, 2010, 01:39:46 am
Reggie,

I just uploaded your new checkout.thankyou.php file and it works now! Thank you! That's been vexing me for weeks.

One other issue I noticed. When it goes to the PayPal login page at the top it shows what was ordered and the total price. Now it just shows "11 items" instead of the product names. See attached. I thought this was controlled by the PayPal additional info code, but something else must be overriding those settings.

Is it possible something in your UPSv2 module is affecting this? Or should I look elsewhere?

Richard

[attachment cleanup by admin]
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: SparksArts on January 07, 2010, 01:42:13 am
Regarding cartrates --

I guess the debug isn't showing anything related to cartrates. Can you verify my settings are correct? I included screenshots in my first post.

Richard
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 07, 2010, 02:34:05 am
Try setting the plugin order to the very last.  I seem to remember there being an issue if it is the first plugin called.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: SparksArts on January 07, 2010, 02:55:19 am
I set it to the last position of the system plugins but that didn't make any difference. Bummer.

Richard
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 07, 2010, 18:05:22 pm
Sorry Richard, nothing else comes to mind immediately.

It's definitely processing the tag(the plugin changes the <cartrates /> tag to <cartrates></cartrates>), but is failing to do anything else.

It would take more investigation. 

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: SparksArts on January 08, 2010, 03:21:11 am
OK, thanks for trying. I uninstalled and reinstalled the cart rates plugin just in case, but still no joy. I'll just disable it for now. That's a nice feature when it works.

On another note: Do you have any idea why when submitting a PayPal order, the PayPal login page just shows "11 items" instead of the product names. I thought this was controlled by the PayPal additional info code in the PayPal module, but something else must be overriding those settings. It correctly shows the product name on other sites where everything is set up exactly the same except the UPSv2 module isn't installed.

Is it possible something in your UPSv2 module is affecting this? Or should I look elsewhere?

Thanks!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 08, 2010, 03:41:10 am
The paypal extra info is untouched by my module.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 08, 2010, 23:43:54 pm
Paypal followup:
This might be part of your problem/solution-
http://www.exps.ca/solutions/virtuemart/62-virtuemart-114-discounts-fix.html
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lpc1 on January 14, 2010, 00:57:23 am
Hi everyone,

I just installed this module and now VM is taxing the shipping to customers that are out of state. Normal product tax is working just fine(VM only taxes in state customers), but it appears that VM is adding tax to shipping whether the customer is in state or not.

Is anyone else having this issue?? 
Any ideas on how to fix this??
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 19, 2010, 19:11:15 pm
Did you set up a tax rate in the module? If so, then that tax rate is applied to *all* rates, regardless of where the user lives.  This is from the original code in UPS v1 which ships with VirtueMart.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on January 26, 2010, 20:02:22 pm
I just downloaded vm114_ups_v2.0_2009.10.25.zip and uploaded all the files but in the readme under that install it says "Then, make the necessary database changes by importing upsv2.sql.  Be sure to change the Joomla table prefix if necessary. The upsv2.sql file assumes "jos_".

Where is this "upsv2..sql" file and how do I "import" it? Im using godaddy and they have a phpmyadmin thru starfield technologies... help please???
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 26, 2010, 20:08:36 pm
The upsv2.sql file is in the root of the archive.  You can use the phpMyAdmin import function to import it, or you can use the "SQL" window to copy and paste the lines and manually run them.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on January 26, 2010, 20:15:28 pm
Thanks for the fast reply. I'm a West Virginia redneck... can you elaborate on "root of the archive"? I dont understand where that is. 
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 26, 2010, 20:16:45 pm
When you open the archive, there are 3 things:
joomla (a directory)
README.TXT (a file)
upsv2.sql (a file)

You want the last one ;)
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on January 26, 2010, 20:33:33 pm
Character set is utf8? and what is the format? do i leave it set at NONE or do I need to select another option?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 26, 2010, 20:35:50 pm
That should be OK.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on January 26, 2010, 20:57:21 pm
Im not using the default virtuemart theme. Im using a purchased theme from vmjunction... Can I still use your tool?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 26, 2010, 20:58:36 pm
Yes, but certain features (free shipping image, etc.) will not show up. You'd have to have them integrated with your theme.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 26, 2010, 23:37:29 pm
****************************************
CARTRATES PLUGIN UPDATE
****************************************
I have had several complaints about the cart rates plugin not functioning on VM114 systems, so I found and fixed the issue.  The updated module is available on my website.  Simply re-download and re-install.  I did not change the name of the zip file or the download location, so please do not think that the "old" version listed there is not the updated version.

Thanks,
Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on January 27, 2010, 00:25:31 am
I believe your plugin is causing an error with frontend administration... i may be wrong. However, after I installed all your components I got the error described at this location on another part of this forum:

http://forum.virtuemart.net/index.php?topic=66169.msg218837#msg218837

Can you verify? if so, any possible fixes?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 27, 2010, 00:34:31 am
I don't think the cartrates plugin nor the UPSv2 module would have anything to do with that.  To test, simply disable both and try again.

I looked at the code in that location, and it looks like some system calls are failing for you.  That's not good!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on January 27, 2010, 01:17:54 am
system calls? do you know how can i troubleshoot? how do you know some are failing?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 27, 2010, 02:20:42 am
The call that is failing is in JRoute()::_() which is a very commonly used function.  It's trying to build a URI but failing somewhere, which causes that object to become null.

I did notice there is an SEF call in the mix, you could also try turning off SEF to see if the problem is fixed, along with my modules.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on January 27, 2010, 03:49:56 am
yup. it was a SEF plugin for virtuemart called "System - ARTIO JoomSEF"... hummm...

Thanks for the help AGAIN!!!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 27, 2010, 21:14:06 pm

***************************************
Version 2010.01.26 released
***************************************

It's actually two releases, rolled up into one.  Here's the changelog:

2010-01-26
   - revamped rates system to better work with plgSystemCartRates
   - fixed KG vs LB conversion bug. Package maxweight should work correctly now for non-US shipments.
   - fixed several typos
   - fixed several bad html tags in config

2010-01-15
   Feature Addition:
   - added option to charge flat fee per product, ignoring actual UPS rate
   - added option to skip handling fees on packages with only flat-fee items

   Bugfix:
   - updated shipping modifier code to be more accurate
   - changed shipping config currency display from hard coded $ to $VM_CURRENCY->symbol
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: airkewld on January 30, 2010, 07:18:56 am
****************************************
CARTRATES PLUGIN UPDATE
****************************************
I have had several complaints about the cart rates plugin not functioning on VM114 systems, so I found and fixed the issue.  The updated module is available on my website.  Simply re-download and re-install.  I did not change the name of the zip file or the download location, so please do not think that the "old" version listed there is not the updated version.

Thanks,
Reggie

Reggie, big ups brother. That new cart rates plug in works great! Thanks so much! Donation sent.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: airkewld on January 30, 2010, 07:24:28 am
You can see how it works here
http://store.airkewld.com/e-shop-online/suspension/beetle-and-ghia/air-ride/complete-air-ride-kit.html



[attachment cleanup by admin]
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: airkewld on January 30, 2010, 07:30:15 am
One more thing Reggie, I am interested in having you create a plug in that will allow me to add weights to attributes and/or properties. Is this possible? Let me know, I am interested.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 30, 2010, 15:30:16 pm
Hi airkewld, glad you like the plugin and thanks for the donation!
As for adding weights to attributes, that would require modifying some core VM files, as well as modifying the shipping module to recognize those weights.  It can be done, but it will be time consuming.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: airkewld on January 30, 2010, 16:36:18 pm
Hi airkewld, glad you like the plugin and thanks for the donation!
As for adding weights to attributes, that would require modifying some core VM files, as well as modifying the shipping module to recognize those weights.  It can be done, but it will be time consuming.

-Reggie
I will gladly pay for it. Can you give me an estimate?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: SparksArts on January 30, 2010, 17:36:44 pm
Reggie,

If the community of users would pitch in for the development of this option (plug in that will allow you to add weights to attributes and/or properties), would you make it publicly available?

I would also like to see cart rates work with USPS, but can't talk my clients into paying for the development. Perhaps if a group of users would commit to donating a portion of the development cost we could get it done and available to all.

Would you consider this option?

Richard
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on January 30, 2010, 22:29:30 pm
Could you help me modify my virtuemart template to include the freight option picture? or show me a link to a site with your ups 2.0 in use so that I can try to figure out the code and apply it myself?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 30, 2010, 22:51:41 pm
mercomarine:
simply echo $freight_shipping.  You can see that, along with all the other flypage additions in joomla/components/com_virtuemart/themes/default/templates/product_details/flypage.tpl.php
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 30, 2010, 22:59:26 pm
airkewld, sparkosis:
Shipping weights for attributes
I'm not 100% sure that I would want to add this feature to the main release.  To facilitate this feature will require modifying the attributes code, which could potentially break a lot of things.  This in turn would require even more code to make it work, causing the installation of the module to be even more difficult, especially when merging it with a non-default theme.  I will need to look at the attribute code to see if I can modify it without breaking a lot of other code, and make it "play nice" with themes, etc..  If it is going to be a big pain, and cause a lot of trouble, I could add the feature, but split its code off from the main release.  That would mean any future updates to UPSv2 would not be incorporated into that tree by default.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 30, 2010, 23:03:06 pm
sparkosis:
USPS Cart Rates
I've had several users approach me on this, but no one was able to underwrite it.  I would be happy to make cartrates work with USPSv5, but USPSv5 needs a revamp in order to do so.  That, and the cartrates plugin itself will need some more work done in order to work with both UPS and USPS.

If we can get the financial backing, I'd be happy to do it.  If you could please redirect this conversation to the USPSv5 thread, I think that would be better.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on January 31, 2010, 19:56:31 pm
I did the following:
Code: [Select]
<div class="vmj-bro-sku"><?php echo $freight_shipping ?></div> but it didnt add the picture to the corrosponding page...

Remember im not using the default template... do i need to add that $freight_shipping elsewhere first so my template knows what it is?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 31, 2010, 20:03:35 pm
The actual value is set in shop.product_details, not in a template file. Did you configure the shop to use freight shipping images? Did you set an image?


I did the following:
Code: [Select]
<div class="vmj-bro-sku"><?php echo $freight_shipping ?></div> but it didnt add the picture to the corrosponding page...

Remember im not using the default template... do i need to add that $freight_shipping elsewhere first so my template knows what it is?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on January 31, 2010, 20:20:15 pm
It appears that none: of the file structure is the same as the default template... not even the file names are the same. I dont have a "joomla/components/com_virtuemart/themes/MYTEMPLATE/templates/product_details/flypage.tpl.php" file. Yes I configured the shop to have an image under: virtuemart/admin/configuration/shipping and checkmarked the box that says "Show an image on the product flypage for freight shipped items" and selected an image.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 31, 2010, 20:23:41 pm
Well that's a weird issue!

It appears that none: of the file structure is the same as the default template... not even the file names are the same. I dont have a "joomla/components/com_virtuemart/themes/MYTEMPLATE/templates/product_details/flypage.tpl.php" file. Yes I configured the shop to have an image under: virtuemart/admin/configuration/shipping and checkmarked the box that says "Show an image on the product flypage for freight shipped items" and selected an image.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on January 31, 2010, 20:25:17 pm
I changed this:
Code: [Select]
<div class="vmj-bro-text">

   <!-- shortdesc -->
               <div class="vmj-bro-text-sdesc">
                <a href="<?php echo $product_flypage ?>" title="<?php echo $product_name ?>">
<?php echo $product_s_desc ?>&nbsp; <b style="color:#E77919">...</b>
</a>
               </div>
    <!-- attribute container -->

   <div class="vmj-bro-att">
            <div class="vmj-bro-price-cont">
<span class="vmj-broprice">
<span style="text-align:right;padding-right:3px;"><?php echo $product_price ?></span>
</span>
            </div>
<div class="vmj-bro-sku"><?php echo $VM_LANG->_('PHPSHOP_CART_SKU'?> <?php echo $product_sku ?></div>    
<div class="vmj-bro-tag-cont">

<div class="vmj-bro-tag-promo"></div>
<div class="vmj-bro-tag-new"></div>
</div>
</div>
</div>

To This:

Code: [Select]
<div class="vmj-bro-text">

   <!-- shortdesc -->
               <div class="vmj-bro-text-sdesc">
                <a href="<?php echo $product_flypage ?>" title="<?php echo $product_name ?>">
<?php echo $product_s_desc ?>&nbsp; <b style="color:#E77919">...</b>
</a>
               </div>
    <!-- attribute container -->

   <div class="vmj-bro-att">
            <div class="vmj-bro-price-cont">
<span class="vmj-broprice">
<span style="text-align:right;padding-right:3px;"><?php echo $product_price ?></span>
</span>
            </div>
<div class="vmj-bro-sku"><?php echo $freight_shipping ?></div>    
<div class="vmj-bro-tag-cont">

<div class="vmj-bro-tag-promo"></div>
<div class="vmj-bro-tag-new"></div>
</div>
</div>
</div>

Did I do it right?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 31, 2010, 20:30:38 pm
What file is that in?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on January 31, 2010, 20:32:09 pm
its under /components/com_virtuemart/themes/vmj_estore/templates/browse/vmj_estore.php
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 31, 2010, 20:41:25 pm
Well that's your problem.  $freight_shipping is set in shop.product_details for the product flypage, NOT the browse pages.  The browse page actually calls on the flypage.  That's why you need to edit flypage.tpl.php.  I'm not sure what your template is doing, or why you don't have a flypage directory like the default theme, so I can't give you any advice there.  I don't have time to look much further into it today, but I suppose if you wanted to you could copy the necessary code from shop.product_details into your /browse/vmj_estore.php file to set $freight_shipping, ie:

Code: [Select]
$productData = $db_product->get_row();
$productArray = get_object_vars( $productData );
if (($productArray['ship_freight'] == 'Y') && (PSHOP_SHOW_FREIGHT_PIC=='Y')) {
    $freight_shipping='<img src="'.IMAGEURL.'shipping/'. FREIGHT_IMAGE .'" alt="freight shipping"/>';
}

of course $db_product is a database connection with a query set to the current product_id, so you'll need to add that bit in to get it working right.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on January 31, 2010, 22:56:48 pm
I got it working on the flypage... looking at one product individually. But I can't get it working on the browsepage using the exact same code...

What do you mean by "$db_product is a database connection with a query set to the current product_id, so you'll need to add that bit in to get it working right"? How do I do that?

I checked on the forum for my template and they say "Attributes can not be shown on Browse Page" No idea why, I asked them but they havnt responded yet. And I definitely need this to be shown on the browse page because you can add items to your cart from the browse page and customers may not see the shipping note or freight picture... Any help would be greatly appreciated.

I sent you a donation for your help!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 31, 2010, 23:22:22 pm
The following is the code that sets up $db_product in shop.product_details.  Depending on what variables are set in your browse page, this may or may not work as is. Place it above the previous code...
Code: [Select]
$db_product = new ps_DB;

// Get the product info from the database
$q = "SELECT * FROM `#__{vm}_product` WHERE ";
if( !empty($product_id)) {
$q .= "`product_id`=$product_id";
}
elseif( !empty($product_sku )) {
$q .= "`product_sku`='$product_sku'";
}

if( !$perm->check("admin,storeadmin") ) {
$q .= " AND `product_publish`='Y'";
if( CHECK_STOCK && PSHOP_SHOW_OUT_OF_STOCK_PRODUCTS != "1") {
$q .= " AND `product_in_stock` > 0 ";
}
}
$db_product->query( $q );
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on January 31, 2010, 23:45:27 pm
Where do i put that code? This is the way my browse page currently looks under "/components/com_virtuemart/themes/vmj_estore/templates/browse/vmj_estore.php"...

Code: [Select]
$productData = $db_product->get_row();
$productArray = get_object_vars( $productData );
if (($productArray['ship_freight'] == 'Y') && (PSHOP_SHOW_FREIGHT_PIC=='Y')) {
    $freight_shipping='<img src="'.IMAGEURL.'shipping/'. FREIGHT_IMAGE .'" alt="freight shipping"/>';
}


<div width="100%" class="vmj-bro-cont">
        <!-- heading -->
<div style="background: #ededed url(components/com_virtuemart/shop_image/manufacturer/<?php echo $manufacturer_image ?>) no-repeat 5px; float: left; width: 100%; font-weight:bold;  line-height: 24px; height: 24px; border-bottom:1px solid #c0c0c0; text-indent: 27%;">

<span class="vmj-bro-m-name" style=""><?php echo $mf_name?></span>&nbsp;
<a class="vmj-bro-p-name" title="<?php echo $product_name ?>" href="<?php echo $product_flypage ?>">
        <?php echo $product_name ?>
</a>

        </div>

<!-- image -->
<div class="vmj-bro-image">
<a style="text-alignment:center;vertical-align:middle;" href="<?php echo $product_flypage ?>"><?php echo ps_product::image_tag$product_thumb_image'class="browseProductImage" border="0" title="'.$product_name.'" alt="'.$product_name .'"' ?></a>
    </div>

<!-- text top container -->
<div class="vmj-bro-text">

   <!-- shortdesc -->
               <div class="vmj-bro-text-sdesc">
                <a href="<?php echo $product_flypage ?>" title="<?php echo $product_name ?>">
<?php echo $product_s_desc ?>&nbsp; <b style="color:#E77919">...</b>
</a>
               </div>
    <!-- attribute container -->
        <div><?php echo $freight_shipping_text ?></div>
   <div class="vmj-bro-att">
            <div class="vmj-bro-price-cont">
<span class="vmj-broprice">
<span style="text-align:right;padding-right:3px;"><?php echo $product_price ?></span>
</span>
            </div>
   
<div class="vmj-bro-tag-cont">

<div class="vmj-bro-tag-promo"></div>
<div class="vmj-bro-tag-new"></div>
</div>
</div>
</div>

<!-- text bottom cont -->
<div class="vmj-bro-text-b">
<!-- details.. -->
<div class="vmj-bro-details">

<a style="background: url(components/com_virtuemart/themes/vmj_estore/images/zoom.gif) no-repeat; line-height: 38px; font-size: 11px; color:#E77919; padding-left: 16px;text-decoration:none;" href="<?php echo $product_flypage ?>" title="<?php echo $product_details ?>"><?php echo $product_details ?>...</a>
</div>
<!-- avail add to cart cont -->
<div class="vmj-bro-addtocart-cont">
<div class="vmj-bro-avail">
<span style="font-weight:bold;"><?php echo $VM_LANG->_('PHPSHOP_AVAILABILITY'?>: </span><span style="color:#cc3333;font-weight:bold;letter-spacing: 1px;"><?php echo $product_availability ?></span>
</div>
        <div class="vmj-bro-addtocart">
               <?php echo $form_addtocart ?>    
</div>
    </div>
</div>

</div>
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 31, 2010, 23:48:16 pm
before  $productData = $db_product->get_row();
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on January 31, 2010, 23:52:11 pm
now it does this...

[attachment cleanup by admin]
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 31, 2010, 23:58:18 pm
because you didn't wrap it in <?php ?> tags ;)
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on February 01, 2010, 00:12:35 am
Yes!!! It works!!! Thanks for your help!! greatly appreciated!!!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 01, 2010, 00:41:16 am
Glad to hear it  ;D
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on February 02, 2010, 01:01:22 am
Well... I lied. its ALMOST working. If I view my products on the browsepage... either all of them show shipping freight or none of them do... (if im looking at a page that has products that some can be shipped ups, and some can ship truck)depending on which was the last one I edited in the backend as far as i can tell... Any ideas how to fix this? Also, I got an "official" reply from the maker of my template and they said
Quote
Product attributes can not be shown on Browse Page and this has nothing to do with Theme. Please can switch to the default theme for verification.

Code: [Select]
<?php $db_product = new ps_DB;

// Get the product info from the database
$q "SELECT * FROM `#__{vm}_product` WHERE ";
if( !empty(
$product_id)) {
$q .= "`product_id`=$product_id";
}
elseif( !empty(
$product_sku )) {
$q .= "`product_sku`='$product_sku'";
}

if( !
$perm->check("admin,storeadmin") ) {
$q .= " AND `product_publish`='Y'";
if( CHECK_STOCK && PSHOP_SHOW_OUT_OF_STOCK_PRODUCTS != "1") {
$q .= " AND `product_in_stock` > 0 ";
}
}
$db_product->query$q );


$productData $db_product->get_row();
$productArray get_object_vars$productData );
if ((
$productArray['ship_freight'] == 'Y') && (PSHOP_SHOW_FREIGHT_PIC=='Y')) {
    
$freight_shipping='{modal url=index.php?option=com_content&view=article&id=64&Itemid=96|type=fancybox|overlay=0|outline=rounded-white}<img src="'.IMAGEURL.'shipping/'FREIGHT_IMAGE .'" alt="freight shipping"/>{/modal}';
}
?>


<div width="100%" class="vmj-bro-cont">
        <!-- heading -->
<div style="background: #ededed url(components/com_virtuemart/shop_image/manufacturer/<?php echo $manufacturer_image ?>) no-repeat 5px; float: left; width: 100%; font-weight:bold;  line-height: 24px; height: 24px; border-bottom:1px solid #c0c0c0; text-indent: 27%;">

<span class="vmj-bro-m-name" style=""><?php echo $mf_name?></span>&nbsp;
<a class="vmj-bro-p-name" title="<?php echo $product_name ?>" href="<?php echo $product_flypage ?>">
        <?php echo $product_name ?>
</a>

        </div>

<!-- image -->
<div class="vmj-bro-image">
<a style="text-alignment:center;vertical-align:middle;" href="<?php echo $product_flypage ?>"><?php echo ps_product::image_tag$product_thumb_image'class="browseProductImage" border="0" title="'.$product_name.'" alt="'.$product_name .'"' ?></a>
    </div>

<!-- text top container -->
<div class="vmj-bro-text">

   <!-- shortdesc -->
               <div class="vmj-bro-text-sdesc">
                <a href="<?php echo $product_flypage ?>" title="<?php echo $product_name ?>">
<?php echo $product_s_desc ?>&nbsp; <b style="color:#E77919">...</b>
</a>
     </div>
    <!-- attribute container -->
         <div class="vmj-bro-text-b" style="padding-top: 25px;">
        <div class="vmj-bro-price-cont">
<span class="vmj-broprice">
<span style="text-align:right;padding-right:3px;"><?php echo $product_price ?></span>
</span>
            </div>
<div><?php echo $freight_shipping ?></div>    
<div class="vmj-bro-tag-cont">

<div class="vmj-bro-tag-promo"></div>
<div class="vmj-bro-tag-new"></div>
</div>
</div>
</div>

<!-- text bottom cont -->
<div class="vmj-bro-text-b">
<!-- details.. -->
<div class="vmj-bro-details">

<a style="background: url(components/com_virtuemart/themes/vmj_estore/images/zoom.gif) no-repeat; line-height: 38px; font-size: 11px; color:#E77919; padding-left: 16px;text-decoration:none;" href="<?php echo $product_flypage ?>" title="<?php echo $product_details ?>"><?php echo $product_details ?>...</a>
</div>
<!-- avail add to cart cont -->
<div class="vmj-bro-addtocart-cont">
<div class="vmj-bro-avail">
<span style="font-weight:bold;"><?php echo $VM_LANG->_('PHPSHOP_AVAILABILITY'?>: </span><span style="color:#cc3333;font-weight:bold;letter-spacing: 1px;"><?php echo $product_availability ?></span>
</div>
        <div class="vmj-bro-addtocart">
               <?php echo $form_addtocart ?>    
</div>
    </div>
</div>

</div>
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on February 02, 2010, 20:01:27 pm
Any ideas about my other issue?

Also, since I don't really know how your hack is supposed to look and work on checkout I have to ask this question: If I didn't have a custom template in virtuemart, what does freight shipping tell you on checkout.

As far as I can see: If you only order frieght items it tells you "Freight Shipping: Fee yet to be determined." Which is GREAT!

However, If you have two items in your cart: one item that ships freight, and one item that ships ups... It only says "UPS Ground ($11.19)" I realize it only calculates the non-freight item. But lets say a customer sees this note and thinks they are getting a phenomenal shipping rate. It doesn't actually tell you that "some items are not being calculated do to freight requirements" Is there a way to do this?   
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 02, 2010, 20:27:43 pm
It's hard to tell how to fix your browse pages without looking at the source to your theme.

For orders with mixed freight/non-freight items, my modified default theme shows a notice about additional shipping fees which will be added later.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on February 02, 2010, 21:41:16 pm
Well. I reset everything to the default theme and no freight shipping notes were shown on even the default browse pages either. Can you please send me a link to a site with your mods in use so I can see how this is supposed to work?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on February 02, 2010, 22:11:00 pm
Scratch everything I said in the past couple posts im a dummy!!! I just copied some of your modified basket and checkout files to my template and it fixed a lot of my problem. One quick question... where is the value of "freight_notice" defined?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 02, 2010, 22:32:32 pm
freight_shipping.tpl.php

The message is hard coded there..in english  ::)
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 03, 2010, 21:44:35 pm
*********** POLL **********

Would you like to see the USPSv5, UPSv2, and FedExv2 modules combined into one monolithic module?

Pro's:
- Modules will work together, "out of the box"
- Features for one carrier could more easily be ported to another carrier

Con's:
- Larger archive size, could possibly lead to rehosting of the file
- You'll need to check the documentation to see if a feature is supported for the carrier you wish to use


Here's the poll (http://www.lowmips.com/joomla/component/apoll/apoll/1-i-would-like-to-see-upsv2-uspsv5-and-fedexv2-combined-into-one-module), for anyone interested.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Vicki Payne on February 05, 2010, 21:28:16 pm
Hi, Reggie -

I am using your UPSv2 module with VM 1.1.4 and it's working very well. However, my client would like to offer customers the option of requiring a signature or not. I was hoping to add the option (with zero charge) in the Additional Services area, but that way isn't working.

Could you tell me if there is a way you can think of to include this option? It would need to be written to the Order Confirmation e-mails so the order fulfillment people will be notified.

If this is a customization request that can't be handled through the Additional Services tab, please PM me with a quote or let me know if you need further details.

Thanks in advance!

Vicki
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 08, 2010, 20:12:08 pm
******* Update ******
- version 2010.02.07
- option to give free shipping per product type based on quantity
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 08, 2010, 21:41:34 pm
airkewld, sparkosis:
Shipping weights for attributes
I'm not 100% sure that I would want to add this feature to the main release.  To facilitate this feature will require modifying the attributes code, which could potentially break a lot of things.  This in turn would require even more code to make it work, causing the installation of the module to be even more difficult, especially when merging it with a non-default theme.  I will need to look at the attribute code to see if I can modify it without breaking a lot of other code, and make it "play nice" with themes, etc..  If it is going to be a big pain, and cause a lot of trouble, I could add the feature, but split its code off from the main release.  That would mean any future updates to UPSv2 would not be incorporated into that tree by default.

I finally got a chance to look into this. Updating the attribute code will not be simple.  I'll have to either:
a) Rework the attribute format, breaking anything depending on it
or
b) work around the attribute format by using a new table and adding a lot more code to facilitate it

Neither way looks that great to me.  I wish the official attribute code could be reimplemented in a way that allows for functionality expansion.  It's coded in such a way that it recognizes the first part of the attribute as the name, and anything after that is the price/price modifier. Meaning, I can't just stick extra data on the end, as it interprets that as a price modifier.  I'd like to see that changed to delimeters, such as a pipe "|".  This would allow for the first token to be the name, the second to be the price modifier, and the nth to be whatever we want, like shipping weights.

Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mowlman on February 08, 2010, 21:52:52 pm
Hello Reggie,

I was tryingto figure out how to implement the below logic when I came across your modification.  I saw the free shipping option, which I think will work for me.  Do you think the excluding of expedited shipping would be hard to do?  I was thinking trying to trace what you did for free shipping?

Set and display checkbox on Product Attribute page for Free_Ship  and Exclude_Expedited
Now within shipping module or where ever the shipping is checked:

If
Free_Ship then
        display free shipping option

Else if  Exclude_Expedited then
         display only UPS ground shipping option

Else
    display normal shipping options as they originally were
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 08, 2010, 22:01:10 pm
mowlman:
I think the hardest part will be determining what to do if you have a product that can ship via all services, and a product which can only ship via ground services.  I have a similar feature to what you are describing built into my FedExv2 module.  If the item has free shipping, the admin can restrict free shipping to ground services only.  All other items can be shipped however the user wishes.

Check out my FedExv2 module for how I accounted for each choice.  Basically, you have to create three virtual shipments...one where everything is shipped ground, and one where the ground restricted items are shipped via ground, and one where everything else is shipped expidited.  The user is notified that the ground restricted items can only be shipped via ground services, and please choose a service for the remaining items.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mowlman on February 09, 2010, 15:30:16 pm
Reggie, Thank you very much for sharing your knowledge.  :D

One more quick question... I am installing your UPS module and am at the part to import upsv2.sql,  I only have 2 databases one for joomla and one for my shopping frenzy template.  I am not sure which db to import to.  Any ideas?  Thank you once again.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 09, 2010, 15:31:31 pm
Whichever one holds your VirtueMart tables. Most likely "joomla".
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mowlman on February 09, 2010, 16:45:53 pm
Hi Reggie,  Thanks for the quick reply!

I ended up having to import the upsv2.sql to my shopping frenzy db in order for changes to be saved.

How do you turn off the debugging messages?  for example:

Please select a Shipping Method!
class.Shipment::addPackage() - Adding a new bundled package
class.Shipment::addPackage() - Package Number: 1
class.Package::addItem() - ***** Adding item 341 (Atlas Lift, Medium) to package #1 *****
.
.
class.Shipment::getRates() ----------- Starting Package #1-----------

I have a page of messages which looks like possibly a debug switch is turned on? Not sure? I'm digging into it now.


Thank you for your help.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 09, 2010, 16:59:50 pm
mowlman, that debug info is shown only to admins.  You can turn it off by commenting out a line in both class.Package.php and class.Shipment.php:

Find this function (at the end of the files)
Code: [Select]
function debugLog($message){
global $vmLogger;
if (strstr($_SESSION['auth']['perms'],'admin')){
echo $message.'<br/>';
}
$vmLogger->debug($message);
}

Comment out the echo:
Code: [Select]
function debugLog($message){
global $vmLogger;
if (strstr($_SESSION['auth']['perms'],'admin')){
//echo $message.'<br/>';
}
$vmLogger->debug($message);
}

I'll eventually make this a checkmark in the module config..
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: cybergarage on February 09, 2010, 19:55:53 pm
Moved to a new server and had some issues with not being able to select the city so removed VM and did a clean install. With the clean VM install and installed version 2.2010.02.07 of your module. Was getting some errors when I would get to the shipping page of checkout but found the issue there. Now I am getting what I assume is the response from UPS printed on the shipping page between "Please select a Shipping Method!" and the actual shipping rates. I have copied what is printed on the page to the attach txt file. I searched through a number of pages in this thread but apologize if this has been covered already and I missed it.

[attachment cleanup by admin]
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 09, 2010, 19:58:58 pm
This is covered in the post directly above yours.  It is shown only to administrators, but can be turned off easily.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: cybergarage on February 09, 2010, 21:26:48 pm
Reggie,

Thank you for the quick response, guess I should have read from the last page back versus first page.

Where do I find those files? I have been looking around but so far no luck.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 09, 2010, 21:28:23 pm
administrator/components/com_virtuemart/classes/shipping/
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: cybergarage on February 09, 2010, 21:35:18 pm
Thank you sir, all fixed now. 8)
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: airkewld on February 10, 2010, 06:44:30 am
airkewld, sparkosis:
Shipping weights for attributes
I'm not 100% sure that I would want to add this feature to the main release.  To facilitate this feature will require modifying the attributes code, which could potentially break a lot of things.  This in turn would require even more code to make it work, causing the installation of the module to be even more difficult, especially when merging it with a non-default theme.  I will need to look at the attribute code to see if I can modify it without breaking a lot of other code, and make it "play nice" with themes, etc..  If it is going to be a big pain, and cause a lot of trouble, I could add the feature, but split its code off from the main release.  That would mean any future updates to UPSv2 would not be incorporated into that tree by default.

I finally got a chance to look into this. Updating the attribute code will not be simple.  I'll have to either:
a) Rework the attribute format, breaking anything depending on it
or
b) work around the attribute format by using a new table and adding a lot more code to facilitate it

Neither way looks that great to me.  I wish the official attribute code could be reimplemented in a way that allows for functionality expansion.  It's coded in such a way that it recognizes the first part of the attribute as the name, and anything after that is the price/price modifier. Meaning, I can't just stick extra data on the end, as it interprets that as a price modifier.  I'd like to see that changed to delimeters, such as a pipe "|".  This would allow for the first token to be the name, the second to be the price modifier, and the nth to be whatever we want, like shipping weights.



Way over my head.

My last website used e commerce templates and that option was standard to include both weight and price additions. As of now, I have to fudge the shipping via percentage guessing the client will purchase the add on and if not, his shipping is a little high. Just an FYI Reggie, I will gladly pay to get something like this in the works. If it makes my life easier, I will gladly pay for it. Let me know.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mowlman on February 10, 2010, 21:22:26 pm
mowlman:
I think the hardest part will be determining what to do if you have a product that can ship via all services, and a product which can only ship via ground services.  I have a similar feature to what you are describing built into my FedExv2 module.  If the item has free shipping, the admin can restrict free shipping to ground services only.  All other items can be shipped however the user wishes.

Check out my FedExv2 module for how I accounted for each choice.  Basically, you have to create three virtual shipments...one where everything is shipped ground, and one where the ground restricted items are shipped via ground, and one where everything else is shipped expidited.  The user is notified that the ground restricted items can only be shipped via ground services, and please choose a service for the remaining items.

-Reggie

Hi Reggie,

Questions:
Can FedExv2 coexist with UPSV2 ?

I'm trying to dig my way through your Fedexv2 code and then apply it to the UPSv2 code which we need to use since we are strictly shipping via UPS. Is there any chance this functionality will be copied over to UPS? 

Or also the possibility for the Excluding expedited shipping (shipping restrictions)  for a particular item?

Thank you for your time.
Please PM me with a quote or let me know if you need further details.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 10, 2010, 21:48:32 pm
The modules currently do not play well together.  They were developed independently, with no goal of working together.  There has been some small interest in combining all 3 of my modules into one large "mega" module, but not really enough to motivate me to do it.  Another user on the forums has combined an older version of UPSv2 with FedExv2, you could probably get a copy from him.

-Reggie

ps. in order to combine them, you'll need to
a) merge the source files for the core VM files
b) rename one set of the class.shipping and class.package classes to something unique, and update all references to that class in the appropriate module
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mowlman on February 10, 2010, 22:01:33 pm
Thanks Reggie for your quick reply,

I'm just trying to figure out how to implement this Exclude expedited shipping for some of my products. I like your idea of creating 3 virtual shipments to handle free shipping items along with items that I want to exclude Expedited shipping and those items where the user can still specify expedited shipping. (as you mentioned the fedex module does)

I'm just having trouble getting everything to work. If there's a chance you had some time and could help , PM me with a quote.  I also understand if you're swamped, you do a great job keeping up with this forum helping others where you can.

Thank you again.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 12, 2010, 04:09:01 am
airkewld:
I did PM you. Don't know if you got it...
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 12, 2010, 17:20:53 pm
******** Update *********
- vm114-upsv2.2010.02.11.zip
- option to charge tax only to in-state users
- option to charge different tax for products which ship from manufacturer (drop shipper)
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: cbreninger on February 12, 2010, 20:19:23 pm
Reggie,

I would like to thank you for all your hardwork on this module. I will be donating shortly (as soon as my next client check comes in this month).

I have an issue which I am sure is my configuration, but I don't know where to start looking to fix. I have searched the forum, but I think it is something I just don't have configured correctly.

I have UPSv2 2.0.2010.01.26 installed on VM 1.1.4. It is the only shipping module currently selected. The website is www.hamskeaarchery.com

Customers in the US seem to have no issue getting rates and checking out.

Customers outside the US, (i.e., Canadian or Austrailian, etc), seem to get to PayPal and then it gives them this message "Unable to process payment. Please contact the merchant as the shipping address provided by the merchant is invalid, and the merchant has requested that your order must be shipped to that address."

I feel kind of stupid, that it ought to be obvious, but I can't seem to pinpoint it. If you could provide some insight where I might check into this I would be very grateful.

Sincerely,
Carolyn

Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 12, 2010, 20:29:21 pm
Hi Carolyn,
It sounds like a paypal issue to me.  The error message states that your merchant address is invalid.  You should check your PayPal settings.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: cbreninger on February 12, 2010, 20:34:56 pm
Reggie,

OK. Thanks for the quick reply. Will check out PayPal settings again.

Carolyn
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 12, 2010, 20:55:12 pm
Actually, upon reading it again, I see it states that the shipping address supplied is invalid.  It sounds like a shipping address is being passed to Paypal, but only works for the US.  My shipping module is not responsible for passing shipping addresses to Paypal, so you can most likely rule that out.  You might want to seek help in the PayPal thread, it could be something to do with your address format or the PayPal module itself.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: cbreninger on February 12, 2010, 21:07:19 pm
Reggie,

Thanks again. I will do that. I feel like I'm going in circles. But I will persist. My client is not too happy with me at the moment. It seems like it ought to be simple, but then again...

Carolyn
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: cbreninger on February 12, 2010, 21:54:49 pm
I think we solved it. It seems that you have to put address + a phone number in on PayPal if you are a company doing international shipments. The phone number is not required if you are only doing your country.

Once I did this it processed through to the PayPal screen properly for my international address.

Hopefully this will help someone else in the future.

Thanks again,
Carolyn

Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 17, 2010, 17:50:58 pm
******* Update ******

Version 2010.02.15 released. Here is the changelog:
   Feature Updates:
   - option to restrict products to ground shipping services
   
   BugFix:
   - Shipment Warning/ETA Quote/Guaranteed Days to delivery options now work

   Files Changed:
   upsv2.sql
   /admin/components/com_virtuemart/classes/ps_config.php
   /admin/components/com_virtuemart/classes/ps_product.php
   /admin/components/com_virtuemart/classes/shipping/class.Package.php
   /admin/components/com_virtuemart/classes/shipping/class.Shipment.php
   /admin/components/com_virtuemart/classes/shipping/upsv2.ini
   /admin/components/com_virtuemart/classes/shipping/upsv2.php   
   /admin/components/com_virtuemart/classes/shipping/upsv2/upsv3.config.tmpl.php
   /admin/components/com_virtuemart/html/admin.show_cfg.php
   /admin/components/com_virtuemart/html/product.product_form.php
   /admin/components/com_virtuemart/html/shop.product_details.php
   /admin/components/com_virtuemart/languages/admin/english.php
   /admin/components/com_virtuemart/languages/common/english.php
   /admin/components/com_virtuemart/languages/product/english.php
   /components/com_virtuemart/shop_image/shipping/ship_ground_only.png
   /components/com_virtuemart/themes/default/templates/product_details/flypage.tpl.php
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mowlman on February 17, 2010, 18:46:19 pm
Hello Reggie,

I was testing the "Ship from manufacturer" option

1st test, sending from default zip of 48506  sending to 48439

2nd test, I checked the Ship from manufacturer check box so that the item would ship from the manufacturer which has a zip of 60106. I was sending to the same zip of 484639. 

I am not getting any shipping cost change.

UPS Ground ($8.65)
UPS 2nd Day Air ($16.03)  -  2 Guaranteed Day(s) To Delivery
UPS Next Day Air ($32.32)  -  1 Guaranteed Day(s) To Delivery (ETA: 10:30 A.M.)

Within the Shipping Module Configuration: upsv2.php, I originally had the default zip of 48506  filled in,  then I blanked out the zip and tried things again.

If you get a chance, can you check to see if you get different results?
I expected a little change in value.

Thanks for your time.

-Bill


[attachment cleanup by admin]
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 17, 2010, 18:55:21 pm
mowlman,
enable the extended debug info from the module configuration, and be sure you're logged in as an admin.  This will show you all the information about the packages, including zip codes and rates.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mowlman on February 17, 2010, 19:12:02 pm
Great thanks.   I forgot about the debug option.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mowlman on February 17, 2010, 19:36:36 pm
From the debug notes it appears the ship from Zip is being changed:

When Ship From Manufacturer is checked:
class.Shipment::addPackage() - Shipping Info - Country: US State: ZIP: 27293


When Ship From Manufacturer is unchecked:
class.Shipment::addPackage() - Shipping Info - Country: US State: ZIP: 48506

But the rates stay the same.
UPS Ground ($8.65)
UPS 2nd Day Air ($16.03) 
UPS Next Day Air ($32.32)

I'm still looking into it, I'll let you know if I find anything.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 17, 2010, 19:38:25 pm
Could it be that the price IS the same? ;)
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mowlman on February 17, 2010, 20:53:06 pm
Well, I wish that were true, but I don't think it should be the same.

In test case 1, the zips are only maybe 5 miles apart,
where when shipped from the manufacturer, the item was coming from another state.

I expected the rate to possibly change a little bit.  I also changed the manufacturer zip to California to see if the rate would change then as well, but it didn't.


Also, When I first turned on debug, I was getting boxes for XML Post:  & XML Result: embedded within the debug information (in their own boxes),  but now I cannot recreate.  I wanted to double check them as well, but cannot figure out how to get them displayed again.  I'm currently logged in as admin.  ???


Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 17, 2010, 21:01:13 pm
The rates are being cached. Once they're cached, you wont be able to see the XMl until you start a new session (log out of the website, close browser, go back to site, log back in)
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mowlman on February 17, 2010, 21:04:29 pm
Ok, thanks!  I'll give it a try.  ;)
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: cbreninger on February 17, 2010, 21:18:39 pm
Hi Reggie,

My customer also noted that the UPS rates were not the same as when they went to make the shipment on the UPS site? Their comment was that the site was under-charging...Now they don't want me to use the UPS module...:(
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 17, 2010, 21:21:35 pm
Put your shop in debug mode.  Note the weights and prices returned.  if you are getting a different rate for the same weights, then that is a UPS issue.  also, don't forget the shipping modifiers and padding.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mowlman on February 17, 2010, 21:28:12 pm
Thanks Reggie,  that worked.

Do you know if I can get to the UPS XML request and response files besides seeing what the debug feature displays?  I wasn't sure if the files are formatted or not?

Thanks again.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 17, 2010, 21:32:14 pm
I've not coded the module to store the xml in any files, no.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mowlman on February 17, 2010, 21:41:49 pm
Ok, thanks,

I just have a UPS techie, looking into a few things for me and he is requesting me to provide my complete XML request and response files.  I was thinking these might be the same as XML post and XML response.  of course I may have made the wrong assumption.  ???

I'll have to get back with him. perhaps I'll just cut n paste the results from the xml post / results and give it to him?

Thank for your time.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 17, 2010, 22:45:24 pm
Yes, that would be what he wants.
-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: cbreninger on February 17, 2010, 23:06:07 pm
Reggie,

I am not sure that I understand what is going on here. I have a 1 lb item. No extra fees or modifiers.
On the site it says the estimated rates are (http://site1.jpg)

On the UPS site I get this for rates (http://ups1.jpg)

Am I supposed to enter transportation and fuel surcharges on the site?

Thanks!

[attachment cleanup by admin]
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 17, 2010, 23:10:17 pm
Put your shop in debug mode, or turn on the "extra" debug in the module (this is available in the latest version).  We need to see what's going on behind the scenes...
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: cbreninger on February 17, 2010, 23:26:48 pm
Reggie -

Nevermind - I figured it out. It was me, of course. :(

I went back into the settings for the module and put Residential for delivery and it came out properly. But that begs the question - what do I do for Commercial addresses?

I guess what I could use is a best practices manual for the UPS shipping module settings. Did I miss that somewhere? Does one exist? Do I need to write one? :)

Because I don't know as much as I should about the UPS charges - like what is the difference between Standard and Ground?

Thanks so much for your help!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 17, 2010, 23:41:45 pm
Currently, there's no way to differentiate between commercial/residential addresses. It's either/or, as you can see in the module config.

I would really like to make this a required "system" option when users create their accounts, or add shipping addresses.  Then, the module can query commercial or residential based on that.

As for a user manual/best practices, I don't know of any.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: cbreninger on February 17, 2010, 23:55:59 pm
So then, is it best to leave it on Residential addresses, as I'm assuming that is the higher rate, and the commercial addresses come out higher?

I don't know if I have seen the answer to this question or if it is possible - can you put the shipping module in twice? Once for commercial and once for residential?

I'm sure that's probably not a best practice. :)

We do have our users divided up into groups - regular users who are one time purchases (mostly residential) vs. dealers (who are mostly commercial).

If I get some time I may try to trot out a best practices manual, if you won't mind answering some of my more (or less) stupid questions. I think it would be a big help to newbies to the module like myself.

Thanks!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 18, 2010, 00:35:35 am
I believe you're right...there seems to be a residential charge tacked on.  There's no easy way to "put the module in twice".  It would be far easier to implement the residential/commercial designation for user signups.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: cbreninger on February 18, 2010, 01:02:59 am
Reggie,

Well, you are the programmer, so I will let you figure out the "how" is best. But I could see that choice being added to the user account as being very useful.

Question? Does UPS sometime just flake out for no good reason? And would it cause this error...(http://)

This occurred after I made the changes on using Residential vs Commercial. Then I turned off Standard rate and said "no" to "Show Standard shipping options on error or no UPS results". I was thinking I did not want Standard results.

If I check Standard rate and whether I say "yes" or "no" to the "Show standard..." I get the estimated rates (correctly), but then on the Shipping screen I am getting only the choice for the Standard rate? (http://)

I'm confused ???

I ran debug. Could this be my problem?(http://)

Thanks much!


[attachment cleanup by admin]
Title: Re: UPS v2.0 ----Did I do this right
Post by: jamiesbeck on February 19, 2010, 02:24:38 am
Did i do the install correctly?
for the database, it didnt actually add a new database...should it have?
i went to my phpadmin and clicked import and browsed to my ups2.0 mysql file
uploaded and thats it!

as for the other files, there were a lot so
i took filezilla and logged into the site, and
dropped the files down the corresponding folders that i found them in
and let them all over-write the old file.
thats pretty much it. i think there was only one actual folder i dropped in.

look right?
thanks
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 19, 2010, 03:24:22 am
Reggie,

Well, you are the programmer, so I will let you figure out the "how" is best. But I could see that choice being added to the user account as being very useful.

Question? Does UPS sometime just flake out for no good reason? And would it cause this error...(http://)

This occurred after I made the changes on using Residential vs Commercial. Then I turned off Standard rate and said "no" to "Show Standard shipping options on error or no UPS results". I was thinking I did not want Standard results.

If I check Standard rate and whether I say "yes" or "no" to the "Show standard..." I get the estimated rates (correctly), but then on the Shipping screen I am getting only the choice for the Standard rate? (http://)

I'm confused ???

I ran debug. Could this be my problem?(http://)

Thanks much!


Uhhhh..I'm confused too.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 19, 2010, 03:25:02 am
Did i do the install correctly?
for the database, it didnt actually add a new database...should it have?
i went to my phpadmin and clicked import and browsed to my ups2.0 mysql file
uploaded and thats it!

as for the other files, there were a lot so
i took filezilla and logged into the site, and
dropped the files down the corresponding folders that i found them in
and let them all over-write the old file.
thats pretty much it. i think there was only one actual folder i dropped in.

look right?
thanks
Sounds fine, as long as there were no errors..
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: jamiesbeck on February 19, 2010, 03:29:29 am
yes, now i am getting errors.
Notice: We are unable to ship UPS as an error occured. Please select
and
Notice: The error was: UPS Online Tools error.

sound like a mysql failure on my part?
i cant get it to go away.
i went to the administrator/shipping and have only yours checked to work.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 19, 2010, 03:32:50 am
Put your shop in debug mode. Run it again.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Longover on February 19, 2010, 22:17:36 pm
Hello,

I am trying to figure out why my shop won't calculate shipping with L/W/H.  I only started to notice this problem when the shop wouldn't calculate shipping correctly for a product that is considered oversized by UPS.

Here is the data from the product:
Length:
23
Width:
23
Height:
35
Unit of Measure:
inches
     
Weight:
22.0000
   
Unit of Measure:
pounds
     
Unit:
piece
   
Units in Packaging:
1
Units in Box:
1
    
Ships seperately:
(un checked)

Does this all look like it is setup correctly? 
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 19, 2010, 22:28:53 pm
First of all, I again need to stress that the L/W/H declaration works best with UNBUNDLED products (ship alone) that ship one per package, or can easily stack without causing an increase in package size.  Anything else is just not covered and can lead to undesirable results!

That said, did you read the "Usage" tab in the module config? It shows how to declare L/W/H via the VirtueMart configuration "shipping" tab.  I recommend setting it to declare L/W/H, but restrict it to UNBUNDLED items, and make sure your product is set to "ships alone".

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Longover on February 19, 2010, 22:56:24 pm
Do you mean this?  If not, I'm not sure where to find this info.
Usage
--------------
In VM administration, each product will have a new option called "Ships seperately".  This is found on the product's "Product and Dimensions" tab.
Unchecked, this product's weight along with any other "bundled" products will be combined and sent to USPS for a postage query.
Checked, this product's weight will be sent seperately, and then later added to the grand shipping total.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 19, 2010, 23:14:01 pm
Which version of the module are you using?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Longover on February 19, 2010, 23:44:33 pm
2.0
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 20, 2010, 00:04:11 am
vm_ups_v2.0.zip does not support L/W/H.  See the features list for each module.  You'll need to use a more recent version.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: allen1 on February 20, 2010, 01:05:25 am
Running
Joomla 1.5.15
VirtueMart 1.1.4
UPS v2.2010.02.15

I backed up my files and DBs, so far so good.

I loaded all files as per instructions using ftp.

When I go into VM Administration/Store/Shipping Module List, there is no option to choose UPS v2.0.  It doesn't show as a shipping module. 

I guess I've missed something, but I can't imagine what.

Each file was uploaded individually, and manually checked off the printed list of the instructions.  I did notice that there were some files in the zip folder that the instructions did not say to upload, so these were not.  There were maybe three or four in the file that the instructions did not say to upload.  Should these have been uploaded to their respective folders as well?

Any and all help would be appreciated.

Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 20, 2010, 01:09:26 am
Yes, I must have missed a few in the instructions.  If you could make note of which ones, that'd be great!  Yes go ahead and upload those as well.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Longover on February 20, 2010, 02:48:51 am
Okay, updated to the newest version.  Filled in all the info for ups and then ran a test transaction.  I'm getting this error:

Notice: We are unable to ship UPS as an error occured. Please select another shipping method.

Notice: The error was: class.Shipment::addItem() max_per_package for pid 119 was 0!upsv2::populate_shipment() Error adding product pid 119 to the shipment.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 20, 2010, 02:50:34 am
You have a max per package of zero for that product.  None of that product can be added to packages, hence the error.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Longover on February 20, 2010, 04:20:44 am
Ok.  That seems to have fixed it.  Thank you very much
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: allen1 on February 20, 2010, 21:05:10 pm
Yes, I must have missed a few in the instructions.  If you could make note of which ones, that'd be great!  Yes go ahead and upload those as well.


I uploaded all files into their respective directories, and now the module shows.  Not only does it show, but it also worked!  This fixed my problems with the "no oversize shipping" problem, which was plaguing me.   Thank you for adding this module, it really works.!!!!!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on February 22, 2010, 16:35:06 pm
I would like to change the text of how the shipping module displays in the two images attached. Can you tell me how I can change that text to say something different?

[attachment cleanup by admin]
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 22, 2010, 16:41:50 pm
The first can be changed in upsv2.php::list_rates()
The second can be changed in get_final_confirmation.tpl.php
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on February 22, 2010, 17:05:52 pm
There is no file called "upsv2.php::list_rates()" in either /components/virtuemart or /administrator/components/virtuemart. Am I searching for the wrong name? or just the wrong location?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 22, 2010, 17:06:40 pm
file /administrator/components/com_virtuemart/classes/shipping/upsv2
function name list_rates()
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on February 22, 2010, 17:20:06 pm
I found this code inside that file:

Code: [Select]
/**
* Writes the shipping rates
* @returns boolean True when successful
*/
function list_rates(&$d) {
global $vmLogger, $weight_measure, $VM_LANG,$CURRENCY_DISPLAY;
        global $order_total, $weight_total;  // for calculating free shipping on orders valued at a certain amount or higher
        global $addl_service_total_pretax;

        $html = '';

Where do I change the text? Like if I want it to change from whatever it says now to my own custom text?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 22, 2010, 18:06:51 pm
Depending on the features you have enabled, you could possibly need to modify anywhere from line 400 to 525.

Look at 417, 446, 521.  These lines start the radio button inputs.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on February 22, 2010, 19:18:16 pm
It still appears to me that both of these files call functions that are assembled in another file because I don't see actual text being made. These files are some sort of template that call other info from somewhere else. Let me start over, lets say on checkout i see the radio button that currently says
Quote
UPS Ground ($7.88)
. What if I wanted to add text before or after that like
Quote
Standard UPS Ground ($7.88)
Where would I insert the word "Standard"?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on February 22, 2010, 20:38:33 pm
What Im trying to do is make people aware that their order could possibly be shipped either UPS or FeDEX. I thought the easiest way to to this would be to modify the text from above and make it say "UPS or FedEX ground. Since both are pretty close on rates, I dont really care if the customer has the option to select which one, and we dont always abide by the request anyways if on is cheaper or we have to meet a quota to ups or fedex. Any other suggestions on this since I cant figure out how to change the text like I wanted to?

Also, How do I change the text on checkout that says "Shipping and Handling Fee" to just "Shipping Fee" ?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 22, 2010, 20:45:18 pm
If you want to change the servicename altogether, look around line 1029.  The switch there sets the service name. 
Be sure to clear the shipping rate cache after changing the names or you won't see a change in your session...(log out of VM, close browser, restart browser).
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on February 22, 2010, 21:02:38 pm
1029 is blank, the closest i see to something that might set a name would be line 973

Code: [Select]
function get_rate( &$d ) {

$shipping_rate_id = $d["shipping_rate_id"];
$is_arr = explode("|", urldecode(urldecode($shipping_rate_id)) );
$order_shipping = $is_arr[3];

Can i change it to:

Code: [Select]
function get_rate( &$d ) {

$shipping_rate_id = $d["UPS or FedEx"];
$is_arr = explode("|", urldecode(urldecode($shipping_rate_id)) );
$order_shipping = $is_arr[3];

to change the service name?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 22, 2010, 21:14:24 pm
Using the latest version, around 1029 looks like:

Code: [Select]
switch( $retRates[$resultsCount]["ServiceCode"] ) {
case "01":
$retRates[$resultsCount]["ServiceName"] = "UPS Next Day Air";
$retRates[$resultsCount]["isBasic"] = false;
break;
case "02":
$retRates[$resultsCount]["ServiceName"] = "UPS 2nd Day Air";
$retRates[$resultsCount]["isBasic"] = false;
break;

That big switch statement is where all the service names are set.  You can change them there.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: official on February 24, 2010, 08:09:14 am
******* Update ******

Version 2010.02.15 released. Here is the changelog:
   Feature Updates:
   - option to restrict products to ground shipping services
   
   BugFix:
   - Shipment Warning/ETA Quote/Guaranteed Days to delivery options now work

   Files Changed:
   upsv2.sql
   /admin/components/com_virtuemart/classes/ps_config.php
   /admin/components/com_virtuemart/classes/ps_product.php
   /admin/components/com_virtuemart/classes/shipping/class.Package.php
   /admin/components/com_virtuemart/classes/shipping/class.Shipment.php
   /admin/components/com_virtuemart/classes/shipping/upsv2.ini
   /admin/components/com_virtuemart/classes/shipping/upsv2.php   
   /admin/components/com_virtuemart/classes/shipping/upsv2/upsv3.config.tmpl.php
   /admin/components/com_virtuemart/html/admin.show_cfg.php
   /admin/components/com_virtuemart/html/product.product_form.php
   /admin/components/com_virtuemart/html/shop.product_details.php
   /admin/components/com_virtuemart/languages/admin/english.php
   /admin/components/com_virtuemart/languages/common/english.php
   /admin/components/com_virtuemart/languages/product/english.php
   /components/com_virtuemart/shop_image/shipping/ship_ground_only.png
   /components/com_virtuemart/themes/default/templates/product_details/flypage.tpl.php

I have installed this module, but it is not showing up in my module list.

I also installed the new version of the USPS module at the same time but it shows up and works fine.

Can anyone help?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 24, 2010, 09:23:34 am
Did you follow all of the installation instructions in the README.TXT file?  Also, if you are using my UPSv2 and USPSv5 together, you will have issues.  They were not designed to work together out of the box.  But at the very least both modules should be showing up in the list.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: official on February 25, 2010, 04:27:03 am
Did you follow all of the installation instructions in the README.TXT file?  Also, if you are using my UPSv2 and USPSv5 together, you will have issues.  They were not designed to work together out of the box.  But at the very least both modules should be showing up in the list.

Yes, I did.... The old version(2.0.2009.05.28) is still working just fine.  I copied the joomla directory to the joomla directory on my server... as I did with the USPS files... though they were in a subfolder... not the main joomla folder.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: allen1 on March 01, 2010, 23:30:00 pm
UPS v2.0 fixed all the problems we were having with UPS shipping, and I've got only one other thing to fix:

Some of our products (such as lessons) are non-taxable.  To get VM to not charge tax, we have to set virtual tax to "no", and give the product a zero weight. 

When a customer has paid for a lesson, and is in checkout, the UPS v2.0 module tries to get a cost for UPS based on weight, and errors out saying "no rate for zero weight product".

I can;t get past this error. (Of course it's not really an error, UPS is replying correctly to what it's being told.)

How can I tell UPS v2.0 to not try and get a shipping charge for this product?  Can it be done?  Can I tell VM or UPS v2.0 that this lesson is not a sippable item?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 01, 2010, 23:34:39 pm
You would need to modify upsv2 to disregard any product you don't want calculated.  If you'd like, you could hire me to add to the product shipping tab a "does not ship" checkbox, which would then cause the product to be skipped.  Of course if no products are to be shipped, something like "no shipping fee $0" would need to be shown on the shipping page, or somehow skip the shipping page altogether.

Alternatively, there is a "shipping bypass" modification somewhere out there on the forums. I don't remember exactly where it is but I know it works.  Try searching "Shipping Bypass" in the forums.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: AngelaACS on March 03, 2010, 17:40:38 pm
Is there an option, or have you modified for anyone else, to be able to shut off the UPS-API option globally for all orders over 150lbs? Or, is there a way of setting it per product, if over 150 lbs, don't show the UPS shipping option?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 03, 2010, 17:43:18 pm
The only option for over 150lbs is to use the "Freight Shipping" option.  This will notify the user that additional shipping charges apply.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: ZenMasta on March 06, 2010, 20:44:53 pm
I  need help writing an update query so I can automate setting the per item ship price on all my items. luckily I only have 2 prices depending which category it is in.

I need to update the product/shipping table with $5 where category id=15

I had used csvi to import all my products and manually entering the flat rate shipping for all these would take far too long.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: official on March 08, 2010, 23:29:16 pm
What do I need to do to correct this error please?

JDatabaseMySQL::query: 1054 - Unknown column 'ship_freight' in 'field list' SQL=UPDATE `jos_vm_product` SET `vendor_id` = '1', `product_sku` = '1010', `product_name` = 'C2 Black Pearl w/ Laser', `product_desc` = '
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 08, 2010, 23:35:41 pm
Your SQL updates didn't apply.  Try running each SQL update individually.

Incidentally, I've been researching a way to make the SQL updates smarter, so this won't be an issue for future releases once I figure it out.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: official on March 09, 2010, 00:38:33 am
SQL query:

/* * Version 2010.02.15 * Reggie Campbell * * TODO: Make this SQL smarter, especially for upgrades * * *//* * Product Table Updates */ ALTER TABLE `jos_vm_product` ADD COLUMN `ship_alone` CHAR( 1 ) NOT NULL DEFAULT 'N' AFTER `ship_code_id` ;



MySQL said: 

#1060 - Duplicate column name 'ship_alone'


Error
SQL query:

ALTER TABLE jos_vm_product ADD COLUMN ship_aloneCHAR( 1 ) NOT NULL DEFAULT 'N' AFTER ship_code_id

MySQL said: 

#1060 - Duplicate column name 'ship_alone'
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 09, 2010, 00:53:36 am
Right. Which is why the updates didn't apply completely.  Now go to the next one. Then the next. And so on.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: official on March 09, 2010, 01:01:07 am
Which SQL file should I attempt to update?  I am confused!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 09, 2010, 01:43:22 am
take the upsv2.sql file. copy one SQL command. Enter it into the SQL command window in phpmyadmin.  Then go to the next command. Repeat until all commands have been entered.  Ignore duplicate column errors.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: official on March 09, 2010, 01:56:23 am
Thanks!  Now I understand :)
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: official on March 09, 2010, 03:04:40 am
I finally got it fixed!  Thanks for your patience and help!!!!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 09, 2010, 03:05:11 am
glad to hear it!
-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: ZenMasta on March 09, 2010, 08:46:44 am
In configuration, is The UPS Shipping module, version 2.2010.02.15 the only option that should be checked if all I'm interested in is flat rate per item shipping?

I have everything unchecked except this and I get two notice errors, one for ups and ups online tools, and besides that I still see 2 dhl options and one customer pickup (custom shipper that I made before installing ups v2)
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 09, 2010, 15:24:15 pm
You'll still need to configure the module with your UPS credentials/etc.  The flat rate fee was designed to work alongside actual rates, not as a stand-alone feature.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: ZenMasta on March 09, 2010, 19:08:40 pm
So then which other modules do I need to enable and where do I configure the ups credentials? I see shipper/rates but nothing specifically for ups account information.

in admin>configure>shipping I don't see any place to enter this info either.

[attachment cleanup by admin]
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 09, 2010, 19:32:41 pm
Like all other shipping modules, you configure it via Administration->Store->Shipping Module List
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: ZenMasta on March 09, 2010, 19:49:40 pm
Oh I hadn't even noticed that option... dang, I gotta get ups to give me api access.
Okay so once I enter my access key, un/pass boxes for the authorized ship methods do I need to choose to utilize the flat rate prices?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 09, 2010, 19:50:50 pm
Once you've installed the module, please view the "Usage" tab for details on how to configure the module.  Flat rate pricing is covered there.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: ZenMasta on March 10, 2010, 22:43:15 pm
I added my ups login and access code. When I checkout I got an error saying couldn't process zero weight, so I set everything to 1 pound and tried again.

As you see from the screen grab, I get 2 errors.

And as I posted in a previous screen grab, the only shipping module I have checked is The UPS Shipping module, version 2.2010.02.15
[edited - since this post I removed all shipping rates and shippers except my customer pickup one]
Also here is the debug info

Quote
upsv2::list_rates() - ****** Starting 'All Services' shipment ******
class.Shipment::addPackage() - Adding a new bundled package
class.Shipment::addPackage() - Package Number: 1
class.Shipment::addPackage() - Package is Bundled
class.Shipment::addPackage() - Maxweight: 150
class.Shipment::addPackage() - Padding: 0.01
class.Shipment::addPackage() - Shipping Info - Country: US State: CA ZIP: 95060
class.Shipment::addPackage() - Tax Rate: 0 Tax Instate:
class.Package::addItem() - ***** Adding item 546 (7'10"Hybrid Round Squash) to package #1 *****
class.Package::addItem() - Flat Fee. Setting effective modifier of 0% for pid #546, Package #1 (Ground Services only)
class.Package::addItem() - Adding flat fee (200) for pid #546, Package #1 (Ground Services only)
class.Package::addItem() - (Ground Services) Weight: 1.01, modifiedWeight: 0, freeWeight: 0, flatWeight: 1.01
class.Package::addItem() - (Non-Ground) Weight: 1.01, modifiedWeight: 1.01, freeWeight:0 , flatWeight: 0




[attachment cleanup by admin]
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 10, 2010, 23:44:29 pm
That's a strange one. I'm not sure why you got a blank message there.  You should have also gotten another Notice explaining what went wrong.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 11, 2010, 16:37:31 pm
Have you tried it with VirtueMart debug on?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: ZenMasta on March 11, 2010, 18:40:40 pm
Isn't that what I quoted?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 11, 2010, 18:44:42 pm
That's from the "extra debug" feature in UPSv2.  I mean VirtueMart's own debug setting.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: ZenMasta on March 11, 2010, 18:55:31 pm
I think the problem was that I did not choose a ups shipping method. So I had checked UPS ground as an authorized shipping method. I think its working fine now.

Is there a way I can change the display name of the shipping method? Instead of saying UPS ground I'd rather it just say Ground.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 11, 2010, 18:58:11 pm
Might as well send it all.  You can email it to me.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: ZenMasta on March 11, 2010, 18:59:16 pm
Thanks Reggie, but I figured out the problem was my fault. I edited my last post just as you replied.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 11, 2010, 19:34:10 pm
FYI,  my next release of the module will include a check for no services defined, and will show a warning in the debug and info messages.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: zeusrw on March 18, 2010, 19:09:45 pm
Installed UPS2 and all looks good except I am struggling with the following:

1) The "tax only in-state users" doesn't appear to be working.  I am shipping from Ontario, Canada and my test user from the US is charged tax on shipping - the checkout doesn't charge tax on the product.

2) Is there a way to differentiate between shipping in-state, in-country and in-ternational.  I need to charge sales tax at different rates for each.

Thanks
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 18, 2010, 19:37:43 pm
***** NOTICE *****

I've been working with another user on my FedExv2 module dealing with shipping taxes, and I've decided that the whole shipping tax system needs a revamp, including in UPSv2 (this post and the following offer is directed towards UPSv2).

Not only does the original VirtueMart code apply shipping tax to every order, but sometimes the calculation used is incorrect and results in the tax being a few percent off.  I tried to alleviate some of the tax issue in my last tax update for UPSv2, but I think it fell a little short.

Now, I'd like to revamp the system to correctly calculate tax, and give admins the option to apply the tax only when the user is in the same state as the shipper (unless someone comes forward with a need to always add tax).  This will be a little tricky due to my "ship from manufacturor" feature, but I am confident that I can correctly implement this revamp.

I would like to take advantage of the tax rate definition mechanism already in use in VirtueMart, and use those rates to determine the in-state tax rates.  I will remove the "tax rate" definition in the module itself.  Any item shipped "from manufacturor" (this is a UPSv2 feature) will use the manufacturor's address as a basis for determining the tax rate (for that particular package).  Any item not configured to ship "from manufacturor" will use the store's address as a basis for determining the tax rate (for that particular package).

If the shop is set to not add tax, then the shipping module will not add tax either, unless someone comes to me with a reason to do otherwise.

I will also add appropriate debug information so that shop admins can see for themselves that the module is correctly calculating the tax.



I believe this will take around 5 hours time.  If anyone would like to help underwrite this update, please contact me.

zeusrw, as to your in-state, in-country, international tax situation, I assume you're referring to PST/GST/HST Canadian tax?  That will require additional time.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: zeusrw on March 18, 2010, 20:02:48 pm
Thanks for the swift update.  I don't know why this wasn't a feature in the VM tax calc in the first place.  It seems to be capable of working out the tax rate for the product so it only makes sense that the same tax rate could (or indeed should) be used as the basis for the shipping tax.

Another issue I have just noted is the use of currency.  The store's default currency is set as USD.  I have the "select your currency" module active so that the user can select USD, GBP, CAD or EUR.  Everything seems to translate correctly using the currency conversion module but the rates pulled by UPS2 don't seem to factor that in, i.e. I pull a rate and it's USD 30, I then change the currency to GBP and the shipping rate now becomes GBP 30... not GBP 20 (or whatever the rate should be).  The standard shipping module and the zone shipping module seem to handle this fine.  Am I missing something?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 18, 2010, 21:41:12 pm
Currency support is something I did address in my FedExv2 module.  I'd be happy to add that same support to UPSv2, if you'd like to underwrite the update.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Oebel on March 23, 2010, 08:56:15 am
Hi,

just wondering if the ETA for shipping actually works.

As far as I know, I turned on the ETA setting in the module. The rates are showing in the checkout-proces, but there is no ETA visible.

What am I missing?

Best regards,

Oebel

[attachment cleanup by admin]
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 23, 2010, 13:13:58 pm
It was working last time I checked.  It does not, and will not ever work for Ground services, simply because UPS does not give an ETA for it.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on March 23, 2010, 13:59:10 pm
Reggie, do you have anything available to show a shipping estimate in, lets say, a module position. Or have a link somewhere that lets customers check their shipping without having to go through a partial checkout? just add products to their cart and enter a zip code?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 23, 2010, 14:02:41 pm
Yes, my Cart Rates plugin does just that.  It can show the shipping rates in the cart, before checkout, or in the mini cart.  Look for the download on my website.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on March 23, 2010, 17:03:24 pm
Yes it does! Found it, downloaded it, installed it, enabled it, and tested it, all within 5 minutes and it works great! Thank you for this!!!! Your awesome!!!!!!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Paiyili on March 26, 2010, 02:18:57 am
Hello,

I have installed your UPSv20 module in Virtuemart E-Commerce edition (Joomla 1.5/Virtuemart 1.1.4) and am experiencing the inability so save products.  I followed instructions, and inserted the database fields as required.  I know you have dealt with this before, and I thought you might have an approach for fixing it.

If it helps, 2.0.2009.06.26 is installed and working correctly.  I intend to do further testing in JSAS tomorrow, but wanted to ask how you solved this issue before.  Thanks.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 26, 2010, 02:39:51 am
It's probably a database issue. Check that all of the updates were applied successfully.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Paiyili on March 26, 2010, 10:53:42 am
I jolted awake at about 5:50 AM and said "context".  The context of the second part of my question was incorrect.  Joomla 1.5/Virtuemart 1.1.3 in JSAS, not Virtuemart 1.1.4.  Anyway I felt bad that you might have wasted time on the question with incorrect information.  Nice to see that you wasted no time on it.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 26, 2010, 13:21:27 pm
The latest version is built on VM1.1.4, that may be the issue.  I do not test it on VM113 or lower code.  You could still check the database to see if that helps.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Oebel on March 30, 2010, 07:53:36 am
Hi people,

did somebody already figured out how to handle tax for customers who are in a different country?

I saw that this question was asked before in this thread, but I couldn't find a correct solution to this.

Basically what I'm looking for is the following:
- Our shop is in Netherlands
- Customer comes from i.e. Belgium and filled in his VAT id number
- Because of the VAT ID number, he doesn't need to pay tax for product / shipping.

For the products, the tax is left out. But for the shipping this doesn't work. I already tried with the "Tax-only in-state users" but this doesn't work.

Thanks in advance for your replies.

best regards,

Oebel

[attachment cleanup by admin]
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 30, 2010, 14:04:31 pm
Oebel,
I'm actually working on a tax update for UPSv2 right now.  The tax system will work like the product tax system does.  This should cover your needs.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Oebel on March 30, 2010, 16:03:20 pm
Hi Reggie,

I'm looking forward to it  ;D

Best regards,

Oebel
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 31, 2010, 14:21:23 pm
Oebel,
Could you please describe how your tax is set up in VM, and how it should work? Also, would you be willing to test the new tax code?

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Oebel on April 01, 2010, 08:17:48 am
Dear Reggie,

the current situation is as follows:

Current situation:
- Shop is setup in European Union tax mode
- 2 shopper groups (Default and EU-VAT-ID)
- when a shopper fills out his EU-VAT-ID number, he will be moved to the group EU-VAT-ID.
- Currently the tax for the products is calculated correctly.
- The tax is not correct calculated for the shipping costs (in current situation, everybody is paying taxes, even if they don't need to according by law)


Target situation:
All of the above, except that when the customer is in the group EU-VAT-ID (because we know his VAT-ID), we will not charge him for taxes for shipping.

Ofcourse I will test for you. Just PM me for more information.

Thanks in advance!

Oebel
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on April 05, 2010, 18:00:25 pm
****** Feedback Needed ******
Hi all,
I'm trying to determine how EU shipping tax works.  One description I've been given is this:
- The shop is based in the EU
- A fixed percentage tax is charged, when applicable
- If the user is outside of the EU, no tax is charged
- If the user is in the EU and the same country, tax them the fixed percentage
- If the user is in the EU, but not in the same country, and:
a) have a tax ID which matches the shop's, no tax is charge
b) do not have a matching tax ID, tax them the fixed percentage

Does this also apply to your country in the EU? If not, how is yours different?
Please email (preferred) or private message (not preferred).

Thanks!
Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: djreason on April 07, 2010, 02:57:52 am
Reggie,

Great product you got here.  Nice Job!

Is there a way to apply a shipping restriction in bulk?  I want to restrict free shipping to Alaska and Hawaii, so only those customers in those states have to pay what the UPS fees shown are.  I see that I can apply the shipping restriction i created in each individual product, but when I have thousands of products, it would be nice to do this feature in bulk.  is there a way?

Thanks!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on April 07, 2010, 03:17:22 am
The quickest way would be via a SQL command.  Find the shipping restriction ID, and apply it in bulk to the necessary products.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: djreason on April 07, 2010, 03:37:27 am
If someone could layout step-by-step how to restrict free shipping to only 2 states, that would be awesome!

I still want people from these 2 states (Hawaii, Alaska) to be able to order from me.  I just want them to NEVER see free shipping option regardless of order size.

Anyone figure out how to do this?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on April 12, 2010, 15:33:49 pm
Reggie,

Do you know of a way I can add the order total weight to my order.order_print.php file so that the order total weight displays at my backend when viewing order details?

I have tried the following:

<tr class="Stil1">
                  <td colspan=4 align=right><?php echo $VM_LANG->_('PHPSHOP_ORDER_PRINT_WEIGHTTOTAL') ?>:</td>
                  <td><?php echo $total_weight ?>  kg</td>
                </tr>

But on the actual page it only shows up as "Total Weight:      kg" It doesn't calculate. (I know how to change kg to lbs)
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on April 12, 2010, 15:36:08 pm
I believe it's $order_weight.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on April 12, 2010, 15:41:53 pm
I've tried three different things now: $order_weight $total_weight and $weight_total and none of them calculate. Any ideas?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on April 12, 2010, 15:46:16 pm
I've tried three different things now: $order_weight $total_weight and $weight_total and none of them calculate. Any ideas?

Actually, at that point all you have is $order_id and a database object for that order, $db.  The order does not record the total weight, but it does record all of the items.  So you'll need to find all of the items in the order, loop through them, get their weights, and aggregate those weights.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on April 12, 2010, 15:51:52 pm
I've never done anything with the database, and I don't know anything about code. Is their any chance you can take a look through what you're talking about and send me some code?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Oebel on April 19, 2010, 14:14:03 pm
Hi Reggie,

do you already have some news on the taxes issue?

Tia,

Best regards,

Oebel
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on April 19, 2010, 16:59:24 pm
Still waiting on my client.
-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: timothy vanbibber on April 22, 2010, 19:50:08 pm
Any interest in adding the option for multiple shipping addresses? ie... customer purchase 3 items, and wants all 3 items to be shipped to seperate addresses.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Oebel on April 27, 2010, 09:34:55 am
Current situation:
- Shop is setup in European Union tax mode
- 2 shopper groups (Default and EU-VAT-ID)
- when a shopper fills out his EU-VAT-ID number, he will be moved to the group EU-VAT-ID.
- Currently the tax for the products is calculated correctly.
- The tax is not correct calculated for the shipping costs (in current situation, everybody is paying taxes, even if they don't need to according by law)


Target situation:
All of the above, except that when the customer is in the group EU-VAT-ID (because we know his VAT-ID), we will not charge him for taxes for shipping.

As mentioned above, the current setup is not working for correct taxing the shipping.

I made some adjustments based on Reggie UPS / FEDEX module.

- Create an extra shopper group called "EU-VAT-ID" (see picture)
- Create an user field called "vm_vat_id" (field type is EU-VAT-ID) (see picture)

- Edit the file administrator\components\com_virtuemart\classes\shipping\upsv2.php
- Add at the beginning of the file (around line 64 for example) the line
"var $vat_id;"

- Look for the function get_tax_rate (around line 1187 in my case)
- Delete this function complete (the total function is around 40 lines, so this ends around line 1220)
- Put the following code:
function get_tax_rate() {
      
      global $vmLogger, $vendor_country_2_code, $ps_shopper, $vars, $mainframe;
        require_once(CLASSPATH ."shipping/".__CLASS__.".cfg.php");
       $dbu = new ps_DB;   // user information
      // get user info for VAT_ID
      $q  = "SELECT * FROM #__{vm}_user_info WHERE user_info_id='" . @$vars["ship_to_info_id"]."'";
      $dbu->query($q);
      $dbu->next_record();
      $vat_id = $dbu->f('vm_vat_id');
      $vmLogger->debug(" $vat_id  <------ VAT-ID length strlen($vat_id) ");

        if ( ($vendor_country_2_code!=$this->dest_country) && (strlen ($vat_id) != 0))  
      {  
            return 0;    
            }else{
          if(intval(UPS_TAX_CLASS)==0) {
               return 0;
           }else{
               require_once( CLASSPATH."ps_tax.php" );
               $tax_rate=ps_tax::get_taxrate_by_id(intval(UPS_TAX_CLASS));
               $vmLogger->debug("upsv2::get_tax_rate() - Using shipping tax rate $tax_rate");
               return $tax_rate;
           }
           
        }
    }
//End of Tax_Code

Again, this would not be possible with the module of Reggie (many many thanks).

Maybe this is interesting for other people with tax / shipping issues.

Best regards,

Oebel

[attachment cleanup by admin]
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on May 05, 2010, 15:26:22 pm
****** Feature Update ******
version UPSv2.2010.03.26
Shipping Tax Revamp

Shipping tax now mirrors how product tax works, with the exception of an additional configuration option to only tax in-state users.  The product tax configuration determines how shipping tax will be calculated; i.e. "Based on shipping address", "Based on vendor address", or "EU mode".

These shipping options have been well tested for Canadian and USA tax setups.  The EU mode shipping tax is currently untested.

NOTE: This version currently does not fully support shipping tax for "drop shipping" (aka "Ship From Manufacturer").  If you are using this feature of the module, the tax applied for drop shipped packages may be zero.


VirtueMart Multiple Currency Support
The module now fully supports mod_virtuemart_currencies.  All shipping rates will be correctly converted to the selected currency.


How to obtain a copy
The client who underwrote this modification could not cover the full cost, as the time involved overran my original estimate.  I will not be releasing this update publicly until that time has been compensated for.  To obtain a copy, please contact me via email.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on May 05, 2010, 18:48:27 pm
Is there a way to display the total weight and number of boxes being calculated on the estimator?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on May 05, 2010, 18:56:19 pm
Is there a way to display the total weight and number of boxes being calculated on the estimator?
Well, the estimator uses its own copy of the shipment and package classes.  So you'd have to loop through each package in the shipment, add that weight to a total. counting the packages would be as easy as:
echo count($upsv2->shipment->packages);
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on May 05, 2010, 19:31:53 pm
How do i go about "looping through" each package in the shipment? Do you have any more info on what I may do to get that to happen?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on May 05, 2010, 19:41:12 pm
My replies all assume you'll be doing the coding yourself...are you?

In the cart rates plugin, there is:
Code: [Select]
$upsv2_obj = new upsv2();
$upsv2_obj->dest_country = $country_2;
$upsv2_obj->dest_zip = $_SESSION['auth']['zip'];

$upsv2_obj->populate_shipment();
$rates_array = $upsv2_obj->shipment->getRates();
$upsv2_obj->modify_rates($rates_array);

This sets up the order, puts everything into packages, and gets the rates.  You could do something like:

Code: [Select]
$weight = 0;
$package_count = count($upsv2_obj->shipment->packages);
foreach ($upsv2_obj->shipment->packages as $key=>$data){
$weight += $data->weight;
}

then later on:
Code: [Select]
echo "Total weight: $weight";
echo "Total packages: $package_count";
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on May 05, 2010, 20:32:19 pm
Yes, Im going to TRY to do the coding myself. All I really need to know is where, and what to change or add to the code.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on May 05, 2010, 20:37:13 pm
its in the cart-rates template file, under the cart-rates directory for the plugin.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on May 12, 2010, 15:43:18 pm
Reggie, Im having a lot of problems with the rates from your module. Im currently having to pad the weight by 76% to match our standard ups and fedex rates. Any idea why the rates are so low? Am I not setting this up correctly? All of my products have the correct weight set up, approximately how many fit in a box, and weather or not it can only ship via freight only. Is there anywhere I can see the actual rate values that your mod is using for all the different ups zones?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on May 12, 2010, 15:50:26 pm
Reggie, Im having a lot of problems with the rates from your module. Im currently having to pad the weight by 76% to match our standard ups and fedex rates. Any idea why the rates are so low? Am I not setting this up correctly? All of my products have the correct weight set up, approximately how many fit in a box, and weather or not it can only ship via freight only. Is there anywhere I can see the actual rate values that your mod is using for all the different ups zones?

Put VirtueMart in debug mode, and select "Show Extra Debug Info". You should be able to see the XML requests/replies.  Note that you'll only see it once per unique package due to rate caching.  In order to see it again, log out and back in and re-run the checkout.

Reggie

ps. I've never heard of anyone having to pad their products that much
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on May 12, 2010, 15:56:52 pm
Yeah, my site crashes when I enable the virtuemart debug mode. I get a page that says:

500 - JDatabaseMySQL::query: 1054 - Unknown column 'topmenu' in 'where clause' SQL=SELECT m.* FROM jos_menu AS m WHERE menutype=topmenu AND m.published=1

You may not be able to visit this page because of:

   1. an out-of-date bookmark/favourite
   2. a search engine that has an out-of-date listing for this site
   3. a mistyped address
   4. you have no access to this page
   5. The requested resource was not found.
   6. An error has occurred while processing your request.

Please try one of the following pages:

    * Home Page

If difficulties persist, please contact the System Administrator of this site.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on May 12, 2010, 15:58:52 pm
No worries.  If you can enable the "extra debug info" in UPSv2 it should provide enough information about how the packages are being set up.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on May 12, 2010, 16:26:03 pm
I don't think I have that feature with my version which needs updated. I installed your mod about 6-8 months ago so I need to install the most current one. I'm really afraid to update this because its a live site. To make matters worse, I can not for the life of me figure out how to make an offline demo copy of the site. So, im stuck again... not your fault tho, i need to figure out how to make a offline copy before I do any major updating. 
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on May 12, 2010, 16:27:44 pm
I use JoomPack (I think it's called something else now, Akeeba?).

Good luck!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on May 17, 2010, 22:07:24 pm
Reggie, I tried to upgrade to the latest version of your ups module just now and I didnt understand the last step about something to do with database something or other. I uploaded all the new files to my site and now the ups doesnt calculate at all. I get errors that says "Notice: We are unable to ship UPS as an error occured. Please select another shipping method.
Notice: The error was: UPS Online Tools error."

The best part: its a live site! I could not duplicate my site offline in a sandbox mode, so i have no choice to work with a live site! :( help! 
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on May 17, 2010, 22:14:30 pm
Reggie, I tried to upgrade to the latest version of your ups module just now and I didnt understand the last step about something to do with database something or other. I uploaded all the new files to my site and now the ups doesnt calculate at all. I get errors that says "Notice: We are unable to ship UPS as an error occured. Please select another shipping method.
Notice: The error was: UPS Online Tools error."

The best part: its a live site! I could not duplicate my site offline in a sandbox mode, so i have no choice to work with a live site! :( help! 

You must make the database changes as listed in the sql file.  If you'd like me to take over and get it working, I can do so for a small fee.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: djwil on May 21, 2010, 13:48:52 pm
Reggie thanks for your help so far. Got the update in and the sql database seems to be operational, but until I find out how to do this I can't test. I cannot find out where you add a manufacturer address in order to get drop ship pricing. Do I need a special module for this. Under add manufacturer, there is no address input, just e-mail. Any help is appreciated.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on May 21, 2010, 14:23:56 pm
It sounds to me like you did not copy all the files over.  There should be a new tab on the manufacturer page to input the address info.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: djwil on May 21, 2010, 15:43:47 pm
Thanks - that did it.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on May 26, 2010, 20:32:21 pm
****** Update *******
Version 2010.03.26 is now 60% funded.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: aravot on May 27, 2010, 04:00:28 am
What is new in this version?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on May 27, 2010, 04:13:17 am
This version is my next attempt at reconciling shipping tax.  It's not 100% tested, but seems to work for US and Canadian shops. 

Tax sure is a headache.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Ericc on June 16, 2010, 02:18:44 am
 Reggie thank for your work on this UPS module it's been great. I have  question about the shipping restrictions.

1. When making a restriction where you want the restriction to apply to an entire state do you need to enter a zip code range? Or can this field be left blank or do I need to Span the entire range. (ie. All of Hawaii would be 96701-96898.

2. How does the shipping restriction work? Most of the time the user's address isn't known until checkout. Is it suppose to kick them out of the checkout process and back to their cart?

I've define shipping restrictions but cant find it actually functioning anywhere at the moment.

[EDIT]: I found the problem was I was using a range of zip codes with a "-" separator. Leaving the zip code field blank fixed the problem.

Eric
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: molahs on July 02, 2010, 23:42:00 pm
Reggie, well done for this module.
I just upgraded to the Feb 2010 version and I have 2 questions as follows:

1. The shop I manage wants to have free shipping if orders are over x amount BUT only if shipping inside USA. if shipping outside USA then shipping is not free.

2. The free shipping is only applied to Standard shipping. User should still be able to select other shipping options for the normal UPS fee.

I would assume in case of option 2, user should see the normal selected shipping options but for standard shipping it should just be 0.

does your UPS version currently cater for these 2? If so, where would i set this up?

Many thanks in advance
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 02, 2010, 23:45:14 pm
molahs:

1) UPSv2 handles free shipping, but does not have country granularity

2) If you only want free shipping applied to the "standard shipping" module, you'll need to modify the standard shipping module, not UPSv2

So, no, it does not handle this.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 02, 2010, 23:46:14 pm
2) Did you mean "UPS Standard"?  :P
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: molahs on July 03, 2010, 15:30:58 pm
Reggie, I have been involved in the open source community for many years. It's heart warming to see a developer who is so dedicated and responds so quickly.

Yes. I meant UPS standard.
in many online shops, certain items will ship for me for the normal UPS shipping, however the user is given an option to select quicker options should they prefer to pay for the shipping. I think adding this functionality will make this module even more usable.

Thanks again.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 03, 2010, 15:39:32 pm
sorry, I should have gone ahead and answered my followup anyway.  The module currently has service level free shipping for "Ground", but you could add "Standard" to the list of "ground services" in the module to make it also give free shipping over X amount.  You'll still need to add code to restrict that free shipping to the US.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: molahs on July 06, 2010, 21:35:18 pm
Reggie, care to expand on that a bit or let me know where i can set this up?
At the moment, if the cart total is over the value set for free shipping, i just get at checkout - your order shipping is free, without any option to choose other delivery methods. doing what you'll describe solve that?

Thanks.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 06, 2010, 21:52:05 pm
Reggie, care to expand on that a bit or let me know where i can set this up?
At the moment, if the cart total is over the value set for free shipping, i just get at checkout - your order shipping is free, without any option to choose other delivery methods. doing what you'll describe solve that?

Thanks.

It sounds like you have a free shipping amount set in Virtueart.  The free shipping amount for UPSv2 applies only to UPSv2 services.  If you're only using UPSv2, you should clear out the free shipping amount in the VirtueMart config, so it will not override the UPSv2 free shipping setting.

I've checked the code, and "UPS Standard" is already designated as a basic service (look in upsv2.php, $ups_service_group_list declaration), so any free shipping amount or zero % shipping modifiers should already apply to that service.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: molahs on July 07, 2010, 20:16:45 pm
Thanks. that was exactly what i was looking for. Using the instructions above i was able to solve my problem.
now i only need to solve the international shipping :)
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Havcom Systems on July 09, 2010, 18:44:36 pm
Will this module allow me to designate certain items as "overweight" and add an additional fee to these items?  Or better yet, not charge anything and force the customer to call for a shipping estimate?
Or do I need to set this up some other way? 

Thanks, Justin

www.myhavcom.com
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 09, 2010, 19:41:50 pm
Will this module allow me to designate certain items as "overweight" and add an additional fee to these items?  Or better yet, not charge anything and force the customer to call for a shipping estimate?
Or do I need to set this up some other way? 

Thanks, Justin

www.myhavcom.com

You could set it as 'ships freight'.  This will cause the item to be ignored, and an 'additional shipping fee required' message to be displayed during checkout.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Havcom Systems on July 09, 2010, 21:33:45 pm
Awesome, I'll go ahead and try installing it then.. This will really save us if it works..  Thanks a ton for responding!!!

Justin

www.myhavcom.com
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: molahs on July 09, 2010, 23:23:51 pm
I'm not sure if i've done something wrong.
when users try to ship to a country outside of the US i get this error:
"Notice: We are unable to ship UPS as an error occured. Please select another shipping method." and just below that: "Notice: The error was: "
there is nothing else displayed.
I have tried this on various addresses overseas and always seems to get this error.

When using an address in USA i don't have any problems.
How can i see what is causing this error? (debug feature in ups v2 isn't showing anything specific to this error?)

Edit: My products have weight, so this isn't a weight issue.

Thanks
Molahs.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 09, 2010, 23:26:52 pm
I'm not sure if i've done something wrong.
when users try to ship to a country outside of the US i get this error:
"Notice: We are unable to ship UPS as an error occured. Please select another shipping method." and just below that: "Notice: The error was: "
there is nothing else displayed.
I have tried this on various addresses overseas and always seems to get this error.

When using an address in USA i don't have any problems.
How can i see what is causing this error? (debug feature in ups v2 isn't showing anything specific to this error?)

Edit: My products have weight, so this isn't a weight issue.

Thanks
Molahs.

Have you tried the "extra debug" setting? Log in as admin, create a new address exactly like the one you're having problems with, and turn that feature on.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: molahs on July 09, 2010, 23:54:05 pm
i did. tried it with a US address an International address:
international output shows:
upsv2::list_rates() - ****** Starting 'All Services' shipment ******
class.Shipment::addPackage() - Adding a new bundled package
class.Shipment::addPackage() - Package Number: 1
class.Shipment::addPackage() - Package is Bundled
class.Shipment::addPackage() - Maxweight: 150
class.Shipment::addPackage() - Padding: 0.01
class.Shipment::addPackage() - Shipping Info - Country: US State: FL ZIP: 33442
class.Shipment::addPackage() - Tax Rate: 0 Tax Instate:
class.Package::addItem() - ***** Adding item 25 (Azzaro) to package #1 *****
class.Package::addItem() - (Ground Services) Weight: 0.606, modifiedWeight: 0.606, freeWeight: 0, flatWeight: 0
class.Package::addItem() - (Non-Ground) Weight: 0.606, modifiedWeight: 0.606, freeWeight:0 , flatWeight: 0
class.Package::addItem() - ***** Adding item 25 (Azzaro) to package #1 *****
class.Package::addItem() - (Ground Services) Weight: 1.212, modifiedWeight: 1.212, freeWeight: 0, flatWeight: 0
class.Package::addItem() - (Non-Ground) Weight: 1.212, modifiedWeight: 1.212, freeWeight:0 , flatWeight: 0
class.Package::addItem() - ***** Adding item 25 (Azzaro) to package #1 *****
class.Package::addItem() - (Ground Services) Weight: 1.818, modifiedWeight: 1.818, freeWeight: 0, flatWeight: 0
class.Package::addItem() - (Non-Ground) Weight: 1.818, modifiedWeight: 1.818, freeWeight:0 , flatWeight: 0
class.Package::addItem() - ***** Adding item 25 (Azzaro) to package #1 *****
class.Package::addItem() - (Ground Services) Weight: 2.424, modifiedWeight: 2.424, freeWeight: 0, flatWeight: 0
class.Package::addItem() - (Non-Ground) Weight: 2.424, modifiedWeight: 2.424, freeWeight:0 , flatWeight: 0
class.Shipment::addItem() - ****** Warning! Zero weight item! PID: 88 ******
class.Package::addItem() - ***** Adding item 88 (Passion) to package #1 *****
class.Package::addItem() - (Ground Services) Weight: 2.424, modifiedWeight: 2.424, freeWeight: 0, flatWeight: 0
class.Package::addItem() - (Non-Ground) Weight: 2.424, modifiedWeight: 2.424, freeWeight:0 , flatWeight: 0


this is where it stops.
The US address has this following the identical code above:
class.Shipment::getRates() - ************ Starting Rate Calculations **********
class.Shipment::getRates() - Not converting currency.
class.Shipment::getRates() - general tax rate is:1
class.Shipment::getRates() - restricting free shipping to basic shipping services
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 09, 2010, 23:56:04 pm
class.Shipment::addItem() - ****** Warning! Zero weight item! PID: 88 ******

Give product id 88 a weight value

Also, the output looks like it is to the US address (Florida). Post the International one please.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: molahs on July 10, 2010, 00:03:00 am
the international one is the first one.
this line -> class.Shipment::addPackage() - Shipping Info - Country: US State: FL ZIP: 33442
shows the origination address (the shop address).
I attach a screenshot.

i also deleted product 88. still getting the same error.

[attachment cleanup by admin]
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 10, 2010, 00:18:34 am
Ah right.  I was thinking it was the other way around and was showing destination. I can't brain today, I have the dumb.  :P

Looking at version 2010.02.15, the only cases I could find where it would probably be failing is if this is a drop ship item and the manufacturer lookup failed, and maybe if the package stuffing algorithm failed.  I did see where I think I've bungled the error messaging system, which may be why there is not a message.

I don't see anything that sticks out.  If you'd like to email me your shop info and product info (weight, upsv2 settings like max per package/ship from manufacturer ) I can try and replicate it here.  Also send the international address it is failing on.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 11, 2010, 04:44:40 am
************** Bugfix *****************
- version vm114-upsv2.2010.02.15.zip
- fixed an issue with drop shipping that could cause the wrong source information to be used
- Please re-download this version and copy over the new file
/administrator/components/com_virtuemart/classes/shipping/upsv2.php
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mowlman on July 12, 2010, 15:54:31 pm
Hi Reggie, it's been a little while,


Is there an easy way, when an item that is marked for UPS ground only is within the cart, that ALL items will have to be shipped Ground only and only show UPS Ground for a shipping method?


I currently am getting the following which was good as first, allowing people to get other items quicker, however, on a recent order, they seem to have gotten confused and thought all of their order was coming 2nd day air.

Please select a Shipping Method!
Note: This order contains some items which can only be shipped via UPS Ground services ($11.14). Please choose a shipping service for the remaining items. The prices include the ground shipping cost:
UPS Ground ($20.52)
UPS 2nd Day Air ($31.88)  -  2 Guaranteed Day(s) To Delivery
UPS Next Day Air ($64.65)  -  1 Guaranteed Day(s) To Delivery

So to rememdy this, I want to disable all other shipping options if and item in the cart if for Ground only.

Is there an easy way to do this?
I was looking within UPSv2.PHP around line 332,

Code: [Select]
// determine if there are any "ground shipping" restricted items
        // if all are restricted items, simply show only ground shipping options
        // if some are restricted, but others not, we need to do more work
        $show_grnd_only = false;
        $do_more_processing = false;
        if ($this->hasGroundShippingItems()){
        // are all the items restricted to ground shipping?
        if ($this->hasGroundShippingItemsOnly()){
        $show_grnd_only = true;
        }else{
        // $do_more_processing = true;  //COMMENT THIS LINE OUT ??
                        $show_grnd_only = true;   //ADD THIS LINE TO FORCE GROUND ONLY??
        }
        }

Should I comment out $do_more_processing = true; and then replace it with $show_grnd_only = true;  ?


Thanks for your help,

-Bill

Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 12, 2010, 16:27:07 pm
Bill,
You'll need to let it "do more processing" because it then calculates the price for the entire shipment going via Ground.  Set both to true, that should force it to do this calculation and then only show the ground price.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mowlman on July 12, 2010, 16:52:31 pm
Thanks Reggie for your fast response!

One other quick question as I have your attention,

I noticed your Fedexv2 is able to have free shipping coupons, of course I have not went through the process and tried it out, but I was wondering how difficult it would be to apply the ps_shippingcoupon.php code to work with UPSv2 ?

One of those side thoughts that Hmmm, free shipping coupon might be nice.

Thanks again.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 12, 2010, 16:58:28 pm
It's several files, including that class file.  There are the coupon forms themselves, and the files for the front end.  There is also a SQL update for it.  It would require merging those updates and testing them.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: jfk444 on July 12, 2010, 21:50:42 pm
Is there a way to add additional shipping option upgrades to the free ground shipping method.

Currently when a user receives free ground shipping on an item there is no available option to upgrade their shipping methods. If the user would like to upgrade from free ground to say overnight, or 2nd day air shipping for an additional fee their in no option to do so.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 12, 2010, 21:54:59 pm
Are you sure you have expedited services selected?
You should see the ground shipping options for free, and expedited shipping options for their normal price (assuming you have configured the module to restrict free shipping to ground services).
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lefcakis on July 13, 2010, 18:52:37 pm
could you please repost the latest file.  There are 33 pages in this blog and I would like to install this.  I have a client that is having a tough time with version 1.0.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 13, 2010, 18:54:53 pm
The latest version is always attached to the very first post.  It is also available on my website.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lefcakis on July 13, 2010, 21:51:36 pm
Thanks Reggie.

Also, do you know why with 1.0 the shipping costs are so different?  I am hoping that your version solves this problem and gives the client more power.. 
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 13, 2010, 21:54:41 pm
I'm not sure I understand the question.  Different than what?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lefcakis on July 14, 2010, 02:16:35 am
Different then if they would go to the worldship website and figure it out...  The weights are entered into virtuemart
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lefcakis on July 14, 2010, 03:19:10 am
is the 2010.3.26 the latest?  I only see the 2010.2.15 listed as downloadable..
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 14, 2010, 03:34:35 am
Different then if they would go to the worldship website and figure it out...  The weights are entered into virtuemart
Not really sure.  There are a number of factors involved.  L/W/H, multiple packages, etc.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 14, 2010, 03:35:19 am
is the 2010.3.26 the latest?  I only see the 2010.2.15 listed as downloadable..

2010.2.15 is the latest publicly released version.
2010.3.26 is my next attempt at a tax revamp, and is only available to donators.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lefcakis on July 14, 2010, 03:59:40 am
Hi Lowmips.  So I installed the module and get the following error..  with Debugging turned on.  any ideas?

Please select a Shipping Method!
upsv2::list_rates() - ****** Starting 'All Services' shipment ******
class.Shipment::addPackage() - Adding a new bundled package
class.Shipment::addPackage() - Package Number: 1
class.Shipment::addPackage() - Package is Bundled
class.Shipment::addPackage() - Maxweight: 150
class.Shipment::addPackage() - Padding: 0.01
class.Shipment::addPackage() - Shipping Info - Country: US State: PA ZIP: 16428
class.Shipment::addPackage() - Tax Rate: 0 Tax Instate:
class.Package::addItem() - ***** Adding item 16142 (Ascorbic Acid, USP, powder, 100 grams (0.22 lbs)) to package #1 *****
class.Package::addItem() - (Ground Services) Weight: 0.2626, modifiedWeight: 0.2626, freeWeight: 0, flatWeight: 0
class.Package::addItem() - (Non-Ground) Weight: 0.2626, modifiedWeight: 0.2626, freeWeight:0 , flatWeight: 0
Notice: We are unable to ship UPS as an error occured. Please select another shipping method.
Notice: The error was:
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lefcakis on July 14, 2010, 04:01:27 am
FYI.  the other UPS module. 1.0 works, but the shipping rates are 4 or 5 dollars less.  Not to mention it doesn't have the bundle feature..
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lefcakis on July 14, 2010, 04:13:33 am
<?xml version="1.0"?><AccessRequest xml:lang="en-US"> <AccessLicenseNumber></AccessLicenseNumber> <UserId></UserId> <Password></Password></AccessRequest><?xml version="1.0"?><RatingServiceSelectionRequest xml:lang="en-US"> <Request>  <TransactionReference>  <XpciVersion>1.0001</XpciVersion>  </TransactionReference>  <RequestAction>rate</RequestAction>  <RequestOption>shop</RequestOption> </Request> <PickupType>  <Code>01</Code> </PickupType> <Shipment>  <Shipper>   <Address>    <PostalCode>16428</PostalCode>    <CountryCode>US</CountryCode>   </Address>  </Shipper>  <ShipTo>   <Address>    <PostalCode>16046</PostalCode>    <CountryCode>US</CountryCode>    <ResidentialAddressIndicator/>   </Address>  </ShipTo>  <ShipFrom>   <Address>    <PostalCode>16428</PostalCode>    <CountryCode>US</CountryCode>   </Address>  </ShipFrom>  <Package>   <PackagingType>    <Code>02</Code>   </PackagingType>   <PackageWeight>    <UnitOfMeasurement>     <Code>LBS</Code>    </UnitOfMeasurement>    <Weight>10.1101</Weight>   </PackageWeight>  </Package> </Shipment></RatingServiceSelectionRequest>
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lefcakis on July 14, 2010, 04:15:12 am
result...

<?xml version="1.0"?>
<RatingServiceSelectionResponse><Response><TransactionReference><XpciVersion>1.0001</XpciVersion></TransactionReference><ResponseStatusCode>1</ResponseStatusCode><ResponseStatusDescription>Success</ResponseStatusDescription></Response><RatedShipment><Service><Code>03</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>11.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>9.34</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>9.34</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery/><ScheduledDeliveryTime/><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>9.34</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>9.34</MonetaryValue></TotalCharges><Weight>10.1</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>11.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>12</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>11.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>14.26</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>14.26</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>3</GuaranteedDaysToDelivery><ScheduledDeliveryTime/><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>14.26</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>14.26</MonetaryValue></TotalCharges><Weight>10.1</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>11.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>02</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>11.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>18.31</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>18.31</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>2</GuaranteedDaysToDelivery><ScheduledDeliveryTime/><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>18.31</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>18.31</MonetaryValue></TotalCharges><Weight>10.1</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>11.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>13</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>11.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>30.51</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>30.51</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery><ScheduledDeliveryTime/><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>30.51</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>30.51</MonetaryValue></TotalCharges><Weight>10.1</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>11.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>14</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>11.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>69.55</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>69.55</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery><ScheduledDeliveryTime>8:30 A.M.</ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>69.55</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>69.55</MonetaryValue></TotalCharges><Weight>10.1</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>11.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>01</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>11.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>36.07</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>36.07</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery><ScheduledDeliveryTime>10:30 A.M.</ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>36.07</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>36.07</MonetaryValue></TotalCharges><Weight>10.1</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>11.0</Weight></BillingWeight></RatedPackage></RatedShipment></RatingServiceSelectionResponse>
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 14, 2010, 04:27:32 am
Did you select some services to offer?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lefcakis on July 14, 2010, 04:30:49 am
Not sure what you mean..  I just added something to the cart and then checked out...that error was on the bottom of the check out.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lefcakis on July 14, 2010, 04:44:45 am
hmm..  so now I don't get the error..   wonder what caused it....   
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 14, 2010, 15:26:30 pm
No idea. :P

What I meant by selecting services is go into the module and select which shipping services you will offer.  I noticed via another issue that the error message is pretty useless if no matching services are found.  I plan on adding a check for this, as well as a check to ensure that the admin has chosen at least one shipping service to offer.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Havcom Systems on July 16, 2010, 18:12:51 pm
Ok, so far everything seems to be working perfectly, except... I can't get a freight image, or others, to show up in configuration. 

I've put the shop_image folder in all the places I could think to put it, just in case I missed something...

administrator/components/com_virtuemart/shop_image
components/com_virtuemart/shop_image

But still nothing shows up in the Shipping Configuration Drop-down.

Any thoughts?  Otherwise this looks like it's going to be a great module for us...

Thanks, Justin

www.myhavcom.com
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 16, 2010, 18:26:17 pm
Are you sure you copied over all of the modified files? specifically, ps_html.php.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Havcom Systems on July 16, 2010, 18:42:11 pm
Just recopied it, and still nada..
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 16, 2010, 18:44:25 pm
you need one more directory level:
shop_image/shipping/
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Havcom Systems on July 16, 2010, 18:53:24 pm
Doh!  and Kick ASS.. . Thanks, always appreciate your help.. 

Workin' on the bossman to get you some gratuity.. THANKS!!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Havcom Systems on July 16, 2010, 19:21:15 pm
Ok, ran test, but the image doesn't show up in browser.  Could this be because of my template? 

More importantly, at checkout the freight shipping option shows up, but when you go to complete the order, the freight charge shows $0.  I don't mind the "$0", but I would rather it just said, "Call for Shipping Price".  Is it possible to do this??

Thanks again..   Justin

Here's the only item I have set up for freight as of now...

http://www.myhavcom.com/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=168&category_id=30&option=com_virtuemart&Itemid=53
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 16, 2010, 19:22:35 pm
Ok, ran test, but the image doesn't show up in browser.  Could this be because of my template? 

More importantly, at checkout the freight shipping option shows up, but when you go to complete the order, the freight charge shows $0.  I don't mind the "$0", but I would rather it just said, "Call for Shipping Price".  Is it possible to do this??

Thanks again..   Justin

Here's the only item I have set up for freight as of now...

http://www.myhavcom.com/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=168&category_id=30&option=com_virtuemart&Itemid=53

Did you integrate the modified template files with your current template?

As for the textual display, you can edit the upsv2.php file to make it say whatever you wish.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Havcom Systems on July 16, 2010, 19:40:08 pm
Did I say, "Duh", already today??  Thank you, Reggie, that worked perfect..  I had copied them to default before, not thinking about my template. ..
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Havcom Systems on July 16, 2010, 19:58:12 pm
Ok, maybe I do mind the $0.  I'm not sure where I can even change that to different dollar amount.  We're going to have to have customers call in when they make an order requiring freight shipping.  So, I would rather it not return a $0 amount for shipping as that may cause some confusion.  I've already edited the upsv2.php file so that it says to call, on the previous page of checkout.  So, I'm hoping I can just "turn off" the option to return a freight shipping dollar amount.

Is this possible.  Thanks, Justin

[attachment cleanup by admin]
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 16, 2010, 20:16:10 pm
Ok, maybe I do mind the $0.  I'm not sure where I can even change that to different dollar amount.  We're going to have to have customers call in when they make an order requiring freight shipping.  So, I would rather it not return a $0 amount for shipping as that may cause some confusion.  I've already edited the upsv2.php file so that it says to call, on the previous page of checkout.  So, I'm hoping I can just "turn off" the option to return a freight shipping dollar amount.

Is this possible.  Thanks, Justin


What you probably want to do is on the final confirmation page check the shipping choice and if it is freight, show a different line than what is currently displayed.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Havcom Systems on July 16, 2010, 21:30:24 pm
Ok, that sounds about right. . But I can't say I would know how to do that.  I don't suppose you could explain what you mean a bit?? 
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 18, 2010, 16:30:47 pm
Actually, it's going to be a bit involved if you want to do it 'right'.  If you want to show "call" on the invoice and order details during checkout, you'll need to edit the checkout page as well as the order view(s).  You'll need to find the code responsible for showing the shipping info, parse the shipping_rate_id and change the message if the shipping_rate_id is freight related.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 19, 2010, 21:07:53 pm
********** Feature Update *************
- version 2010.03.26  (Not publicly released - 60% covered)
- Flat shipping tax mechanism added back in
- admins can now choose between the flat-tax mechanism, or the new product-tax mirroring system
- copies of this module can be obtained by donating to the cause!  :)
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mowlman on July 20, 2010, 21:14:49 pm
where would I default the UPS Ground radio button to be selected?
 Thanks for your time.

-mowlman

Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 20, 2010, 21:27:51 pm
the code responsible for setting the default option is in the list_rates() function of upsv2.php

reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mowlman on July 21, 2010, 17:12:58 pm
Thanks again Reggie,

In case anyone else would like something similar...

I have completed two things, If the cart contains an item that has been checked to be ground only, then only display UPS ground for a shipping rate. I DO NOT want to offer shipping rates for the other items that are not setup to be ground only. People were getting confused and we could not determine which items were supposed to be 2nd day air.

I then have the UPS ground radio button checked by default.

Only offer UPS Ground if cart contains a ground only item

Around line 343, within upsv2.php  - list_rates
       // determine if there are any "ground shipping" restricted items
        // if all are restricted items, simply show only ground shipping options
        // if some are restricted, but others not, we need to do more work
        $show_grnd_only = false;
        $do_more_processing = false;
        if ($this->hasGroundShippingItems()){
           // are all the items restricted to ground shipping?
           if ($this->hasGroundShippingItemsOnly()){
              $show_grnd_only = true;
           }else{
              $do_more_processing = true;
              $show_grnd_only = true;  //Added this to force ground only if cart contains a ground only item
           }
        }


force UPS Ground to be checked by default:
Around line 414, within upsv2.php  - list_rates
I added a line to force UPS Ground to be checked by default.

       // show the rate for shipping *ALL* items via ground
       if ($do_more_processing){
          $ship_all_ground_cost = $GLOBALS['CURRENCY']->convert( $ship_all_ground_cost, $vendor_currency, @$_SESSION['product_currency'] );
            $shipping_rate_id = urlencode(__CLASS__."|UPS|".$ship_all_ground_name."|".str_replace('$','',$ship_all_ground_cost));
            $checked = (@$d["shipping_rate_id"] == $shipping_rate_id) ? "checked=\"checked\"" : "";
            $checked = "checked=\"checked\""; // Added to force UPS Ground radio button to be checked
            $_SESSION[$shipping_rate_id] = 1;
            $html .= "<input type=\"radio\" name=\"shipping_rate_id\" $checked value=\"$shipping_rate_id\" id=\"$shipping_rate_id\" />\n";
            $html .= $ship_all_ground_name.' ';
            $html .= "<strong>(".$CURRENCY_DISPLAY->getFullValue($ship_all_ground_cost).")</strong>";
            $html .= "<br />\n";
       }

-mowlman
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 21, 2010, 17:44:41 pm
Quote
Only offer UPS Ground if cart contains a ground only item
This would actually be a good option for the module configuration.  I'm sure others would like this behavior as well.


Quote
force UPS Ground to be checked by default
Just want to point out that this will only work if the UPS module is the last one processed.  The last one processed that forces a default will always "win".  VirtueMart really needs a mechanism to order shipping module display.

Quote
and we could not determine which items were supposed to be 2nd day air
Hmm, yes this could be an issue for shops with lots of products, some of which ship ground only.  i suppose you could have a cross reference list of products, and check that when submitting shipping, BUT the better choice would be a mechanism like whats in my FedExv2 module..it displays the actual shipping configuration as the module sees it, with the shipping service and products listed for each package.  I'll eventually add this to UPSv2, which will either be in my free time (which could take a while), or at the request of a feature underwriter.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: sixeyeco on July 28, 2010, 18:29:02 pm
Hi Reggie, you have helped me in the past. Thank you. I greatly appreciate your contribution to the community.

I've searched for a solution to this but was discouraged. I'm hoping you can help again with what I hope is a simple issue. I'm offering a flat rate for all purchases however I now need to add one virtual product (a will-call ticket). I've heard that I can hack the product itself so that shipping does not even show up in the cart. Can you help?

More info: I added a module that allowed me to set the shipping based on sku and this works, but poorly. During checkout, $0.00 shows as an option but the flat rate is also shown. This wouldn't be too bad except that it selects the flat rate by default. I would much rather have the shipping step not even show up at all for a cart that only contains the virtual item.

Thanks again Reggie.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 28, 2010, 18:31:47 pm
Search for Bob Bloom's shipping bypass mod.  This is the only mod I know of that bypasses shipping for virtual products.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: sixeyeco on July 28, 2010, 18:58:16 pm
Sweet. I simply didn't know how to word it in the search box. You nailed it. I'll look into it and see if bob's my uncle ;)  Thanks again Reggie.

I've sent a token of my appreciation for your generosity and expertise. With more than 75,000 views this post obviously helps an incredible number of people.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mowlman on July 29, 2010, 14:29:03 pm
Hi Reggie,
When
Show standard shipping options on error or no UPS results?  is checked for Yes ,
Do we need to have Standard shipping method Enabled? Or as long as we have Standard Shipping Rates Defined, the module will pull these if there was an error or problem getting the UPS rates?

I am thinking the answer would be no since we do not want the Standard shipping to always be visible. (just wanted to clearify)

We occasionally have a problem with UPS returning data, returns an error and the user doesn't know what to do...Usually if they View cart and try checking out again , everything is ok.

Thank you for all of your time and effort.  :)
-mowlman
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 29, 2010, 14:31:41 pm
I believe it will show regardless of the enabled/disabled configuration, as long as there are rates defined.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on August 10, 2010, 18:03:31 pm
*************** Update *****************

This latest version, 2010.08.10 is two feature updates in one.  The new features are:

- Ability to mirror product tax settings for shipping tax, or use the original flat-tax system
- After-the-fact tracking number support. You may now add tracking numbers to your orders. 
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: alberta on August 11, 2010, 23:37:03 pm
does the L x W x H support measurements in mm or only inches? i only noticed inches in the measurement options on the ups.com rate calculator

thanks again for the module
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on August 11, 2010, 23:43:17 pm
Currently, the module assumes inches, regardless of what the product measurement unit is.  This is something that needs to be better implemented, obviously.

:)
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: doribeeler on August 12, 2010, 01:13:45 am
Hey Reggie, good to see you are up to your good development, I will need a better UPS module for another site Im doing... is this module stable for the new VM 1.1.5? This may be a redundant question, just want to make sure.
Thanks.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on August 12, 2010, 01:14:52 am
I have not ported the code to VM1.1.5 yet.  If someone would like to fund this, it will probably take about 2 hours to code and test (that's how long it took my FedExv2 module).

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: doribeeler on August 12, 2010, 17:47:26 pm
Can we use my site as the test bed? I will fund it if that is that case...! ;D
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on August 12, 2010, 18:42:57 pm
I always use my development environment as the primary testbed.  So, if you'd like to fund the port, I will do it there and then can make the new code available to you.  If you need help with installation, I'm afraid the 2 hours will not cover that extra work.

 ;)

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: doribeeler on August 12, 2010, 18:47:03 pm
how many hours will it take to do the installation after the test?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on August 12, 2010, 18:51:06 pm
A basic installation normally takes about an hour, including testing (I run through a quick checkout and also confirm that the product config pages are not broken, things like that).  The 1 hour assumes you're using the default VirtueMart theme.  If you're using a custom theme, it takes longer as I will need to merge my updates with the new theme.

Incidentally, I have the vm_mynxx theme freshly merged with the latest UPSv2 module, so if you're using that one it's basically already done.

:)

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: doribeeler on August 12, 2010, 18:56:52 pm
okay Reggie, I will fund it - however for more information, I am using the default template... Im experiencing some bugs with the modules displaying, but it is default... so that should help... how do we begin?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on August 12, 2010, 18:59:33 pm
Bugs with what modules displaying?

I can begin the port later this afternoon, and I can let you know when the code is ready for your approval and testing (or for me to install it for you).  I need to clear a few things up first, then I'll be free!

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on August 20, 2010, 17:56:05 pm
For anyone interested, I am considering adding a few functions to the module that require the more 'advanced' APIs.  It will be a very time consuming undertaking.

The features include:
1) automatic shipment creation
2) label printing
3) automatic tracking number inclusion

and later down the road:
4) UPS freight shipping
5) courier request

I have a poll on my website, www.lowmips.com, covering a few options for this functionality.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: bandtnov on August 23, 2010, 19:37:04 pm
Greetings,

First, let me thank you for all your hard work on the shipping modules.  I have installed the newest UPS mod from your website and it appears in my listing of available shipping methods, however I am receiving an error message upon checkout, which reads:

Fatal error: Call to undefined method ps_country::convert_country3_to_country2() in /home/bandtnov/public_html/administrator/components/com_virtuemart/classes/shipping/class.Shipment.php on line 120

I know there is something I did wrong, but I am not able to figure it out.  Could you assist me?

Thank you
Tammy
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on August 23, 2010, 19:39:35 pm
Tammy,
Sounds like you missed at least one file, specifically
/administrator/components/com_virtuemart/classes/ps_country.php

Try copying that over again.
Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: aravot on August 23, 2010, 20:46:08 pm
I am in for two hours of time for.

The features include:
1) automatic shipment creation
2) label printing
3) automatic tracking number inclusion
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on September 15, 2010, 17:04:02 pm
**************** RELEASE NOTICE **********************

vm115-upsv2.2010.08.12.zip
Requires VirtueMart 1.1.5
REQUIRES PHP v5.0 or higher!

Features:
- all the features of vm114_upsv2.2010.08.10.zip, ported to VirtueMart 1.1.5 code
- NOTE! The module is currently only available via my Free Software (http://www.lowmips.com/joomla/index.php?option=com_phocadownload&view=category&id=1:virtuemart&Itemid=18) page on my website, due to VirtueMart's upload folder being full.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: SoyBrian on September 16, 2010, 06:13:28 am
I logged in to phpMyAdmin, opened my Joomla db, , clicked the SQL button in the top right, and pasted the contents of upsv2.sql into the box and pressed Go. 

I received the following message:

Error
SQL query:

/* * Update from older versions only * Clean up old table columns */ ALTER TABLE  `jos_vm_manufacturer` DROP  `mf_taxclass` ;


MySQL said:

#1091 - Can't DROP 'mf_taxclass'; check that column/key exists


Now what do I do?  Thanks in advance.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on September 16, 2010, 14:04:23 pm
You may safely ignore the error.  That command is for users updating from an older version.  I put it last so new installs will still work.

Incidentally, if any MySQL experts out there know how to check for column existence before dropping it, I'd appreciate any help. :)

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: SoyBrian on September 16, 2010, 21:00:46 pm
Reggie-

I tried one test sale of an item over 150 pounds, it worked perfectly.  When I went back to check that it was correctly calculating shipping on smaller items I am receiving these errors:

Please select a Shipping Method!
Notice: We are unable to ship UPS as an error occured. Please select another shipping method.
Notice: The error was: UPS Online Tools error.

What did I do wrong?  I would assume it was in the way I installed the database, except it worked perfectly onece.  Where do I begin to fix this?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on September 16, 2010, 21:09:26 pm
We'll need more info. 
Set the module to "show extra debug info".  Put your shop in debug mode. 
Log out of the front end.  Log in the front end as an admin.  Run the transaction again.  Post your results here, being sure to remove your credentials from any of the output.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: SoyBrian on September 16, 2010, 21:18:00 pm
This is what I'm getting:


500 - JDatabaseMySQL::query: 1062 - Duplicate entry 'index.php?option=com_virtuemart&Itemid=1&flypage=flypage.tpl&man' for key 'url_real' SQL=INSERT INTO jos_acesef_urls (url_sef, url_real, used, cdate, source, params) VALUES ('soycork-countertop-kit', 'index.php?option=com_virtuemart&Itemid=1&flypage=flypage.tpl&manufacturer_id=1&page=shop.product_details&product_id=17', '0', '2010-09-16 19:13:51', 'JRoute->_(\'index.php?page=shop.product_details&flypage=flypage.tpl&product_id=17&category_id=0&option=com_virtuemart&Itemid=1\')--b2--/administrator/components/com_virtuemart/classes/ps_session.php--b2--603 --b1-- vm_ps_session->url(\'http://www.ultratuf.com/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=17&category_id=0\')--b2--/administrator/components/com_virtuemart/html/basket.php--b2--76 --b1-- include_once(\'/home2/asusucks/public_html/ultratuf/administrator/components/com_virtuemart/html/basket.php\')--b2--/administrator/components/com_virtuemart/html/checkout.index.php--b2--176 --b1-- ', 'custom=0 published=1 locked=0 blocked=0 trashed=0 notfound=0 tags=0 ilinks=1 bookmarks=0 visited=0 notes=')
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on September 16, 2010, 21:20:31 pm
That's an unrelated issue.  The debug mode I was referring to was VirtueMart debug mode.  Turn Joomla debug off, VirtueMart debug on.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: SoyBrian on September 16, 2010, 21:30:14 pm
I logged out of the front end as a user.
Enabled debugging in VirtueMart, then logged into the front end as an administrator, but still received the same error when I went to add an item to the cart.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on September 16, 2010, 21:31:59 pm
Is Joomla debugging on? Turn it off if it is.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: SoyBrian on September 16, 2010, 21:40:34 pm
Yes, Joomla debugging is off.  Maybe we can solve this another way.

When both the "UPS Online Tools Shipping Calculation" and "The UPS Shipping module, version 2.2010.8.12" are selected as shipping methods everything is calculated correctly, without error. I just get two sets of shipping options.   
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on September 16, 2010, 21:43:41 pm
Don't know what to tell you for this one. Judging from the error message, it's an SEF issue.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: SoyBrian on September 16, 2010, 23:07:13 pm
I gather it's related to SEF as well.

Can you explain to me why the functionality of UPSv2 would be dependent on the original?  I just can't get UPSv2 to appear as the only UPS option.  Is there a way to "comment out" the original UPS module, so it just doesn't appear on the front end?

I've tried placing // in front of the lines pertaining to the various shipping options from the original UPS module, but I get errors.

Thanks for your help.

Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on September 16, 2010, 23:25:39 pm
Quote
Can you explain to me why the functionality of UPSv2 would be dependent on the original?

Not at all.  Some kind of weird SEF thing, I guess.  Maybe turn off SEF to test using just the UPSv2 module?  This is the first time I've ever seen an issue like this with my module.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: macaudio on September 17, 2010, 10:01:19 am
I'm getting the same error.  When both V2 and the UPS Online Tools are selected as shipping methods, rates are displayed from both methods on the Shipping Page at checkout.  When the Online Tools method is not checked, I get a "UPS Online Tools Error" on the checkout.

SEF is off.

 
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on September 17, 2010, 13:59:15 pm
What version of UPSv2? VirtueMart?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: macaudio on September 30, 2010, 04:56:23 am
The UPS Shipping module, version 2.2010.08.12. For VirtueMart 1.1.5

and VirtueMart 1.1.5 Stable.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on October 06, 2010, 00:25:24 am
FYI I have not been able to replicate this issue.  Did you two have any success with it?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: gajjarkeyur on October 23, 2010, 21:16:00 pm
Hi, I am new to this site and i have designed the site and my free shipping is working fine with US address and now i need to do international shipping free over some amount purchase so how can i setup that thing can you please help me ? gajjarkeyur@gmail.com

Thank you
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on October 23, 2010, 22:04:42 pm
Hi,
Currently the free shipping feature for UPSv2 is worldwide.  There is no domestic/international split.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: atiquality on November 03, 2010, 18:54:27 pm
I installed the UPSv2 shipping module to test for items marked as freight.
I can proceed to checkout but an error occurs.

Code: [Select]
Debug: Using existing Session 8094a25cf260e22cd20985bb4e8415e2, ID: 6d5a414eba0ae6d7e99a3e3d192b954b.
Debug: calculating tax based on vendor address
Debug: Source zip was set to override: ->60103<-
Debug: upsv2::get_tax_rate() - ****** Starting shipping tax calculation ******
Debug: upsv2::get_tax_rate() - NOTE: Admin has configured product-tax mirrored shipping tax.
Debug: upsv2::get_tax_rate() - ship_to_info_id is 8280d8feda0f2297e58231c7bebb7fe1
Debug: upsv2::get_tax_rate() - Warning! Unserialize shipment data failed. Returning 0 tax rate.
Debug: upsv2::get_tax_rate() - ****** Starting shipping tax calculation ******
Debug: upsv2::get_tax_rate() - NOTE: Admin has configured product-tax mirrored shipping tax.
Debug: upsv2::get_tax_rate() - ship_to_info_id is 8280d8feda0f2297e58231c7bebb7fe1
Debug: upsv2::get_tax_rate() - Warning! Unserialize shipment data failed. Returning 0 tax rate.

What is the problem? Did I miss a step??
Joomla Version 1.5.15
VirtueMart 1.1.4 stable
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on November 03, 2010, 19:20:12 pm
Which version?
What error? Are you referring to the warning?
What step of checkout are you on?

Need more info.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: atiquality on November 03, 2010, 19:43:23 pm
vm114-upsv2.2010.08.10
Yes, I am referring to the warning.  I can pass through all 4 steps of the checkout process but when I click to confirm payment I am prompted by the Error to select another shipping method.

I have only one item in my cart and I have marked the item for freight shipping.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on November 03, 2010, 19:55:57 pm
You can safely ignore the warning.   Since the freight item is never queried for rates, the rates object is never populated, which results in the warning.

It sounds like you have another issue during checkout, however.  Are you 100% sure that all modified files were copied over to your system?

I think the shipping rate validation may be failing, but it's hard to tell without more information.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: atiquality on November 03, 2010, 20:49:51 pm
I thought maybe some screen shots would help. I also went ahead and replaced the files for the module installation from the Admin directory structure.
The last image is the Error I recieve after I click to confirm payment button.
 ???

[attachment cleanup by admin]
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on November 03, 2010, 21:01:33 pm
OK. I've confirmed that shipping validation is failing for freight-only orders.  I will work on a fix soon.

Funny, I *know* i tested for freight-only orders...

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on November 03, 2010, 21:23:46 pm
OK, I've found the issue.  I had added some code to translate the shipping price into the user's currency as an afterthought, but never tested for freight-only shipments.  



**** BUGFIX *****
Fixed issue which can sometimes cause freight-only shipments to error out during the final checkout step.

This affects both version 2010.08.10 and 2010.08.12.  I will be uploading a fixed version of 2010.08.12 to my website very soon.

Please download the updated archive, and replace the /administrator/components/com_virtuemart/classes/shipping/upsv2.php file.

Title: Re: UPS v2.0 (multiple functionality additions)
Post by: atiquality on November 05, 2010, 15:02:15 pm
lowmips, you are a beast at problem solving! 
I will be looking out for the update. If you could drop a post here as well when you have updated the archive.
Thanks so much.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on November 05, 2010, 15:04:25 pm
It's done, and all archives have been updated (first post in this thread, and on my website).

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on November 08, 2010, 21:03:30 pm
****** New Version Released *****

Version 2.2010.11.05
Filename vm115-upsv2.2010.11.05.zip

- added per-product shipping service restriction mechanism
- changed the default UPS API URL in upsv2.cfg.php
- removed donation, update, and testing tab links and files
- changed Package and Shipment class locations and class names to better integrate with my other shipping modules
- added option to disable rate caching
- added warning message if no matching rates were found.  This may assist in debugging.

Download from my free software page (http://www.lowmips.com/joomla/index.php?option=com_phocadownload&view=category&id=1:virtuemart&Itemid=18).
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: grassoft on November 08, 2010, 23:41:59 pm
I have tried to install this module, but it does not work. You can see the errors that I get .

On the same issue, I need to tell you that the U.P.S. standard module never worked, the only functional module is DHL.

If there is any one willing to give me some instructions I would really appreciate it.

Note: I am doing all my tests on my local PC.

The errors are visualized during shipping method on the check-out process page.

Deprecated: Assigning the return value of new by reference is deprecated in

C:\wamp\www\Joomla\administrator\components\com_virtuemart\classes\shipping\upsv2.php on line 319

Deprecated: Assigning the return value of new by reference is deprecated in

C:\wamp\www\Joomla\administrator\components\com_virtuemart\classes\shipping\upsv2.php on line 348

Deprecated: Assigning the return value of new by reference is deprecated in

C:\wamp\www\Joomla\administrator\components\com_virtuemart\classes\shipping\upsv2.php on line 934

Notice: We are unable to ship UPS as an error occured. Please select another shipping method.

Notice: The error was: UPS Online Tools error.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on November 08, 2010, 23:43:57 pm
You can ignore the "deprecated" warnings.  You'll need to lower your error reporting setting in Joomla to get rid of them.

Have you acquired the necessary UPS credentials, been moved to Production, and entered those credentials into the module configuration?

Have you tried configuring VirtueMart in debug mode in order to get more information about the error?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: DaleT on November 10, 2010, 17:37:59 pm
Hello,

Can this be added to the code to get UPS to pull Negotiated Rates?

This has come UPS Support.

Here is what you need to do:
 
1. The approved UserId associated with the Negotiated Rates must be used in the AccessRequest container along with the Access Key and Password.

2. The approved shipper number must be included in the RatingServiceSelectionRequest/Shipment/Shipper/ShipperNumber container.

3. The empty node <NegotiatedRatesIndicator/> must be included in the RatingServiceSelectionRequest/Shipment/RateInformation container. The RateInformation container may need to be added as well.

4. The <StateProvinceCode> node is required in the RatingServiceSelectionRequest/Shipment/Shipper/Address container or RatingServiceSelectionRequest/Shipment/ShipFrom/Address container depending on the absence or presence of the ShipFrom container. If the <ShipFrom> container is present, the <StateProvinceCode> node is required there. In the absence of a <ShipFrom> container the <StateProvinceCode> node is required in the <Shipper> container. It is also required in the RatingServiceSelectionRequest/Shipment/ShipTo/Address container.

Thank you
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on November 10, 2010, 17:52:19 pm
I'm actually already working with a client on modifying the original UPS module to allow for negotiated rates.  I'll be happy to share that solution with you, once completed. 

I would also be happy to include it in UPSv2, if you're willing to underwrite the addition.  Since I've already done most of the coding, I'll need to merge it into UPSv2 and test it, which should take about an hour or two billable time.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: grassoft on November 11, 2010, 01:24:10 am
Hello,

Can this be added to the code to get UPS to pull Negotiated Rates?

This has come UPS Support.

Here is what you need to do:
 
1. The approved UserId associated with the Negotiated Rates must be used in the AccessRequest container along with the Access Key and Password.

2. The approved shipper number must be included in the RatingServiceSelectionRequest/Shipment/Shipper/ShipperNumber container.

3. The empty node <NegotiatedRatesIndicator/> must be included in the RatingServiceSelectionRequest/Shipment/RateInformation container. The RateInformation container may need to be added as well.

4. The <StateProvinceCode> node is required in the RatingServiceSelectionRequest/Shipment/Shipper/Address container or RatingServiceSelectionRequest/Shipment/ShipFrom/Address container depending on the absence or presence of the ShipFrom container. If the <ShipFrom> container is present, the <StateProvinceCode> node is required there. In the absence of a <ShipFrom> container the <StateProvinceCode> node is required in the <Shipper> container. It is also required in the RatingServiceSelectionRequest/Shipment/ShipTo/Address container.

Thank you

I really appreciate your help:
we have acquired the UPS credential (account and access key), but we do not know how to follow the next step: been moved to Production, and entered those credentials into the module configuration?
Would you be so kind to explain to me in details?

Sincerely, Salvo

Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on November 11, 2010, 01:46:48 am
Salvo,
When you sign up for the UPS API credentials, you are only given development environment access.  You need to request Production environment access.  There are a series of specific steps they want you to do when developing a new solution, but since we already know that UPSv2 works, simply inform UPS that you have an existing solution to use and need Production credentials without going through those extra steps.

Then, enter those new credentials into the module configuration.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: djreason on November 11, 2010, 22:12:59 pm
Hi reggie,

I am using VM 1.1.4 and The UPS Shipping module, version 2.2010.02.15

Everything works as expected.  I ship to US and Canada.  When Canada is selected, free shipping option goes away and Worldwide options appear.  However, as you know, shipping rates to Hawaii and Alaska are not standard as the rest of the continental US.  How can I restrict free shipping option for Alaska and Hawaii only US customers?

I have seen this asked a few times, but no solution was posted.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on November 11, 2010, 23:18:07 pm
Hi,
There's currently no mechanism for this.  it sounds like you want free shipping options for all services, but only to US addresses, right?

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: djreason on November 12, 2010, 15:19:17 pm
I would like free shipping to the Continental US (48 states) only.  If a customer is in Canada, Hawaii, or Alaska, then it must not offer free shipping ground option.  It should show ground shipping, but not for free.  I have VM set to offer free shipping for all orders over $75.  Currently, all Canadian customers do not see free shipping option, which is fine, but HI and AK do.  There must be something somewhere in your coding that says IF US customer, then free shipping if order amount is over $75, but if state select is HI or AK, do not show free shipping option regardless of order size.  If Canadian customer, do not show free shipping option regardless of order size ever.

I hope you understand as ALL US shop owners are subject to this rule.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on November 23, 2010, 16:29:56 pm
******* Feature Update ********

UPSv2 now supports Negotiated Rates.  This version is available for download from my "Free Software" page on my website.

Filename: vm115-upsv2.2010.11.12.zip

Thanks goes to Sandtastik Products, Inc. for underwriting the port of this code to UPSv2.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: taylor09 on January 06, 2011, 02:55:49 am
I have also asked this in the FedEx version, does this work with the RocketTheme Mynxx template?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 06, 2011, 02:57:38 am
You'll have to merge some of the UPSv2 modifications in with the template to get some features to work.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lrossy on January 07, 2011, 21:24:35 pm
Hey, i installed both your UPS and Fedex modules

The UPS one is working great so far, but i have a question for the fedex...

I set the 'Maximum per box:' to 3, and when i checkout, the UPS debug shows that it adds all 3 items to the same package, and a 4th to a seperate package then gives me a quote, which is exactly what i want.

For fedex, it adds product 1 to package 1, product 2 to package 2, product 3 to package 3, and then oddly, for the 4th product in my cart, it adds it to package 1...

Why is it behaving differently for the fedex module?
FedEX output
Code: [Select]
Please select a Shipping Method!
Debug: Starting Shipping module: fedexv2
Debug: Fedexv2: using production WSDL
Debug: Fedexv2: using commercial delivery
Debug: Fedexv2: Using user-defined max weight of 70
Debug: FedExv2: not using signature option
Debug: class.Shipment::addPackage() Adding a new bundled package
Debug: class.Shipment::addPackage() - Package Number: 1
Debug: class.Shipment::addPackage() - Package is Bundled
Debug: class.Shipment::addPackage() - Maxweight: 70
Debug: class.Shipment::addPackage() - Shipping Info - Country: US State: CA ZIP: 94551
Debug: class.Package::addItem() - ***** Adding item 3 (DMX-A2-DRV : Advanced Integrated NEMA 17/23 Stepper Motor Micros) to package #1 *****
Debug: class.Shipment::addPackage() Adding a new bundled package
Debug: class.Shipment::addPackage() - Package Number: 2
Debug: class.Shipment::addPackage() - Package is Bundled
Debug: class.Shipment::addPackage() - Maxweight: 70
Debug: class.Shipment::addPackage() - Shipping Info - Country: US State: CA ZIP: 94551
Debug: class.Package::addItem() - ***** Adding item 3 (DMX-A2-DRV : Advanced Integrated NEMA 17/23 Stepper Motor Micros) to package #2 *****
Debug: class.Shipment::addPackage() Adding a new bundled package
Debug: class.Shipment::addPackage() - Package Number: 3
Debug: class.Shipment::addPackage() - Package is Bundled
Debug: class.Shipment::addPackage() - Maxweight: 70
Debug: class.Shipment::addPackage() - Shipping Info - Country: US State: CA ZIP: 94551
Debug: class.Package::addItem() - ***** Adding item 3 (DMX-A2-DRV : Advanced Integrated NEMA 17/23 Stepper Motor Micros) to package #3 *****
Debug: class.Package::addItem() - ***** Adding item 10 (ACE-SDE - Advanced Single Axis Motion Controller + Microstep Dri) to package #1 *****
Debug: fedexv2::get_rates_array() - Skipping dimensions

UPS output:
Code: [Select]
Debug: Starting Shipping module: upsv2
Debug: upsv2::list_rates() - ****** Starting 'All Services' shipment ******
Debug: class.Shipment::addPackage() - Adding a new bundled package
Debug: class.Shipment::addPackage() - Package Number: 1
Debug: class.Shipment::addPackage() - Package is Bundled
Debug: class.Shipment::addPackage() - Maxweight: 150
Debug: class.Shipment::addPackage() - Padding: 0.01
Debug: class.Shipment::addPackage() - Shipping Info - Country: US State: CA ZIP: 94551
Debug: class.Package::addItem() - ***** Adding item 3 (DMX-A2-DRV : Advanced Integrated NEMA 17/23 Stepper Motor Micros) to package #1 *****
Debug: class.Package::addItem() - (Ground Services) Weight: 40.4, modifiedWeight: 40.4, freeWeight: 0, flatWeight: 0
Debug: class.Package::addItem() - (Non-Ground) Weight: 40.4, modifiedWeight: 40.4, freeWeight:0 , flatWeight: 0
Debug: class.Package::addItem() - ***** Adding item 3 (DMX-A2-DRV : Advanced Integrated NEMA 17/23 Stepper Motor Micros) to package #1 *****
Debug: class.Package::addItem() - (Ground Services) Weight: 80.8, modifiedWeight: 80.8, freeWeight: 0, flatWeight: 0
Debug: class.Package::addItem() - (Non-Ground) Weight: 80.8, modifiedWeight: 80.8, freeWeight:0 , flatWeight: 0
Debug: class.Package::addItem() - ***** Adding item 3 (DMX-A2-DRV : Advanced Integrated NEMA 17/23 Stepper Motor Micros) to package #1 *****
Debug: class.Package::addItem() - (Ground Services) Weight: 121.2, modifiedWeight: 121.2, freeWeight: 0, flatWeight: 0
Debug: class.Package::addItem() - (Non-Ground) Weight: 121.2, modifiedWeight: 121.2, freeWeight:0 , flatWeight: 0
Debug: class.Package::addItem() - ***** Adding item 10 (ACE-SDE - Advanced Single Axis Motion Controller + Microstep Dri) to package #1 *****
Debug: class.Package::addItem() - (Ground Services) Weight: 131.3, modifiedWeight: 131.3, freeWeight: 0, flatWeight: 0
Debug: class.Package::addItem() - (Non-Ground) Weight: 131.3, modifiedWeight: 131.3, freeWeight:0 , flatWeight: 0
Debug: upsv2::get_rates_array() - WARNING: Negotiated rates selected, but no shipper number defined.
Debug: upsv2::get_rates_array() - rate caching is: 1
Debug: upsv2::get_rates_array() using cached rate for source country/zip: US/94551 dest country/zip: US / 13201, weight:131.3,insurance:0 , and L/W/H of 0/0/0.
Debug: class.Shipment::getRates() - ************ Starting Rate Calculations **********
Debug: class.Shipment::getRates() ----------- Starting Package #1-----------
Debug: class.Shipment::getRates() - (Ground Services) Weight: 131.3, Flatfee Weight: 0, Free Weight: 0, Modified Weight:131.3
Debug: class.Shipment::getRates() - (Non-Ground) Weight: 131.3, Flatfee Weight: 0, Free Weight: 0, Modified Weight:131.3
Debug: class.Shipment::getRates() - Original charge (UPS Ground): 94.01USD
Debug: class.Shipment::getRates() - fuel service rate for UPS_Ground_FSC is 1
Debug: class.Shipment::getRates() - Discount Ratio is: 1
Debug: class.Shipment::getRates() - Final Charge: 94.01 USD
Debug: class.Shipment::getRates() - Original charge (UPS Next Day Air): 680.2USD
Debug: class.Shipment::getRates() - fuel service rate for UPS_Next_Day_Air_FSC is 1
Debug: class.Shipment::getRates() - Discount Ratio is: 1
Debug: class.Shipment::getRates() - Final Charge: 680.2 USD
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 07, 2011, 21:31:37 pm
The modules were not designed to be installed together..did you simply install one, and then the other, or did you merge them together and then install?

Even though installing them together will result in unpredictable behavior, it still surprises me that they behave in the manner you outlined.  They are after all using the same product fields to determine packing order.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lrossy on January 07, 2011, 21:54:35 pm
OK, ill undo the changes i made, and only install the fedex one and see if that solves it.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 07, 2011, 21:58:22 pm
Another thing to consider is product weight.  The Fedex residential/commercial max weights for normal services is 70/150, while UPS uses a fixed 150lbs.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lrossy on January 07, 2011, 22:25:31 pm
So i undid my changes, and it still doesnt seem to add the products up properly for the fedex module...

I set Maximum per box: 3 for DMX-A2-DRV AND ACE-SDE

I must be missing something, let me know if you see where i might of gone wrong..

Code: [Select]
Please select a Shipping Method!
Debug: Starting Shipping module: fedexv2
Debug: Fedexv2: using development WSDL
Debug: Fedexv2: using commercial delivery
Debug: Fedexv2: Using user-defined max weight of 70
Debug: FedExv2: not using signature option
Debug: class.Shipment::addPackage() Adding a new bundled package
Debug: class.Shipment::addPackage() - Package Number: 1
Debug: class.Shipment::addPackage() - Package is Bundled
Debug: class.Shipment::addPackage() - Maxweight: 70
Debug: class.Shipment::addPackage() - Shipping Info - Country: US State: CA ZIP: 94551
Debug: class.Package::addItem() - ***** Adding item 3 (DMX-A2-DRV : Advanced Integrated NEMA 17/23 Stepper Motor Micros) to package #1 *****
Debug: class.Package::addItem() - ***** Adding item 3 (DMX-A2-DRV : Advanced Integrated NEMA 17/23 Stepper Motor Micros) to package #1 *****
Debug: class.Package::addItem() - ***** Adding item 3 (DMX-A2-DRV : Advanced Integrated NEMA 17/23 Stepper Motor Micros) to package #1 *****
Debug: class.Package::addItem() - ***** Adding item 10 (ACE-SDE - Advanced Single Axis Motion Controller + Microstep Dri) to package #1 *****
Debug: fedexv2::get_rates_array() - Using dimesions of L:10 W:10 H:10
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lrossy on January 07, 2011, 22:33:38 pm
For testing purposes i added more products, and I think i see where its messing up..

Its dividing up the 3 items per package properly when its the sameproduct, but since i have one different product, its adding it to package one, even though package one already has 3 products in it..

In this case, it shoudl be added to package 2.

Is this because i didnt configure it properly or is this a bug?

Code: [Select]
Please select a Shipping Method!
Debug: Starting Shipping module: fedexv2
Debug: Fedexv2: using production WSDL
Debug: Fedexv2: using commercial delivery
Debug: Fedexv2: Using user-defined max weight of 70
Debug: FedExv2: not using signature option
Debug: class.Shipment::addPackage() Adding a new bundled package
Debug: class.Shipment::addPackage() - Package Number: 1
Debug: class.Shipment::addPackage() - Package is Bundled
Debug: class.Shipment::addPackage() - Maxweight: 70
Debug: class.Shipment::addPackage() - Shipping Info - Country: US State: CA ZIP: 94551
Debug: class.Package::addItem() - ***** Adding item 3 (DMX-A2-DRV : Advanced Integrated NEMA 17/23 Stepper Motor Micros) to package #1 *****
Debug: class.Package::addItem() - ***** Adding item 3 (DMX-A2-DRV : Advanced Integrated NEMA 17/23 Stepper Motor Micros) to package #1 *****
Debug: class.Package::addItem() - ***** Adding item 3 (DMX-A2-DRV : Advanced Integrated NEMA 17/23 Stepper Motor Micros) to package #1 *****
Debug: class.Shipment::addPackage() Adding a new bundled package
Debug: class.Shipment::addPackage() - Package Number: 2
Debug: class.Shipment::addPackage() - Package is Bundled
Debug: class.Shipment::addPackage() - Maxweight: 70
Debug: class.Shipment::addPackage() - Shipping Info - Country: US State: CA ZIP: 94551
Debug: class.Package::addItem() - ***** Adding item 3 (DMX-A2-DRV : Advanced Integrated NEMA 17/23 Stepper Motor Micros) to package #2 *****
Debug: class.Package::addItem() - ***** Adding item 3 (DMX-A2-DRV : Advanced Integrated NEMA 17/23 Stepper Motor Micros) to package #2 *****
Debug: class.Package::addItem() - ***** Adding item 10 (ACE-SDE - Advanced Single Axis Motion Controller + Microstep Dri) to package #1 *****
Debug: fedexv2::get_rates_array() - Using dimesions of L:10 W:10 H:10
Debug: fedexv2::get_rates_array() - using cached rates
Debug: fedexv2::get_rates_array() - Using dimesions of L:10 W:10 H:10
Debug: fedexv2::get_tax_rate() - Source and Dest Countries/States(Province) do not match. Skipping shipping tax rate.
Debug: Tax rate is: 1
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 07, 2011, 22:34:58 pm
In the debug you provided, it is working as expected.  A maximum of 3 of product id DMX-A2-DRV have been added, and then some other product is added.  The maximum per package setting for DMX-A2-DRV has been fulfilled.

You may be thinking that maximum per package applies to all products.  It does not.  It applies to the product it is configured for, only.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lrossy on January 07, 2011, 22:42:38 pm
Thank you for your quick replies. So from what i understand,using the current functionality, all i could do at this point is use your 'Ships seperately' option.

Though it may lead to a higher cost for our users (since the quote will be for 2 boxes when it can sometimes be one), but it will protect us from incurring the higher shipping costs in the case that it bundles it with another package when in reality it would need a new box.

Thank you so much for clearing this up, i really appreciate it, and great work on your module !
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 07, 2011, 22:43:47 pm
Exactly.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lrossy on January 09, 2011, 21:16:46 pm
Hey, do you have a version of UPS and FedEx files that i can upload that will have both modules working together? Or is the only way for me to manually merge both... seems kinda daunting : /

If you don't, can you maybe give me a quote as to what you would want to comibine both files for me?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 09, 2011, 21:24:11 pm
Hey, do you have a version of UPS and FedEx files that i can upload that will have both modules working together? Or is the only way for me to manually merge both... seems kinda daunting : /

If you don't, can you maybe give me a quote as to what you would want to comibine both files for me?

I do not have any recent merged module, unfortunately.  It generally requires an hour or two to merge and do basic testing.  I'm not sure when I will have time to do so.  I'm still playing catch up for my outstanding projects as it is.

I do plan to merge all of my modules together for good at some point in the future, but I cannot provide a timeline.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: WebJIVE on January 09, 2011, 21:30:12 pm
Merging your modules into one would be FANTASTIC!  Then we could ad one module with multiple shippers. Also this would make updating your shipping estimate plugin work much easier as well.

Please keep us posted on this. If I new development would be started soon, I would chip in.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lrossy on January 14, 2011, 00:28:02 am
In your fedex module, you have a field in the config called'Maximum Package Weight'.

I use this to set the max package weight which helps me get accurate shipping costs, since all my products are bundled, and thats the only way i can split orders up into virtual packages.

Is there an easy way that i can set this for your UPS module as well?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 14, 2011, 00:35:04 am
Sure, you could manually edit the ups.php file, in the __construct() function.  Near the top the max weight is set.  Look for:

Code: [Select]
$this->max_weight = 150; // LB
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lrossy on January 14, 2011, 00:48:14 am
thank you !
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 18, 2011, 21:54:46 pm
********** Feature Update Release ************

This latest version of UPSv2 is again for VM1.1.5 and features the following additions:
- Option to use "Declared Value" for rate queries
- Option to override default declared value (product price) with user-defined price
- Option to trigger free shipping per product, based on other products in the cart

And also one other change:
- Flagged "UPS Standard" as a "basic ground" service, to enable free shipping/flat rates to override the actual cost

Download from my Free Software (http://www.lowmips.com/joomla/index.php?option=com_phocadownload&view=sections&Itemid=18) page today!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 26, 2011, 18:02:56 pm
According to the debug, the rates are being returned by UPS in PLN, and converted to PLZ (the shop's or the user's chosen currency).
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: trikster on January 26, 2011, 18:06:46 pm
Thank You very much for rapid response,
I also noticed it, it was strange because shop was set to use PLN so I'm not sure what is going on, but when I set it to euro it is OK, sorry to bother You.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 26, 2011, 18:17:11 pm
Glad it's figured out! ;)
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: trikster on January 26, 2011, 18:22:38 pm
One thing, it returns
1 Guaranteed Day(s) To Delivery
   * Your invoice may vary from the displayed reference rates
However in UPS Calculate Time and cost it's completle different.
Is it supposed to work or shuld I turn it of?

Thank You.

Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 26, 2011, 18:40:12 pm
It's an estimate.  If it's wrong, I would turn it off!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: trikster on January 26, 2011, 19:12:22 pm
OK,
Thx once more for your time.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 11, 2011, 23:37:48 pm
*********** UPDATE ************

vm117-upsv2.2011.02.11.zip

Features:
- All the features of the previous version, ported to VM1.1.7
- NOTE! This version has not yet been publicly released, and will be released on a donation basis.  If you would like a copy, please send a paypal donation to me (my website has a handy "donations" button).  Indicate which module the donation is for please.  Once my time has been compensated for, I will publicly release the module.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 14, 2011, 00:24:12 am
*********** BUGFIX **************

A bug dealing with the tax total display during checkout has been found and fixed.  The bug did not cause the final total charged to the user to be wrong (e.g. the amount sent to PayPal was still correct), but did cause the tax total and/or total displayed to be wrong in some cases.  This affects shops with their tax configuration in "Based on shipping address" mode.

I have fixed this bug in vm115.upsv2.2011.01.13 and vm117.upsv2.2011.02.13.
Please download the updated installation files, and replace your basket.php and ro_basket.php in /administrator/components/com_virtuemart/html/ with the updated files.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 16, 2011, 17:57:35 pm
*********** BUGFIX **************

I've also fixed the above issue in module version vm114-upsv2.2010.08.10, and uploaded the fixed file to the first post in this forum, as well as my "Free Software" page on my website.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: nryan115 on February 17, 2011, 20:46:38 pm
Hello, I just found this module and it has exactly what I need. I have 2 questions.
1) Why are different versions of the module needed for small incremental updates to virtuemart? I am afraid of installing 1.1.7 version and then in a few months upgrading virtuemart without thinking and then having shipping break.
2) What is an appropriate donation amount for this module? I do not have much money and do not want to insult you with what I can afford but would also like to use this module. Also, if I donate for this version and WAS to upgrade to say VM 1.1.8 when it comes out and the module does not work I will essentially be screwed with a broken site until I re-donate for the newest version again?

I am not complaining I just need to know what the future may look like.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 17, 2011, 20:55:40 pm
1) I port the code to the latest version of VirtueMart so that any security updates or bug fixes made to the core files I modify are also included in my module.

For the most part, the module will work with any recent version of VirtueMart.  But of course, my files will overwrite core files and you could lose security updates.

You can upgrade VirtueMart and the re-apply the module, most of the time it should work.  But it is not something I recommend, because I do not test compatibility for older module versions with every release of VirtueMart.  It may break.

2) Any amount is fine.  The more, the merrier, and the faster I'll release it publicly, but any and all donations are appreciated!  I've received anything from $5 to $50 in the past.

Some modules are released right away because another client has paid for my time to add a feature or port it to the latest VirtueMart.  I will not always need to use the "donation" basis.  But again, the module *should* work with an upgraded VirtueMart, as long as you re-apply the files, and keep in mind that you've probably lost a security update or two by doing so.

I *always* recommend taking a full site backup before any upgrade anyway.  Better yet, make a copy of the site and try the module out on the copy first.  Akeeba backup is a really nice, free component for doing that. I highly recommend it.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: nryan115 on February 18, 2011, 05:23:46 am
Yes I do use Akeeba - its amazing.

I am confused about something. If I donate money to you does that grant me access to download the update privately, or do I still have to wait until enough people (money) donate before I can use it?

You see, I have no problem paying I just do not have any money, but I am sure I can come up with something. I also already have VM 1.1.7. I can see that you spent a lot of time and DO deserve compensation. I am just trying to figure out what I need to do in order to use this soon. Can you clear this up for me?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 18, 2011, 14:13:30 pm
No waiting.  Once you donate, I'll email you a copy.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: nryan115 on February 18, 2011, 15:57:47 pm
Great I will do that later today. It will not be much. I will try to remember to donate more when my financial situation becomes better.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: morris on March 07, 2011, 22:11:09 pm
 :-\
I installed this plugin and now my 'Admin/Configuration page has no 'Save' option for any of the settings.
Please help. What do I need to do to correct this?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 07, 2011, 22:18:04 pm
Versions of UPSv2, Joomla, VM?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: 3rdi4sight on March 19, 2011, 00:17:12 am
Hello Lowmips:
I'm Getting a massive discrepancy on shipping costs for a product that ships in a 48" x 24" x 24" - 28lb carton. (All other products in shop seem to be accurate) The Customer wholesale quote from their UPS rep is $148.23, what the site is returning is $16.25. Here is the debug info:
Begin Debug-------
Shipment::addPackage() Adding a new unbundled package
Shipment::addPackage() - Package Number: 1
Shipment::addPackage() - Package is Unbundled
Shipment::addPackage() - Maxweight: 70
Package::addItem() - ***** Adding item 206 ("O" Gauge Comet) to package #1 *****
Package::addItem() - Package weight is now: 32.2
Package::query_rates() - Querying for Source: US/80205 , Destination: US/80521, Weight: 32.2
End Debug-------
We have the cost padded so the weight return is a little higher, this is expected. However, what I do not see is accurate info being passed re: the dimensions, which are what kicks this into the high-rate category in the reality of the UPS billing.
VM 1.1.4 on Joomla 1.015. UPS module upsv2.2010.08.10. Can you please offer some assistance? I can send you admin login info if you provide your email to me. Many thanks markt[at]xplore-design[dot]com
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 19, 2011, 00:38:15 am
Hello Lowmips:
I'm Getting a massive discrepancy on shipping costs for a product that ships in a 48" x 24" x 24" - 28lb carton. (All other products in shop seem to be accurate) The Customer wholesale quote from their UPS rep is $148.23, what the site is returning is $16.25. Here is the debug info:
Begin Debug-------
Shipment::addPackage() Adding a new unbundled package
Shipment::addPackage() - Package Number: 1
Shipment::addPackage() - Package is Unbundled
Shipment::addPackage() - Maxweight: 70
Package::addItem() - ***** Adding item 206 ("O" Gauge Comet) to package #1 *****
Package::addItem() - Package weight is now: 32.2
Package::query_rates() - Querying for Source: US/80205 , Destination: US/80521, Weight: 32.2
End Debug-------
We have the cost padded so the weight return is a little higher, this is expected. However, what I do not see is accurate info being passed re: the dimensions, which are what kicks this into the high-rate category in the reality of the UPS billing.
VM 1.1.4 on Joomla 1.015. UPS module upsv2.2010.08.10. Can you please offer some assistance? I can send you admin login info if you provide your email to me. Many thanks markt[at]xplore-design[dot]com

Have you configured the module to declared product dimensions for unbundled products? (main configuration, shipping tab)
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: 3rdi4sight on March 25, 2011, 07:34:53 am
I have configured the module, per your last response. As mentioned in y original post, the calculation seems to work as expected for all packages except this rather large and heavy package. I still get this massive discrepancy in shipping cost. What to check next?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 25, 2011, 13:00:14 pm
If it is consistently wrong, you could use the shipping modifier feature to tweak the final price.  Otherwise, it's hard to tell what is going wrong with the limited amount of info you've provided.  Check the XML request/reply as well.

-Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: sleepigrl on March 30, 2011, 20:01:53 pm
Hi Reggie -

I downloaded and installed the free version of your UPS module and it seems to be working well except for one thing.  I don't get the Declared Value cost in the rates.  

In the VM admin, I've checked the "Declare Package Values" box (under admin->config->shipping).  I've also tried selecting the "ship insured" box under the individual product, but that doesn't seem to have any effect.  Is there something else I need to do?  
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 30, 2011, 20:14:47 pm
Can you put the module in debug mode (show extra debug info), and try the checkout as an admin? Email me your findings.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: sleepigrl on March 30, 2011, 20:20:06 pm
On it's way - thanks  :)
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: sleepigrl on March 30, 2011, 23:44:53 pm
It works perfectly now - thanks Reggie!   
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 30, 2011, 23:46:18 pm
***************** BUGFIX ****************

Versions affected:
vm115-upsv2.2011.01.13 and higher

Issue:
"Declared Value" option has changed.  Declared value is now part of the Insurance declaration construct in the API.

Fix:
Re-download the affected version.  View the CHANGELOG.txt file to see what files were updated, and apply those udpated files to your installation.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on April 19, 2011, 18:16:09 pm
***************** Update ****************

vm118-upsv2.2011.04.09 is now available on a per-donation basis.  Once enough donations are received to cover the time spent updating the module, I'll publicly release it.

This module features everything from the previous version, but is ported to VM1.1.8.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on April 19, 2011, 18:24:32 pm
********** Public Release ***********

vm117-upsv2.2011.02.11.zip is now publicly available, from the first post in this thread OR from my "Free Software" downloads page on my website.

Thank you donators!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on April 26, 2011, 20:02:23 pm
How can we add the functionality to this module to ship to puerto rico and the virgin islands?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on April 26, 2011, 20:36:32 pm
It should handle these destinations already.  The ISO-3166 country codes are already in the VM database.

Are you getting an error when trying to check out with one of these as the destination? What's the specific error?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on April 26, 2011, 23:31:17 pm
Error: UPS was not able to process the Shipping Rate Request.. Error Code: 113021, Error Description: The Ship To postal code is invalid for the selected location.

and later on:

Warning: Invalid argument supplied for foreach() in "mywebsite"/components/com_virtuemart/classes/shipping/class.Shipment.php on line 354
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on April 26, 2011, 23:54:07 pm
You'll need to put the module into 'show extra debug info' mode and get more information.

What is the ZIP for the destination you are trying?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on April 27, 2011, 02:28:16 am
I re entered a new zip code with the correct city and still get the same error "Error: UPS was not able to process the Shipping Rate Request.. Error Code: 113021, Error Description: The Ship To postal code is invalid for the selected location.
Notice: We are unable to ship UPS as an error occured. Please select another shipping method.
Notice: The error was: "

The zip code i am entering is    "Guánica, PR 00653
United States"

I do have the "Show extra debug information" checked
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on April 27, 2011, 14:41:14 pm
Send me the XML request please.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mercomarine on April 27, 2011, 18:05:58 pm
how do i do that?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on April 27, 2011, 18:13:22 pm
With virtuemart debug mode on, you should be seeing the full xml request and reply.  copy that text into a file, and email me the file.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Comeskey on May 09, 2011, 20:19:39 pm
Reggie,

I need dimensional weight capability.  But I would never install a hack.  (Sorry...learned that lesson a long time ago.)

Would you consider offering a real VM shipping module that includes the UPS dimensional weight nodes?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on May 09, 2011, 20:28:59 pm
Given the package dimensions, the UPS API calculates dimensional weight (and applicable charges) automatically.  There is no dimensional weight node.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Comeskey on May 09, 2011, 20:42:35 pm
Given the package dimensions, the UPS API calculates dimensional weight (and applicable charges) automatically.  There is no dimensional weight node.
OK, fine, whatever.  But dimensional weight is not supported in UPS1.0, even if dimensions are included.

So I'll restate the question: Would you consider offering a real VM shipping module (not a hack) that supports dimensional weight?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on May 11, 2011, 16:08:27 pm
************** Public Release **************

Version: vm118-upsv2.04.19
New Features: None, simply ported to VM118 code


Thanks to the wonderful donators, this new version is now available publicly for free download.  Get it in the first post of this thread, or on my website's "Free Software" page.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Comeskey on May 11, 2011, 19:16:49 pm
So is that a "No" with regard to your willingness/ability to create a real module rather than a hack?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on May 13, 2011, 16:56:54 pm
I have no plans to create a module that does not include core modifications.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Comeskey on May 13, 2011, 18:31:23 pm
I have no plans to create a module that does not include core modifications.
Bummer.  A module with dimensional weight capability is what we really need, in my opinion.
Title: Re: UPS v2.0 (DOES IT SHIP?????)
Post by: cwfarley on May 15, 2011, 00:34:41 am
DOES UPS V2.0 SUPPORT SHIPPING??? ???

I.E. A BUTTON OR TAB IN VIRTUEMART SHOPPING THAT LINKS YOUR DATABASES WITH YOUR UPS.COM ACCOUNT, AND PRODUCTION ACCESS APIS TO ALLOW AN ORDER TO BE CREATED ON UPS.COM BY PORTING THE DATA FROM YOUR ORDER IN VIRTUEMART?

OR.............................

DO I NEED TO DEVELOP THIS????????????????????????????

HELLO,

LOWMIPS???
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on May 15, 2011, 00:51:14 am
UPSv2 only supports "rate shopping" at this point.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: AndrewBucklin on May 25, 2011, 00:21:12 am
Just downloaded the vm118-upsv2.2011.04.19.zip and I found a couple bugs.

In administrator/components/com_virtuemart/shop.product_details.php make the following changes:

On line 431, change PSHOP_SHOW_FREIGHT_PIC to VM_SHOW_FREIGHT_PIC
On line 438, change PSHOP_SHOW_FREESHIP_LBL to VM_SHOW_FREESHIP_LBL
On line 445, change PSHOP_SHOW_HAZMAT_PIC to VM_SHOW_HAZMAT_PIC

Otherwise, so far so good.  Great addition. Thanks so much!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on May 25, 2011, 01:06:43 am
Thanks for finding/fixing those Andrew.  I'll update the archive ASAP.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: AndrewBucklin on May 25, 2011, 01:07:33 am
Glad I could help. :)
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on May 25, 2011, 01:11:58 am
************ BUGFIX ************

Version:
vm118-upsv2.2011.04.19

Description:
Variable names were not correctly changed, causing potential issue with display of Freight, HAZMAT, and FREE shipping images on the flypage.

Solution:
Download updated vm118-upsv2.2011.04.19.zip.  Extract and replace the following file on your server:
/administrator/components/com_virtuemart/html/shop.product_details.php
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Mr Justin on June 29, 2011, 18:00:48 pm
Good afternoon lowmips,
I was wandering is it possible to build this UPS v2.0 functionality into a shipping model that does not requite a core hack of VirtueMart? I also was would like to make sure since its GNU/GPL license I can modify your module? I don't want to over step, I know you have put a lot of work into this module. The features that i would like that have in that kind of module would be.

-allows for bundled and unbundled shipments.  Products designated as shipping seperately will have their postage rates queried seperately.
-reworked UPS XML response parser to allow shipments larger than 70lbs
-basic support for declaring package L/W/H
-additional handling fee functionality.  charge a different handling fee for orders of a certain minimum amount or more.
-option to charge flat fee per product, ignoring actual UPS rate
-option to restrict products to ground-only shipping services
-support to skip handling charges on free-shipping packages

I just thought i would ask since you know VirtueMart much better then I do if this is possible before I try and create it. Sorry for one more question but how close are you to releasing ups module for VM 1.1.9? Can i make a donation and get it or have you not started on it yet. Sorry for all the question.
Many Thanks
Justin
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on June 29, 2011, 18:46:18 pm
Hi,
Yes, you can modify the module as long as you adhere to the GPLv2.

The options you wish to include in a non-core modifying version of the module will be difficult, at the least.  You'll have to find some other way of saving per-product configuration data, and showing that data in the config.  Not to mention the config form variables itself...I suppose it could be done with a plugin, but it will be time consuming.

I have not had any requests for a vm1.1.9 version, so I have not ported it to that base code.  If I get some time in the next few weeks, and you're willing to underwrite it, I'd be happy to do so.

Good luck!
Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: kleinbaas on July 18, 2011, 18:27:09 pm
Bummer.  A module with dimensional weight capability is what we really need, in my opinion.
Install the hack, but save the original files by renaming them to something like original_name_old.
Before you want to upgrade, rename all the _old files to the original names, then install the hack again after upgrading. If there are any errors after installing the hack the 2nd time just revert to the files you last replaced/renamed. Simples.
Title: UPS v2.0 (multiple functionality additions) MESSED UP
Post by: YouWantLED on July 19, 2011, 05:52:32 am
Hi,,
I downloaded vm117-UPSv2.2011.02.11.zip and installed it on Joomla 1.5.22 / VM 1.1.7 template ...
PHP = 5.3.5
MYSQL= 5.1.41

I'm using UPS as the only shipper and this is set in ADMIN of VM
Prior to installing this plugin, I entered some 40 products - no worries
Now that I've installed this file, I cannot create new products - error message
(JDatabaseMySQL::query: 1146 - Table '1stop.jos_vm_shipping_restrictions' doesn't exist SQL=SELECT restriction_number, restriction_name FROM jos_vm_shipping_restrictions)

I tried to uninstall the plugin, but cannot see this option anywhere - tried to create the DB its looking for, but I'm not too familiar with MySQL ..
How do I revert back to UPS 1.0 plugin for VM??

or is there something I'm missing here??
I've spent the last 3 days trying to fix this issue, and googling trying find answers ..

PLEASE HELP



Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 19, 2011, 13:51:10 pm
Hi,
Did you import the sql that comes with the module? Did it import completely, with no errors?  If there were errors, try going line-by-line and importing it manually. Each line ends with a semi-colon.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: YouWantLED on July 20, 2011, 05:41:20 am
Hi Reggie,
Problem solved, didn't see the readme file nor the Sql file within the zip file.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 20, 2011, 17:03:19 pm
Glad to hear it!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mowlman on July 27, 2011, 18:22:25 pm
UPS has started to charge and additional $8 charge for items that are over 5ft.  Do you know if we should be getting the proper rates (which would include the $8 charge) as long as we have our dimensions (LxHxW) specified properly?

Thanks.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 27, 2011, 19:19:06 pm
I would think so, as long as you have dimension declaration set.  Run the module in debug mode without rate caching to see the API reply to determine if UPS is passing anything back about the charge.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: yaani on August 18, 2011, 18:24:06 pm
I just upgraded to Virtuemart 1.1.9 & now get an error after I confirm the shipping address & click the Next button to select the shipping method

Checkout
Fatal error: Call to undefined method ps_country::convert_country3_to_countryid() in ........../administrator/components/com_virtuemart/html/checkout.index.php on line 318

I guess UPS v2.0 is not compatible with Virtuemart 1.1.9 :(

I can't find the announcement about Virtuemart 1.1.9 do you know if it is a security release? I am thinking of going back to Virtuemart 1.1.8
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: yaani on August 18, 2011, 21:00:33 pm
Well, I rolled back to the Virtuemart 1.1.8 version to get rid of that error.

I guess I will wait till UPS 2.0 gets upgraded to Virtuemart 1.1.9

I am still trying to figure out if Virtuemart 1.1.9 is a security release. I don't seem to be able to find the announcement about Virtuemart 1.1.9.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on August 21, 2011, 00:20:02 am
Hi,
Your issue appears to be a missing class file.  Be sure to upload all of the updated files.

I've had several users with 1.1.9 report no issues.
Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: andino21 on August 29, 2011, 17:47:48 pm
i got this error

Quote
Notice: The error was: class.Shipment::addItem() max_per_package for pid 123 was 0!upsv2::populate_shipment() Error adding product pid 123 to the shipment.

and when updating the SQL with the file given

Quote
/* * Version 2010.11.05 * Reggie Campbell * * TODO: Make this SQL smarter, especially for upgrades *//* * Product Table Updates */ ALTER TABLE  `jos_vm_product` ADD COLUMN  `ship_alone` CHAR( 1 ) NOT NULL DEFAULT  'N' AFTER  `ship_code_id` ;
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on August 29, 2011, 17:51:54 pm
The default "max per package" should be 9999.  Check your product config and make sure it is higher than zero.  If the max_per_package table entry did not get made in your database, this could be the root cause.

Your second quote seems to be missing something...? Was there an error?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: vargpr on September 08, 2011, 21:41:22 pm
How can i add handling fees?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on September 08, 2011, 21:43:53 pm
There is an overall handling fee configuration in the main module config.  Be sure to view the topics in the "Usage" tab.
Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: joshtchapman on September 09, 2011, 16:59:00 pm
I know you guys will think this is stupid, but I can't figure out how to upload the upsv2.sql file.  I tried it in phpMyAdmin and got this

Quote
Error

SQL query:

/* * Version 2010.11.05 * Reggie Campbell * * TODO: Make this SQL smarter, especially for upgrades *//* * Product Table Updates */ ALTER TABLE `jos_vm_product` ADD COLUMN `ship_alone` CHAR( 1 ) NOT NULL DEFAULT 'N' AFTER `ship_code_id` ;

MySQL said: Documentation
#1046 - No database selected

I uploaded the other files through ftp and I assume they are working correctly.

Any help would be greatly appreciated!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on September 09, 2011, 17:05:29 pm
Select the database you wish to upload it to first..that's the error you're getting.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: joshtchapman on September 09, 2011, 17:33:55 pm
Thanks Reggie!

I knew it would be something simple.

Just so I don't mess it up, should I upload it to my main sql database or should I put it somewhere like "jos_vm_shipping_rate"

Sorry about the questions, just trying to understand and don't want to mess anything up.

JC
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on September 09, 2011, 17:35:09 pm
As long as you have the correct database selected, the table you currently have selected when uploading the file is irrelevant.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: bluebeachdesign on September 10, 2011, 03:18:50 am
I installed everything successfully however, it does not show up in the shipping module list. Am I missing something?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on September 13, 2011, 00:17:45 am
Hi,
If it does not even show up in your list, then the files were not put in place.  If the upsv2.ini file is there, it should show up in the list.  Check your install for the correct directories.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Mihai Achim on October 13, 2011, 21:11:51 pm
Hy I have add UPS v2.0 i think with success, It show in cart Shipping Estimate: and below are some values according to order number of produsts
All OK until now
But when I Checkout order in back-end is not having delivery fee in there is ZERO
What is wrong with me ?

Can someone please advice what I have done wring in there?

lowmips?
https://www.driers.com/

Thanks
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on October 13, 2011, 21:20:48 pm
Use the module's debug mode to get more insight as to what's going on.  Be sure you're logged in as an administrator.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Mihai Achim on October 13, 2011, 21:25:21 pm
Use the module's debug mode to get more insight as to what's going on.  Be sure you're logged in as an administrator.

Reggie
OK now is active debug module but what I have to look for
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on October 13, 2011, 21:26:37 pm
The module will output a large amount of debug text.  Copy it all here.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Mihai Achim on October 13, 2011, 21:29:17 pm
I think something I am missing in here :)
Sory I have setup Debug Systeto YES in this site https://www.driers.com
I can copy all debug long  lines but in what step where in thosee 3 steps to place order i need to ?
Sory I am stupid now but...
Or are you talking about other module ?I do not know ?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on October 13, 2011, 21:31:25 pm
You have not given me any information about which module specifically you are running.  I assume you are using the latest version.  This latest version has a debug feature in the UPSv2 module configuration.  That is the debug I am asking you to turn on.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Mihai Achim on October 13, 2011, 21:36:20 pm
OK
I have download from here
http://www.lowmips.com/joomla/free-software/category/4-upsv2
CARTRATES (UPSV2) plugin
and also did all steps from
The UPSv2 module for VirtueMart 1.1.8.
vm118-upsv2.2011.04.19.zip

What is not really accurate is My Vmart I have version 1.1.9 + Joomla 1.5.22

I don't see any module
I want to have delivery fee in order and something I do wrong  in here
Thanks for attention



Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on October 13, 2011, 21:37:52 pm
Have you enabled the UPSv2 module in the main VirtueMart configuration?  Have you enabled the debug setting in the UPSv2 module configuration?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Mihai Achim on October 13, 2011, 21:42:07 pm
In Configuration/ Shipping / I have active The UPS Shipping module, version 2.2011.04.19. For VirtueMart 1.1.8
Below in new box Global Shipping Options Not enable nothing just Unbundled only (recommended) - I no need free delivery


I finded now : Other Settings/ Show extra debug information    is ON
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Mihai Achim on October 13, 2011, 21:44:13 pm
I got this
_____________

upsv2::__construct() - Starting upsv2 version 2.2011.04.19
upsv2::__construct() - global maximum package weight is 150 lb
upsv2::__construct() - no user information returned from database where $vars["ship_to_info_id"]==
upsv2::__construct() - Using first BT address found.
upsv2::__construct() - Source zip was set to override: ->49128<-
class.Shipment::addPackage() - Adding a new bundled package
class.Shipment::addPackage() - Package Number: 1
class.Shipment::addPackage() - Package is Bundled
class.Shipment::addPackage() - Maxweight: 150
class.Shipment::addPackage() - Padding: 0.01
class.Shipment::addPackage() - Shipping Info - Country: US State: MI ZIP: 49128
class.Package::addItem() - ***** Adding item 35 (Sliced Turkey) to package #1 *****
class.Package::addItem() - (Ground Services) Weight: 1.01, modifiedWeight: 1.01, freeWeight: 0, flatWeight: 0
class.Package::addItem() - (Non-Ground) Weight: 1.01, modifiedWeight: 1.01, freeWeight:0 , flatWeight: 0
upsv2::get_rates_array() - rate caching is: 1
upsv2::get_rates_array() using cached rate for source country/zip: US/49128 dest country/zip: US / 60126, weight:1.01,insurance:0 , and L/W/H of 0/0/0.
class.Shipment::getRates() - ************ Starting Rate Calculations **********
class.Shipment::getRates() ----------- Starting Package #1-----------
class.Shipment::getRates() - (Ground Services) Weight: 1.01, Flatfee Weight: 0, Free Weight: 0, Modified Weight:1.01
class.Shipment::getRates() - (Non-Ground) Weight: 1.01, Flatfee Weight: 0, Free Weight: 0, Modified Weight:1.01
class.Shipment::getRates() - Original charge (UPS Ground): 8.27USD
class.Shipment::getRates() - fuel service rate for UPS_Ground_FSC is 1
class.Shipment::getRates() - Discount Ratio is: 1
class.Shipment::getRates() - Adding handling fee 1 (2)
class.Shipment::getRates() - Final Charge: 10.27 USD
class.Shipment::getRates() - Original charge (UPS 3 Day Select): 10.49USD
class.Shipment::getRates() - fuel service rate for UPS_3_Day_Select_FSC is 1
class.Shipment::getRates() - Discount Ratio is: 1
class.Shipment::getRates() - Adding handling fee 1 (2)
class.Shipment::getRates() - Final Charge: 12.49 USD
class.Shipment::getRates() - Original charge (UPS 2nd Day Air): 15.45USD
class.Shipment::getRates() - fuel service rate for UPS_2nd_Day_Air_FSC is 1
class.Shipment::getRates() - Discount Ratio is: 1
class.Shipment::getRates() - Adding handling fee 1 (2)
class.Shipment::getRates() - Final Charge: 17.45 USD
class.Shipment::getRates() - Original charge (UPS Next Day Air): 25.99USD
class.Shipment::getRates() - fuel service rate for UPS_Next_Day_Air_FSC is 1
class.Shipment::getRates() - Discount Ratio is: 1
class.Shipment::getRates() - Adding handling fee 1 (2)
class.Shipment::getRates() - Final Charge: 27.99 USD
UPS Ground   $10.27
UPS 3 Day Select   $12.49
UPS 2nd Day Air   $17.45
UPS Next Day Air   $27.99
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on October 13, 2011, 21:46:45 pm
Looks OK to me.  I see no zero charge.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Mihai Achim on October 13, 2011, 21:48:28 pm
Yes but if I g to checkout goes to zero and order come with
Shipping and Handling Fee:   $0.00
Shipping Tax:   $0.00

Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on October 13, 2011, 21:54:32 pm
So where did you get the debug info from? The cart page or the checkout?

If its the cart page, then I need to see the debug info from the checkout page instead.

Do you have the UPSv2 module enabled in the main VirtueMart configuration, under the "Shipping" tab??? Maybe you do not have it enabled and during checkout some other module is showing.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Mihai Achim on October 13, 2011, 22:02:16 pm
I have only UPS v.2.0

se this printscreen
http://imm.io/ahVZ 
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on October 13, 2011, 22:05:06 pm
That looks fine.  What debug info is show during checkout?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Mihai Achim on October 13, 2011, 22:07:38 pm
Nop after I click checkout nothing is there
Can be because I have Virtuemart 1.1.9? in stead of 1.1.8 I notice there are  some security issue solved
Try to place an order use my name and see after launch order
I have activate cash o delivery I will cancel order

Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on October 13, 2011, 22:09:25 pm
Do you have all 4 checkout steps enabled in the global configuration (checkout tab, I think)?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Mihai Achim on October 13, 2011, 22:10:06 pm
just 3
NO  "Please select a Shipping Method!"
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on October 13, 2011, 22:11:25 pm
That's your problem.  Enable that step and it should be fine.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Mihai Achim on October 13, 2011, 22:11:44 pm
NO WAY NO WAY
I CANNOT BELIVE THIS
I HAVE ACTIVATE THIS 2;NT STEN AND IT ;S WORJING
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Mihai Achim on October 13, 2011, 22:12:21 pm
Thanks a lot
you are a genius
:)
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on October 13, 2011, 22:12:50 pm
Glad it's working for you.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Mihai Achim on October 13, 2011, 22:16:18 pm
Yes thanks to you
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Mihai Achim on October 13, 2011, 22:19:30 pm
Oups
Back again
I have log out and used
Please log in or enter your information below:
Got this error:
Some settings maybe?

Error: UPS was not able to process the Shipping Rate Request.. Error Code: 110206, Error Description: Missing/Illegal ShipTo/Address/StateProvinceCode

Warning: Invalid argument supplied for foreach() in /home/driersc/public_html/administrator/components/com_virtuemart/classes/shipping/upsv2/class.Shipment.php on line 357
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on October 13, 2011, 22:20:57 pm
Cart or Checkout?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Mihai Achim on October 13, 2011, 22:21:44 pm
cart
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Mihai Achim on October 13, 2011, 22:22:58 pm
before checkout I have this option to calculate delivery if I enter zip code
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on October 13, 2011, 22:32:29 pm
That's strange.  I have never seen that error before.  I wonder if they are now requiring the state code along with ZIP/Country.  I cannot debug this right now, I'll try to get back to you in a few days about it....in the meantime you'll want to turn the cartRates plugin off.




Is anyone else seeing this error?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Mihai Achim on October 13, 2011, 22:40:57 pm
Yes my friend Joyce who's got site.
Strange is if I am login with all daca fill in is working OK
I have use same ZIP code 60126 without login, got that error
when I have login my shopper zip code is same I have values in Shipping Estimate:
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on October 13, 2011, 22:44:09 pm
Do you have "use negotiated rates" enabled? Try disabling that.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Mihai Achim on October 13, 2011, 22:47:04 pm
Yes sure
Now again is working
First lesson when I get on a PC was;
"Computers do only what you ask to do, any error is because off human error!"
Is so true
Thanks again and have a good day
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on October 13, 2011, 22:53:52 pm
You have actually uncovered a bug with the negotiated rates code.  I will have to fix it.  I'll add it to the list.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: Mihai Achim on October 13, 2011, 22:55:02 pm
OK
I will email if is any trubles
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: rszemeti on December 07, 2011, 15:36:42 pm
Two things,  firstly when I have logged in and click on the link i get given a 1 byte file called "index.php" instead of the zip file ...

Secondly, I notice the various comments talk about ship weight in pounds ... as our UPS account is set up in kilos ( I thinkl theres only 2 places left in the world using pounds,  Liberia and some other place) ... and all our items are in the system in kilos, will that be OK?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on December 07, 2011, 15:48:40 pm
1) You can download the module from my website if you have issues downloading it here

2) The module automatically detects the weight unit of measure.  However, it does NOT convert L/W/H dimensions and assumes they are in inches.  You will have to manually update the upsv2.php file to use whatever UOM you require for your product dimensions.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: rszemeti on December 07, 2011, 16:45:42 pm
Well, I installed it, gave it all my config stuff, enabled it, (only shipping module enabled)

 But ... when I go through the checkout and get as far as stage 2 ie where it sends me off to PayPal , it is still showing the total without any shipping :(
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on December 07, 2011, 16:51:28 pm
The module does not configure PayPal information.  If a shipping rate was displayed during checkout, and you chose it, and the shipping price showed up on the last step of checkout, then the module is functioning as expected and passed all necessary info to VirtueMart.  Sounds like a paypal module issue.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: rszemeti on December 07, 2011, 16:58:52 pm
No idea what you are talking about there, sorry.

Stage 1 is order review. .. shows number of items,  allows update etc. and choose delivery address from your available addresses.  (ie same as billing or add new address)

Stage 2 is choose payement method .

Its nothing to do with PayPal, I never even clicked it.  But, by this stage I would expect the order to include shipping costs before it send me off to my payment provider ... but nothing :(  at no point was I asked to chooses a shipper, (and indeed with only one shipper, why would I be?)

edit:

OK, so by chnaging to store config to "choose shipper in stage 2" it now behaves differently in the cart. After selectign my shipping address in stage 1, I now get:

Quote
Fatal error: Call to undefined method ps_country::convert_country3_to_countryid() in /mnt/home/robin/amps4u/joomla-dev/administrator/components/com_virtuemart/html/checkout.index.php on line 318
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on December 07, 2011, 17:01:06 pm
Sounds like your shop is not configured to show a shipping method.  Check your main VM configuration where the 4 steps are listed.  Ensure that all 4 are enabled, especially the shipping method part.  Be sure that the UPSv2 module is enabled on the "Shipping" tab.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: rszemeti on December 07, 2011, 17:02:50 pm
yeah, found that ...  now I get:

Quote
Fatal error: Call to undefined method ps_country::convert_country3_to_countryid() in /mnt/home/robin/amps4u/joomla-dev/administrator/components/com_virtuemart/html/checkout.index.php on line 318


after selecting a delivery address in stage 1 :(
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on December 07, 2011, 17:04:31 pm
Your UPSv2 installation was not complete.  Be sure that you've uploaded all of the updated files.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: rszemeti on December 07, 2011, 17:13:54 pm
Ahh, you are overwriting core files? 

I rsync'd the files to the server, so , yeah, if any on the server are later than yours, that might do it. I'll have to review the conflicts, as I have modified a few files locally, it could be those blocking it.

Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on December 07, 2011, 17:32:13 pm
Files + SQL updates.  Be sure to view the README.txt file in the archive.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: rszemeti on December 08, 2011, 03:12:16 am
well, mostly it works ... doesnt seem to be bringing back my negotiated rates, but the flag does appear to be set in the xml request, so I guess thats a UPS thing, I've dropped them an email.

Although I slected the two services I want to use, its not sending service codes in the request, so is bringing back all the possible services in the response .. not sure why its not setting the services codes in the rating request htough ...

The one other thing I can;t get to work right is tax.

I am shipping from the UK, and need 20% tax adding to all destinations including UK and Europe,  but not the rest of the world...  so far, not go that to work yet, but I guess its just a question of messing with the settings some more
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on December 08, 2011, 14:02:06 pm
The module does rate shopping.  It submits parameters, receives all available services/rates, and then displays the rates based on what you've selected in the module configuration.  It does not specifically request rates for any one service level.

As for tax, there is no straightforward way to add the tax to the order, so the module currently adds any tax directly to the shipping price.  The UPSv2 modules can do flat tax, or mirror the product tax configuration.  You should be able to see any tax added via the debug output.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: rszemeti on December 08, 2011, 15:02:01 pm
Ah .. so .. what are the selector options for in the config? where you can select different services??

I cannot find any manual for this module, but I expected those checkboxes (like, say I select only UPS Standard in the config) to mean it only offers UPS Standard to the buyers .. but even when I select just on or two services, it offers (like UPS Standard and UPS Saver) it offers usually 4 different rates to the buyer, including some rates not enabled in the config ...   :-\

The tax is a big problem then .. because the tax laws in the EU and in the US mean we have to show the tax amount separately on the invoice, it is not legal to charge tax and not indicate exactly how much is tax and how much is the goods/shipping so I will have to find a way to solve that one.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on December 08, 2011, 15:17:22 pm
If you're seeing services that you have not selected, then something is wrong with your config.  Are you sure you've enabled UPSv2 and disabled the original?

I was unaware of the tax laws.   The module adds tax to the shipping price specifically because the client who requested the feature wanted it that way.  I can add to my "todo" list to have it broken out and listed separately.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: rszemeti on December 08, 2011, 15:51:29 pm
yes, i am certain the old one is disabled.

I can't quite see where it is supposed to filter out the unwanted rates from the rating request,  I'm guessing you loop through the returned results and only push the appropriate ones that match up with the tickeboxes into an array of rates somewhere ...

I'll break out the tax myself,  as this needs to be live for next week, hopefully won't be too hard.  EU tax rules are pretty much the same all over .. the UK version is here : http://www.hmrc.gov.uk/vat/managing/charging/vat-invoices.htm (http://www.hmrc.gov.uk/vat/managing/charging/vat-invoices.htm) .. the US rules are very similar too. In some states its not required in retail, UNLESS a customer asks for it, because of that, its just easier to show it all the time. 

Whenever it is a busines-to-business sale, it has to be shown .. so again, its easier just to show it all the time. It's also a requirement to put the business tax number on the invoice, but thats not related to this module.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: rszemeti on December 09, 2011, 14:21:11 pm
So,  I got the tax working in EU vat mode OK, found 1 bug ..

Line 1696 of upsv2.php

if( !ps_checkout::country_in_eu_common_vat_zone($ship_country)){

should read:

if( !ps_checkout::country_in_eu_common_vat_zone($dest_country)){

there is no variable "$ship_country"

With that its pretty good. your tax is fine, the tax total for the invoice is correct, no need to seperately break out the tax on the shipping,  provinding the shipping tax is added to the total tax figure on the invoice, thats perfect.

All I got to figure out now is the display of prices including or excluding tax .. at the moment it is showing my product prices including tax, and my shipping price excluding tax @20% eg

prod 1  120
shipping 10
------------
total 132
tax 22

the total is correct and the tax figure is correct,  if I can get the product and the shipping to either both display including or excluding tax ( i dont even care which) I'll be happy!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on December 09, 2011, 14:49:23 pm
Thanks for pointing that bug out.

You may want to append the tax total to the shipping rate, something like (going from memory):

upsv2|UPS|UPS Ground|12.34|1.23
Where 1.23 is the tax total.  This way there will always be a record of the tax without having to recalculate it.  It makes it very simple to display it on the invoice/order details.  I may already have another variable after the service price, so be careful about that. I really wish shipping rates were encoded as name/value pairs, or something else that is a little more flexible than it is now. Then we would add our mods anywhere in the rate without breaking any other functionality or mods.
Title: Re: UPS v2.0 (multiple functionality additions)- Rates are too High
Post by: vargpr on December 21, 2011, 16:48:59 pm
Hello,
I am using the following address as the template to test the shipping rates

Tampa FL ZIP Code 33615

both items have 1 pound as the weight.

I am attaching the images for you to see. maybe i am adding something that should be?

THe ground rates are about 5$ off that not that bad, bug the reb and blue are way off

Please help!

[attachment cleanup by admin]
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on December 21, 2011, 16:52:41 pm
Do NOT post your UPS credentials, API, or other sensitive info to public forums.  I have deleted the first image for you.


Are you having an issue? What is the issue? Have you used VirtueMart debug mode? Have you set the module to "Show Extra Debug Info"? Are you logged in as an admin? You need to post more information about the issue.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: vargpr on December 21, 2011, 18:47:25 pm
Thank you very much . I didnt notice that.
1- The issues that i am having is that the rates for the blue and red shipping are too high. I check with the ups rate calculator and its about 120 difference.
2- VM Debug Mode Info- file attached
3- VirtueMart debug:
I have attached file
4- Yes i am log on as admin
5-I follow the instructions on the readme file. i have all the tabs etc. and the zip code is configured.

[attachment cleanup by admin]
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: vargpr on December 21, 2011, 22:37:55 pm
I found part of the problem.

I wasn't added the fuel charge %. The rates are perhaps  20-40 off from the UPS price but its fine for now.

Is there something else i can do to make that 20-40 gap lower?

On VM the price for air rates ate 20-40$ more than the ups rate on their site just to be clear
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on December 21, 2011, 22:51:13 pm
Sorry, something is wrong with the VM download system, I keep getting a php file instead of your text file.  Try emailing them to me.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: vargpr on December 30, 2011, 22:52:37 pm
Hello,

Thanks for the reply. i was able to get the module running fine.
There are two things that i want to know if it is possible
1) product # Z14-305-606C on the romanoff.com site is a hazmat. This is composed of two items. I was just told that item is shipped in two parts. The big container and the drum are shipped separately. Can I split this one item to be shipped with two different rates? Or simply add the rate to the total cost? How would  i go about doing this?

2) That same item i declared as hazmat but the image is not showing. Do i have to add the image to the flypage? but not show for every item. I do have it checked on shipping and on the actual produt, and the images is on the server.

Thanks for your help

Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on December 31, 2011, 05:18:08 am
1) There is currently no way to do this.  You could try tweaking the shipping modifiers, but that may not suffice.

2) Did you enable the hazmat fee image from the MAIN virtuemart "shipping" configuration tab?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: vargpr on January 13, 2012, 22:30:34 pm
Hi,

Thanks for the reply. I just added a solid rate to avoid problems.
And yes i did select the check box. i checked on the site and the images is there.

Also,

Idk if iam doing something wrong.

i have an item that weights 200lbs and have it selected to be shipped as freight . When i add that to the cart with no other items i get the 'Freight Shipping: Fee yet to be determined. " which is perfect
but when i add another item that is <149 pounds, i get the shipping rate of the 149lbs pound item, but no where in the page does it say that "Freight Shipping: Fee yet to be determined. " next to the item or somewhere on the page.

Because the shipping rate is being generated for the two items <149 lbs, when i give them the rate for the item that is >150lbs they will complain since i didn't notify them that there would be extra charges.

The solution that i can think of is simply add the warning of additional fright charges on the description. but that is not seen on the shopping cart.

I tried using unbundled, bundled,  and dropping the weight of the product to 149 lbs bu the shipping rates remains the same.  I would like for that one item (149lbs ) to get its own rate plus what ever other item is added to the cart.

I also changed the Maximum per box: =1, so i added 2 item to the cart that are 149 and the shipping cost still the same.

Any ideas? :-\


Thanks
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 13, 2012, 22:41:52 pm
Hi,
Are you using a custom VM theme, or anything like that? An "additional freight charges apply" message should appear in the cart and on the checkout pages and in the invoice if any freight item is added to the cart.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: vargpr on January 13, 2012, 23:00:50 pm
I purchase the template with the vm already incorporated from joomlart.com

I figured it would have to show somewhere but i do not see it.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: vargpr on January 13, 2012, 23:12:31 pm
here is the snapshot of the product
http://romanoff.com/vm/


i hope this helps
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 14, 2012, 04:25:45 am
If it uses a customized VIrtueMart template, then the necessary code is not in place to show the notices.  You'll need to update your template with that code.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: vargpr on January 16, 2012, 18:15:09 pm
Ok, that fine, but how about the rates for UPS. I don't see that unbundled items are generation its own ups shipping rate.

Thanks,
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 16, 2012, 18:42:46 pm
Rates for unbundled items are generated on a weight/source/destination basis.  If two products weigh exactly the same, and the source and destination addresses are the same, only one request will be sent for that combination and multiplied for aggregated rate.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: vargpr on January 27, 2012, 22:21:01 pm
where on the fly page do i have to add the hazmat and other images to display on product declared hazmat, freight, ground shipping?

Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on January 27, 2012, 22:32:21 pm
If you'll look at the flypage.tpl.php file included with the module that should answer your question. :)

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: larismedia on February 17, 2012, 19:37:29 pm
Will this add-on work for items over 70 lbs. I have a customer who had an order that was 200lbs which is fright, but the ups 1.0 mod freaked out and said the total for shipping is 100 dollars and not 300 dollars.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 17, 2012, 19:39:55 pm
The BASIC module cannot handle larger items, but the more advanced modules allow you to flag the item as a freight item and notify the user that additional postage will be required after the order is made.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: dstein on February 17, 2012, 20:19:45 pm
Hi Reggie,

We have been using UPSv2 for a while and love it. Are you going to make anything for VM2? I am thinking about migrating, but we can't do without your UPS mod.

Thanks!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: larismedia on February 17, 2012, 20:22:27 pm
The BASIC module cannot handle larger items, but the more advanced modules allow you to flag the item as a freight item and notify the user that additional postage will be required after the order is made.

Reggie

By more advanced you mean your mod? Sorry, I'm just really confused on this.

If we can have it error and tell the customer more cost will be added after the order is placed that would be perfect. The customer store ships nuts, bolts, and boat dock parts so it always can be different sometimes it could be a small order and sometimes its a large order which cause the weight to act up.

Does this work on vmart 1.19?

Thanks for your help!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 17, 2012, 20:23:50 pm
There are several different versions of the module.  See the first post in this thread for an outline of each.  The BASIC module is labeled as such.  The "advanced" modules are the other ones.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: larismedia on February 17, 2012, 20:25:28 pm
There are several different versions of the module.  See the first post in this thread for an outline of each.  The BASIC module is labeled as such.  The "advanced" modules are the other ones.

Does the mod for 1.1.8 work on 1.1.9?

Thanks again
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 17, 2012, 20:26:29 pm
I have had several users report that the vm118 module works on vm119 with no apparent issues.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: jbrumley2009 on February 20, 2012, 16:53:23 pm
I am receiving this error. Could you tell me what the code is on line 441 in the php file? and possibly why I am getting this error?

Notice: Undefined variable: shipment in C:\xampp\htdocs\joomla15\administrator\components\com_virtuemart\classes\shipping\upsv2.php on line 441
Error: Error processing the Request to UPS.com
Error: We could not find a UPS shipping rate. Please make sure you have entered a valid shipping address. Or choose a rate below. <--I don't actually get any other rates

Thanks.

I am using

Joomla 1.5
Virtuemart 1.1.9
UPSv2 BASIC
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on February 20, 2012, 16:57:05 pm
What you're seeing is just a notice.  You have error reporting set too high.  To get more info about why you are not receiving any rates, use virtuemart debug mode and run the checkout again.  My guess is that you've not checked any services, or the services you've selected are not being returned in the API reply. 
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: jbrumley2009 on February 20, 2012, 17:39:23 pm
OK I changed the error reporting, I must have a some point set it to Maximum. Anyway, I set VM to Debug, and I sent the XML Post and Request Outputs to you by mail.  I would appreciate it if you could take a look and let me know where the request is having an issue.

Thanks.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: vargpr on February 24, 2012, 16:29:10 pm
Let me first start by saying that your module work perfect for my business. I have not had a few problem with the cost of shipping, but i was able to fix them with your guidance.

There is one thing that i would like to know if can be done.

Our business doesn't accept Credit cards if a purchase is made outside of the United States.

So if would like to instead of giving the user the capability to input a credit card information, i would like to unable that, and perhaps just ad a button that one of our sales staff will contact them.

We do wire transfers for international sales.

Can this be done with this module?


Thanks
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: vpmis on March 07, 2012, 23:10:02 pm
I am having a problem with the UPSv2 install.  I tried to install the UPSv2 (vm11x-upsv2.2011.07.20-BASIC) and copied the 3 files and overwrote the UPSv1 files.  When I went to check out of my store, I received a fatal error:
Fatal error: Class 'ups' not found in /home/content/18/7242818/html/components/com_virtuemart/themes/default/templates/checkout/list_shipping_methods.tpl.php(22) : eval()'d code on line 1

I am not sure that I even installed the UPSv2 correctly, as I read about having to run a SQL script, and there wasn't any .sql files in the zip.  My VirtueMart version is 1.1.2, and my Joomla version is 1.5.9

Any help would be very greatly appreciated!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 07, 2012, 23:14:04 pm
Hi,
The BASIC module requires no SQL updates.

I'm not sure where the "ups" class error is coming from.  Do you have the original ups module enabled?  my module uses a class called "upsv2", so it would not throw this error, it must be something else.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: vpmis on March 07, 2012, 23:27:22 pm
Hi Reggie,
Thank you so much for your prompt reply! I had the wrong module enabled, and changed it to upsv2, and I am getting the error, this time saying "Class upsv2 not found..." along with 2 warning messages.  I am pulling the rates via an xml, could this have anything to do with it?
Thanks!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: vpmis on March 07, 2012, 23:36:23 pm
I think I am slowly working my way somewhere, but I have (hopefully) 1 final question.  When I try to process my shipment, using only upsv2, I get an error stating "Error: UPS was not able to process the Shipping Rate Request.. Error Code: 10002, Error Description: The XML document is well formed but the document is not valid"  If I turn on v1, I get charges, but 2 seperate ones...
Sorry to give ya such a headache.
Thanks!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 07, 2012, 23:57:10 pm
Not sure what to tell you there.  I've not heard of any other users having issues with the module.  Have you tried debug mode?
Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: vpmis on March 08, 2012, 00:16:07 am
Yes sir.
I got it to display prices when I enabled both UPS and upsv2.  Is there a way that you know of to hide UPS from showing up at the checkout section?  It seems the xml will only pull prices if I have the standard UPS enabled, where the xml info is put in.
Thanks!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 08, 2012, 01:15:21 am
I don't understand why you'd need both enabled.  Sounds like a bug.  You should be able to disable the original ups module.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: vpmis on March 08, 2012, 16:12:11 pm
Yes sir, got that squared away, pulling rates, with markup. I have just 1 last question.  When shipping a product, I have it set in packs of 100.  If I put 200 in the cart, it is shipping 1 box of 200, instead of 2 boxes of 100.  Is there a way to set it so that it will break the shipment down to 2 packages of 100?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 08, 2012, 16:13:47 pm
If you're using a non-basic version of UPSv2, use the "Max per package" feature.   See the "Usage" tab for details.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: vpmis on March 08, 2012, 16:19:37 pm
Basic version does not support this then? Can the non-basic versions run on VM 1.1.2?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 08, 2012, 16:27:01 pm
BASIC version is just that, it just shows rates.

I have never tried using a recent version of UPSv2 on such an old VM installation...you should try it on a test server first!

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: vpmis on March 08, 2012, 16:41:00 pm
Will do. Thank you so much for your help Reggie.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: vpmis on March 08, 2012, 21:02:06 pm
Hi Reggie,
Last question, I promise. I updated VM, and updated your UPSv2 to the most up to date, and it is awesome. I just have not been able to figure out the fuel surcharge.  I put in 19 for UPS ground to mark it up 19%, but the price being displayed is still the published rates.  In debug mode, it says class.Shipment::getRates() - fuel service rate for UPS_Ground_FSC is 1.0019

Am I missing something easy to have it increase the Ground the 19% fuel surcharge?
Thanks!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 08, 2012, 21:16:25 pm
use the percent sign.  it's not the most intuitive interface, I know...it's from the original module.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: vpmis on March 08, 2012, 21:20:31 pm
You are awesome! Thank you!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: vpmis on March 08, 2012, 21:50:01 pm
Just wondering, but is there a way to choose flat fee added to the final order total in the Addl tab of shipping? And apply it to all products?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 08, 2012, 22:00:00 pm
Sorry, no.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: vpmis on March 08, 2012, 22:02:10 pm
No worries. You did a fantastic job. Thanks again!
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 08, 2012, 22:09:22 pm
Thank you for the kind words!
Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mowlman on March 09, 2012, 14:15:41 pm
Has anyone tested UPSv2 with VM2 and Joomla 2.5 yet?

UPSv2 has become one of my have to have components. I have to work through its functionality so it will work with the latest versions before finishing my migration projects.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 09, 2012, 14:35:53 pm
VM2 is a completely new system for which my component will not work.  It will require a total rewrite.  I plan on doing it, however, I do not know WHEN it will happen.  Time is hard to come by these days!

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: mowlman on March 09, 2012, 14:43:54 pm
Understood. Time is limited and so is $.  You have put together a great shipping app, spending a lot of blood, sweat and tears along with spending time in forums and answering sometimes, somewhat stupid questions. And doing all of this for free.  Thank you for your time and effort.

-Bill
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: sdobson on March 28, 2012, 15:01:18 pm
Hi,

I was wondering if I could get some help. I'm using Joomla 1.5.15 and VirtueMart 1.1.5 . I have updated to the UPS v2.0 for the version of VirtueMart I am currently running.

On the old UPS v1, I was able to get shipping quotes for UPS Express. However, on my test site, the rates are right for the other shipping methods, however no shipping rate/option appears for UPS Express.

I copied all the settings from the old UPS v1, but I still got nothing.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 30, 2012, 03:39:59 am
It's most likely a name matching issue.  Be sure to use the debug features and gather more info.  See what the XML reply looks like.  Compare that to the names in the upsv2.cfg.php file.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: larismedia on April 04, 2012, 17:27:11 pm
Customer is reporting a tax is being added to the shipping after the plugin was installed. I've looked thought the settings but I have not found where I can change it.

Thanks
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on April 04, 2012, 20:31:08 pm
Any tax added in by my module is put into the shipping price itself.  You can turn it off by changing the tax settings to "flat rate" and then use a 0% rate.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: jonasalvarado on April 21, 2012, 15:47:06 pm
Greetings, I commented to perform the calculation ups.com shipping receipt by the following rate:
ZIP to 90745 U.S. $ 84.50.

well and what I get via virtuemart is:
Post:
<?xml version="1.0"?><AccessRequest xml:lang="en-US"> <AccessLicenseNumber>mylicense</AccessLicenseNumber> <UserId>myuser</UserId> <Password>mypassword</Password></AccessRequest><?xml version="1.0"?><RatingServiceSelectionRequest xml:lang="en-US"> <Request>  <TransactionReference>  <XpciVersion>1.0001</XpciVersion>  </TransactionReference>  <RequestAction>rate</RequestAction>  <RequestOption>shop</RequestOption> </Request> <Shipment>  <Shipper>   <Address>    <PostalCode>33010</PostalCode>    <CountryCode>US</CountryCode>   </Address>  </Shipper>  <ShipTo>   <Address>    <PostalCode>90745</PostalCode>    <CountryCode>US</CountryCode>    <ResidentialAddressIndicator/>   </Address>  </ShipTo>  <ShipFrom>   <Address>    <PostalCode>33010</PostalCode>    <CountryCode>US</CountryCode>   </Address>  </ShipFrom>  <Package>   <PackagingType>    <Code>00</Code>   </PackagingType>   <PackageWeight>    <UnitOfMeasurement>     <Code>LBS</Code>    </UnitOfMeasurement>    <Weight>97.65</Weight>   </PackageWeight>  </Package> </Shipment></RatingServiceSelectionRequest>
Result:
<?xml version="1.0"?>
<RatingServiceSelectionResponse><Response><TransactionReference><XpciVersion>1.0001</XpciVersion></TransactionReference><ResponseStatusCode>1</ResponseStatusCode><ResponseStatusDescription>Success</ResponseStatusDescription></Response><RatedShipment><Service><Code>03</Code></Service><RatedShipmentWarning>Additional Handling has automatically been set on Package 1.</RatedShipmentWarning><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>98.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>70.12</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>8.50</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>78.62</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery/><ScheduledDeliveryTime/><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>70.12</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>8.50</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>78.62</MonetaryValue></TotalCharges><Weight>97.6</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>98.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>12</Code></Service><RatedShipmentWarning>Additional Handling has automatically been set on Package 1.</RatedShipmentWarning><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>98.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>273.60</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>8.50</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>282.10</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>3</GuaranteedDaysToDelivery><ScheduledDeliveryTime/><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>273.60</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>8.50</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>282.10</MonetaryValue></TotalCharges><Weight>97.6</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>98.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>02</Code></Service><RatedShipmentWarning>Additional Handling has automatically been set on Package 1.</RatedShipmentWarning><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>98.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>382.64</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>8.50</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>391.14</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>2</GuaranteedDaysToDelivery><ScheduledDeliveryTime/><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>382.64</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>8.50</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>391.14</MonetaryValue></TotalCharges><Weight>97.6</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>98.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>13</Code></Service><RatedShipmentWarning>Additional Handling has automatically been set on Package 1.</RatedShipmentWarning><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>98.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>561.74</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>8.50</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>570.24</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery><ScheduledDeliveryTime/><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>561.74</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>8.50</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>570.24</MonetaryValue></TotalCharges><Weight>97.6</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>98.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>14</Code></Service><RatedShipmentWarning>Additional Handling has automatically been set on Package 1.</RatedShipmentWarning><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>98.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>597.93</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>8.50</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>606.43</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery><ScheduledDeliveryTime>8:00 A.M.</ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>597.93</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>8.50</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>606.43</MonetaryValue></TotalCharges><Weight>97.6</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>98.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>01</Code></Service><RatedShipmentWarning>Additional Handling has automatically been set on Package 1.</RatedShipmentWarning><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>98.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>562.59</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>8.50</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>571.09</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery><ScheduledDeliveryTime>10:30 A.M.</ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>562.59</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>8.50</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>571.09</MonetaryValue></TotalCharges><Weight>97.6</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>98.0</Weight></BillingWeight></RatedPackage></RatedShipment></RatingServiceSelectionResponse>

Ie the rates that throws me ups.com never match those of virtuemart, I installed the latest version of UPSv2 and executed each step correctly.
In most cases happens to me with heavy weights, I have been checking the forum and have not found anything that can help me, I appreciate all your help since you can not really be happening. I'm on the verge of madness.

very thanks .

JAB



Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on April 21, 2012, 15:50:43 pm
Hi,
Your rate discrepency is probably due to package dimensions not being declared.  Are these items that ship by themselves? If so, you should set the dimension declaration option and use dimensions.

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: eric@sandsprecision.com on May 30, 2012, 23:11:10 pm
Love'n the module, thanks in advance.

I'm having and issue with the HTML it is generating, must be an underlying user issue - it always is...  :o

Joomla: 1.5.26
VM: 1.1.9

The radio buttons are acting up.  After looking at the HTML code, I noticed that the tags are closing out of sequence.
Code: [Select]
<label for="upsv2%7CUPS%7CUPS+Ground%7C0">
  <input id="upsv2%7CUPS%7CUPS+Ground%7C0" type="radio" value="upsv2%7CUPS%7CUPS+Ground%7C0" name="shipping_rate_id">
    UPS Ground
    <strong>($0.00)</strong>
    &nbsp;&nbsp;-&nbsp;&nbsp;USD64.64 Guaranteed Day(s) To Delivery
    <br>
    <label for="upsv2%7CUPS%7CUPS+3+Day+Select%7C0">
      <input id="upsv2%7CUPS%7CUPS+3+Day+Select%7C0" type="radio" value="upsv2%7CUPS%7CUPS+3+Day+Select%7C0" name="shipping_rate_id">
      UPS 3 Day Select
      <strong>($0.00)</strong>
      &nbsp;&nbsp;-&nbsp;&nbsp;USD96.49 Guaranteed Day(s) To Delivery
      <br>
      <label for="upsv2%7CUPS%7CUPS+2nd+Day+Air%7C0">
        <input id="upsv2%7CUPS%7CUPS+2nd+Day+Air%7C0" type="radio" value="upsv2%7CUPS%7CUPS+2nd+Day+Air%7C0" name="shipping_rate_id">
        UPS 2nd Day Air
        <strong>($0.00)</strong>
        &nbsp;&nbsp;-&nbsp;&nbsp;USD128.50 Guaranteed Day(s) To Delivery
        <br>
        <label for="upsv2%7CUPS%7CUPS+Next+Day+Air+Saver%7C0">
          <input id="upsv2%7CUPS%7CUPS+Next+Day+Air+Saver%7C0" type="radio" value="upsv2%7CUPS%7CUPS+Next+Day+Air+Saver%7C0" name="shipping_rate_id">
          UPS Next Day Air Saver
          <strong>($0.00)</strong>
          &nbsp;&nbsp;-&nbsp;&nbsp;USD203.15 Guaranteed Day(s) To Delivery
          <br>
          <label for="upsv2%7CUPS%7CUPS+Next+Day+Air+Early+A.M.%7C0">
            <input id="upsv2%7CUPS%7CUPS+Next+Day+Air+Early+A.M.%7C0" type="radio" value="upsv2%7CUPS%7CUPS+Next+Day+Air+Early+A.M.%7C0" name="shipping_rate_id">
            UPS Next Day Air Early A.M.
            <strong>($0.00)</strong>
            &nbsp;&nbsp;-&nbsp;&nbsp;USD276.77 Guaranteed Day(s) To Delivery
            <br>
            <label for="upsv2%7CUPS%7CUPS+Next+Day+Air%7C0">
              <input id="upsv2%7CUPS%7CUPS+Next+Day+Air%7C0" type="radio" value="upsv2%7CUPS%7CUPS+Next+Day+Air%7C0" name="shipping_rate_id">
              UPS Next Day Air
              <strong>($0.00)</strong>
              &nbsp;&nbsp;-&nbsp;&nbsp;USD241.28 Guaranteed Day(s) To Delivery
              <br>
              <br>
              <br>
              <br>
              <input type="hidden" value="CHECK_OUT_GET_SHIPPING_METHOD" name="checkout_this_step[]">
              <div align="center">
                <input class="button" type="submit" value="Next >>" name="formSubmit">
              </div>
              <script type="text/javascript">
                <!--
                  function submit_order( form ) { return true; }
                -->
              </script>
              <div id="statusBox" style="text-align:center;display:none;visibility:hidden;"></div>
          </label>
        </label>
      </label>
    </label>
  </label>
</label>

I have edited the code in upsv2.php, Line 554 from this:
Code: [Select]
$html .= "<br />\n";To this:
Code: [Select]
$html .= "</label>\n";
However, I still get the original close tags for LABEL after the set of radio buttons. 

Your assistance is greatly appreciated.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on May 30, 2012, 23:21:20 pm
Firefox?
What version of the module, specifically?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: eric@sandsprecision.com on June 05, 2012, 15:18:24 pm
The module is listed as 2.0 under Store / Shipping Module List

IE 9.0.8
When u select any shipping and then leave focus by clicking next, it selects the last option.  Then on the next page there is an Error: Please select another Shipping Method.

FireFox 12.0
Functionally works, however it will auto select other choices when the mouse moves.

The site URL:  sandsprecision.com/newsite


Sorry for the late reply.
Side note, how do u set the forum to send an email when someone has posted to your thread?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: eric@sandsprecision.com on June 07, 2012, 16:54:49 pm
Any thoughts on the subject?  Should I just hard code the closing div's? I know that there must be an underlining issue, but don't know where to start.
I have adjusted all weights to pounds and I'm using lb to represent pounds as noted in VirtueMart's instructional pdf.

Any assistance would be greatly appreciated.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on June 07, 2012, 17:00:27 pm
Sorry, no ideas here.  If the html is correct, then it is an interpretation issue.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: eric@sandsprecision.com on June 18, 2012, 21:09:18 pm
I have now fixed the prior issue with firefox and IE.

I setup the version 2.2011.04.19 and removed the 2.0 basic.
I manually extracted and copied the files to the new locations, this fixed the previous issue.

However, now....

IE will not let you processed pass the shipping stage.  No matter what you select it states
"Error: Please select another Shipping Method."

*  Joomla: 1.5.26
*  VM: 1.1.9
*  The module is listed as 2.2011.04.19 under Store / Shipping Module List
*  IE 9.0.8
*  FireFox 12.0
*  The site URL:  sandsprecision.com/newsite

Any assistance would be greatly appreciated

Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on June 18, 2012, 21:12:08 pm
That's a strange one...it works in other browsers, but not IE? Sounds like IE isn't passing the form variables correctly.  Do you have some type of debugging tools to see what your browser is sending the server? Something like "firebug", but for IE? I really don't deal with IE much (if I can help it).
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: MREKMiller on July 19, 2012, 10:27:49 am
I hope this is the right place to post this. Great job on UPS v2 - it's got all the tools I need (and even some the gov't could use :) )

I'm am having trouble getting the cartrates to display while not logged in. I get this error:

Warning: Invalid argument supplied for foreach() in /home/content/00/6719700/html/administrator/components/com_virtuemart/classes/shipping/upsv2/class.Shipment.php on line 357

Help  :'( I had the previous version installed/uninstalled and updated line by line through the sql.

Thanks!

PS. Is it possible to hide the 'Number pieces in box:1' being displayed at the bottom of the product page but still have it defined?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 19, 2012, 13:46:31 pm
Hi,
is the country/zip code input being displayed for cartrates before receiving this warning?

Reggie
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: MREKMiller on July 20, 2012, 06:13:33 am
Thanks for the fast response. Yes, the box to enter the zip code is showing. It fails after submitting (the page refreshes with the error code displaying below the line showing the country and zip entered correctly.

Thanks again Reggie.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 20, 2012, 14:20:04 pm
What version of UPSv2? VirtueMart?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: MREKMiller on July 21, 2012, 10:24:36 am
vm118-upsv2.2011.04.19 and Joomla 1.5

Sorry, probably should have mentioned that earlier.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 21, 2012, 16:33:48 pm
That's in the "get rates" function, which loops through packages.  The error means there are no package objects to loop through.  Hmmm.  Very odd.  Did you try debug mode (both in the module AND virtuemart debug mode)?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: MREKMiller on July 29, 2012, 10:45:24 am
I ran the VM debug and before the entire page loads I get this error at the top:

Debug: plgSystemCartRates::onAfterRender() 'attachto' not defined. Defaulting to after Checkout link.

Below that within the cartrates (while not logged in) I get the following:

Debug: upsv2::__construct() - Starting upsv2 version 2.2011.04.19
Debug: upsv2::__construct() - global maximum package weight is 150 lb
Debug: upsv2::__construct() - no user information returned from database where $vars["ship_to_info_id"]==
Debug: upsv2::__construct() - Using first BT address found.
Debug: upsv2::__construct() - BT address lookup failed. Could not determine user info!
Debug: class.Shipment::addPackage() - Adding a new unbundled package
Debug: class.Shipment::addPackage() - Package Number: 1
Debug: class.Shipment::addPackage() - Package is Unbundled
Debug: class.Shipment::addPackage() - Maxweight: 150
Debug: class.Shipment::addPackage() - Padding: 0.01
Debug: class.Shipment::addPackage() - Shipping Info - Country: US State: CA ZIP: 92867
Debug: class.Package::addItem() - ***** Adding item 735 (Quick Sign Plastic A-Frame, 18 x 24 inches) to package #1 *****
Debug: class.Package::addItem() - pid 735 is restricted to ground services
Debug: class.Package::addItem() - (Ground Services) Weight: 8.08, modifiedWeight: 8.08, freeWeight: 0, flatWeight: 0
Debug: class.Package::addItem() - (Non-Ground) Weight: 8.08, modifiedWeight: 8.08, freeWeight:0 , flatWeight: 0
Debug: upsv2::get_rates_array() - rate caching is: 1
Debug: Using the cURL library for communicating with onlinetools.ups.com

XML Post:
<?xml version="1.0"?><AccessRequest xml:lang="en-US"> <AccessLicenseNumber>XXXXXXXXXXXXXXXX</AccessLicenseNumber> <UserId>XXXXX</UserId> <Password>XXXXX</Password></AccessRequest><?xml version="1.0"?><RatingServiceSelectionRequest xml:lang="en-US"> <Request>  <TransactionReference>  <XpciVersion>1.0001</XpciVersion>  </TransactionReference>  <RequestAction>rate</RequestAction>  <RequestOption>shop</RequestOption> </Request> <PickupType>  <Code>01</Code> </PickupType> <Shipment>  <Shipper>   <Address>    <PostalCode>92867</PostalCode>    <CountryCode>US</CountryCode>   </Address>  </Shipper>  <ShipTo>   <Address>    <PostalCode>93401</PostalCode>    <CountryCode>US</CountryCode>   </Address>  </ShipTo>  <ShipFrom>   <Address>    <PostalCode>92867</PostalCode>    <CountryCode>US</CountryCode>   </Address>  </ShipFrom>  <Package>   <PackagingType>    <Code>21</Code>   </PackagingType>   <PackageWeight>    <UnitOfMeasurement>     <Code>LBS</Code>    </UnitOfMeasurement>    <Weight>8.08</Weight>   </PackageWeight>  </Package> </Shipment></RatingServiceSelectionRequest>

XML Response:
<?xml version="1.0"?>
<RatingServiceSelectionResponse><Response><TransactionReference><XpciVersion>1.0001</XpciVersion></TransactionReference><ResponseStatusCode>1</ResponseStatusCode><ResponseStatusDescription>Success</ResponseStatusDescription></Response><RatedShipment><Service><Code>59</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>8.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>21.45</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>21.45</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>2</GuaranteedDaysToDelivery><ScheduledDeliveryTime>12:00 Noon</ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>21.45</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>21.45</MonetaryValue></TotalCharges><Weight>8.0</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>8.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>02</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>8.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>18.65</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>18.65</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>2</GuaranteedDaysToDelivery><ScheduledDeliveryTime/><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>18.65</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>18.65</MonetaryValue></TotalCharges><Weight>8.0</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>8.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>13</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>8.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>40.60</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>40.60</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery><ScheduledDeliveryTime>4:30 P.M.</ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>40.60</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>40.60</MonetaryValue></TotalCharges><Weight>8.0</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>8.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>14</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>8.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>82.49</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>82.49</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery><ScheduledDeliveryTime>10:00 A.M.</ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>82.49</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>82.49</MonetaryValue></TotalCharges><Weight>8.0</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>8.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>01</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>8.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>47.77</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>47.77</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery><ScheduledDeliveryTime>12:00 Noon</ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>47.77</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>47.77</MonetaryValue></TotalCharges><Weight>8.0</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>8.0</Weight></BillingWeight></RatedPackage></RatedShipment></RatingServiceSelectionResponse>


Debug: upsv2::get_rates_array() - WARNING! No matching rates were found!
Debug: upsv2::get_package_rates(ALL) - get_rates_array failed.
Debug: class.Shipment::getRates() - ************ Starting Rate Calculations **********
Debug: class.Shipment::getRates() ----------- Starting Package #1-----------
Debug: class.Shipment::getRates() - (Ground Services) Weight: 8.08, Flatfee Weight: 0, Free Weight: 0, Modified Weight:8.08
Debug: class.Shipment::getRates() - (Non-Ground) Weight: 8.08, Flatfee Weight: 0, Free Weight: 0, Modified Weight:8.08

Title: Re: UPS v2.0 (multiple functionality additions)
Post by: yaani on July 29, 2012, 19:56:46 pm
I have vm118-upsv2.2011.04.19 and Joomla 1.5, Virtuemart 1.1.9.

I installed the shipping module to be able to have free shipping for certain products.

I want to upgrade to Virtuemart 2.0.8 & it has the ability to have free shipping on certain products.

What is the procedure to uninstall the UPS 2 module?

Is the UPS 2 module compatible with Virtuemart 2.0.8?

I have a test version of the website here www.specraceford.com/ barkersexhaust (remove space) that I upgraded to Virtuemart 1.1.9 when I try to check out I select the shipping address & click the Next button & it takes me to a blank page that says "Checkout". So I was wanting to unistall the module to see if that was causing the error?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 30, 2012, 14:02:16 pm
yaani,
You'll need to remove the additional columns from the database, and revert the updated files to your originals.  the columns can be found in upsv2.sql.

UPSv2 is not compatible with VM2.0.  I have plans to create a compatible version, I just have not had the time.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 30, 2012, 14:03:25 pm
MREKMiller:
what services do you have selected in the module configuration?  You're receiving a valid reply, but you may not have enough services checked to match up with the reply.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on July 31, 2012, 16:50:42 pm
**** UPDATE ****

vm119-lowmips.2011.08.22 public release
Includes UPSv2, USPSv5, and FedExv2, all ported to vm119 code.
Download from my website, under "Free Software", "Shipping", then "Other" (http://www.lowmips.com/joomla/free-software/category/7-other).
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: MREKMiller on August 08, 2012, 10:47:05 am
I have it working now :)

When a user is not logged in and a zip code is entered the package type used is from the international shipping package type option...regardless of the fact I'm using a domestic zip code.

When a user is logged in it recognizes correctly to use domestic shipping package type option.

Essentially, I had different shipping package type options selected for domestic vs. int'l but had limited the results to only show the shipping package type that was set for domestic. Hence, since non-logged in users are by default treated as int'l based on your code (regardless of a domestic zip code) no returned UPS results matched my settings.

To replicate this only allow for UPS Ground shipping under "Select authorized shipping methods". And under "Pick-up and Packaging" set domestic shipments to "package" and int'l shipments to "UPS Express Box". Now remain logged out and add a product to cart and enter a zip code domestic to the ship from of the product.


FYI, to figure this out it was helpful for me to see the xml generated by the shipping module debug, but as regular VISITOR (non-admin), meaning I had to find and remove your admin checks for debug output. Might consider removing that check or adding it as an option.

Thanks again for the help and this most excellent mod.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: arueder on August 10, 2012, 17:21:34 pm
Is there a way to modify the ordering the service options appear in (ex. lowest - highest cost)?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on August 10, 2012, 17:22:24 pm
yes, you'd want to do that in the upsv2.php file, function list_rates();
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: arueder on August 10, 2012, 17:35:04 pm
yes, you'd want to do that in the upsv2.php file, function list_rates();


And how exactly would I accomplish this? My php skills are a bit on the weak side  ::)
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on August 10, 2012, 18:07:30 pm
hmm, that might take a little doing.  the final_rates_array is really a key=>value mapping, with the key being the UPS code for the service.  IIRC correctly, it is ordered in the same order received from UPS, so I think probably a usort function would do it, and simply check the TotalCharges element of the value array. 

I know that doesn't help you much, needing a programmer, but if you want to find someone to take it on that should give them a big head start.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: arueder on August 10, 2012, 20:58:24 pm
Thanks for the help Lowmips. I will see what I can do  ;D
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: arueder on August 10, 2012, 22:14:00 pm
Sorry to be a pain but how hard would it be to wrap each shipping method (UPS & USPS) and their listed shipping options in a div along with the UPS and USPS logo?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on August 11, 2012, 14:23:06 pm
Should be simple... just output a div with a class or id, then set your css options to size it, and include a background.  Or output a "wrapper" div with a div containing the image and a div containing the rates.  This would also be done in list_rates() somewhere.
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: softcorner on October 12, 2012, 04:44:46 am
One of my clients has been using VM1.1.4 with UPS v2 module. Lately they notice that their calculated shipping cost is much lower than the cost calculated by UPS web site https://wwwapps.ups.com/ctc/request?loc=en_US.

It is simple shipping they are using. Small items are ordered and bundled together (non is shipped separately). Each item weighs about 10.2 ounces and minimum order requires 15 items in any combinations. So a minimum order would be around 9.6lb consisting of either one single item or several items totaling 15 items. UPSv2 probably calculates rate for a 10lb single package. When the similar package is entered into the above UPS site (a 10lb single package for the same origin and destination address) it gives a higher price as compared to what UPSv2 calculates.

e.g UPSv2 gives $10.38 for a 9.6lb package while the above UPS website gives $15.14 (Shipping from Asheboro, NC 27203 to Kearney, NE 68845).

I used the original UPS module that came with VM1.1.4 and it gives exactly the same price as UPSv2 for bundled package (off course it does not calculate separate shipping rate for each item like UPSv2 can which my client is not using).

The "UPS Online Tools API URL" is set to https://www.ups.com:443/ups.app/xml/Rate in UPSv2. Is that correct or is it a test website? May be this is the problem?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: softcorner on October 12, 2012, 06:36:56 am
The UPS website is actually adding Fuel Surcharge which has changed. 8% for Ground and 13.5% for Air shipping. Adding this to UPSv2 module (and UPSv1.1) I got the correct rates for Air shipping but ground shipping is still way too low. Does any one know why?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: stutco on March 05, 2013, 15:29:39 pm
I am getting the error during the checkout process:

Deprecated: Assigning the return value of new by reference is deprecated in /home/mypetcar/public_html/administrator/components/com_virtuemart/classes/shipping/upsv2.php on line 1028

Here is the offending code:

/* XML Parsing */
         require_once( $mosConfig_absolute_path. '/includes/domit/xml_domit_lite_include.php' );
         $xmlDoc =& new DOMIT_Lite_Document();
         $xmlDoc->parseXML( $xmlResult, false, true );

Any help?
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: lowmips on March 05, 2013, 15:55:07 pm
I am getting the error during the checkout process:

Deprecated: Assigning the return value of new by reference is deprecated in /home/mypetcar/public_html/administrator/components/com_virtuemart/classes/shipping/upsv2.php on line 1028

Here is the offending code:

/* XML Parsing */
         require_once( $mosConfig_absolute_path. '/includes/domit/xml_domit_lite_include.php' );
         $xmlDoc =& new DOMIT_Lite_Document();
         $xmlDoc->parseXML( $xmlResult, false, true );

Any help?

Change this:
 $xmlDoc =& new DOMIT_Lite_Document();

to this:
 $xmlDoc = new DOMIT_Lite_Document();
Title: Re: UPS v2.0 (multiple functionality additions)
Post by: vargpr on August 27, 2013, 18:31:07 pm
I would like to include in the same area where the shipping rates are a box that customer can check if they have their own UPS account Number.
Is this possible?
I was looking in to possible taking one of the rates and making it $0 and change the UPS Worldwide Expedited SM to " I Have My Own UPS Account"

But how would i make it =$0.0?