Post by Rainforest » Fri Jan 27, 2012 8:35 am

Well!!

It looks like the 1.4 mod from above WORKS!! I tested it with a few different quantities.

The only problem is that it shows an error message (does stop you from checking out)

"Notice: Undefined index: code in /home/xxx/public_html/catalog/view/theme/default/template/checkout/shipping.tpl on line 14"

Any ideas anyone? Q?

Attachments

USPS_Error.png

USPS_Error.png (38.41 KiB) Viewed 5327 times


Active Member

Posts

Joined
Fri Jan 28, 2011 3:50 am

Post by Qphoria » Mon Mar 05, 2012 1:38 pm

You need to change all reference of
['id']
to
['code']
in 12 oclockers module

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Windlasher » Wed Mar 07, 2012 9:50 am

Qphoria wrote:You need to change all reference of
['id']
to
['code']
in 12 oclockers module

sorry, not a programmer. can you elaborate.... change what? where?

yes I can edit the php files. :-)

thanks in advance.

Newbie

Posts

Joined
Wed Mar 07, 2012 2:07 am

Post by vivekdbit » Wed Apr 11, 2012 10:36 pm

It is not the perfect solution.
take an exmple,
If my cart having 5 products having (3*3*11) so total space covred is 495 cubic.
495 is less than 514.25 so this 5 product logically fits inside the Medium Flat Rate Box.
But practically it is not possible.

Newbie

Posts

Joined
Wed Apr 11, 2012 10:26 pm

Post by ebuison » Thu Apr 12, 2012 5:30 am

Anyone have an idea why the shipping option is showing "<sup>&reg;</sup>" after Priority Mail?

Priority Mail<sup>&reg;</sup> Medium Flat Rate Box (Trackable)

The boxes are calculating correctly, but it's just showing the html tag.

Using 1.5.1.3

Thanks!

Newbie

Posts

Joined
Thu Apr 12, 2012 5:28 am

Post by ebuison » Thu Apr 12, 2012 6:05 am

...never mind...after a lot of searching and trying to fix the code myself.

http://forum.opencart.com/viewtopic.php?t=25128#p123964

Newbie

Posts

Joined
Thu Apr 12, 2012 5:28 am

Post by Qphoria » Thu Apr 12, 2012 12:24 pm

ebuison wrote:Anyone have an idea why the shipping option is showing "<sup>&reg;</sup>" after Priority Mail?

Priority Mail<sup>&reg;</sup> Medium Flat Rate Box (Trackable)

The boxes are calculating correctly, but it's just showing the html tag.

Using 1.5.1.3

Thanks!
I assume USPS just changed their labels again to add the &reg back in a diff way than the code adjusts for.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by vivekdbit » Mon Apr 16, 2012 6:32 pm

what if i am having 1 small box and 2 Large box,

I want the output as,

1 * Priority Mail Small Flat Rate Box + 2 * Priority Mail Large Flat Rate Box

Cost = 1* $5.35 + 2* $15.45
Total Shipping Cost = $36.25

Newbie

Posts

Joined
Wed Apr 11, 2012 10:26 pm

Post by dues » Wed Jun 26, 2013 9:47 am

Hi Does anyone have an updated version of this code for 1.551

Thank You

Newbie

Posts

Joined
Wed Jun 26, 2013 5:17 am

Post by spoon » Fri Jun 28, 2013 8:34 am

I just tested my updated vQmod on a 1.5.5.1 and it seems to be working as expected.
Let me know.

Attachments


User avatar
Newbie

Posts

Joined
Mon Dec 14, 2009 11:47 am

Post by DSTAngieB » Tue Nov 19, 2013 9:40 am

Does anyone know if the original fix works in ver. 1.5.6??? This is exactly the problem that I need to have solved on my website and before try it, I wondered if anyone else has had any success with this lately?

New member

Posts

Joined
Mon Oct 28, 2013 10:07 pm

Post by Cue4cheap » Tue Nov 19, 2013 11:36 am

DSTAngieB wrote:Does anyone know if the original fix works in ver. 1.5.6??? This is exactly the problem that I need to have solved on my website and before try it, I wondered if anyone else has had any success with this lately?
DSTAngieB,

Just tested it for you with 1.5.6.

It seems to work just fine. Now a caveat. I have not check this out 100% and I JUST installed it but here are a few things.....
- You MUST populate the products with dimensions in order for this to work.
- This may NOT work right for 'odd' sizes. I entered in a 36 x 2 x 2 dimension for a product. Now if you look at this page:
https://www.usps.com/ship/priority-mail-flat.htm you'll there is NO flat rate box that allows something to be sent with a length of 36 inches. But it showed the "Medium Flat Rate Box (Trackable)".

In my simple minded opinion this might work great for you BUT it also should do a check for any dimension that is > 25 inches and block all the flat rate boxes for a cart that contains those items...

My $0.02.

Mike
Last edited by Cue4cheap on Tue Nov 19, 2013 8:59 pm, edited 2 times in total.

cue4cheap not cheap quality


Active Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by Cue4cheap » Tue Nov 19, 2013 11:57 am

Okay I couldn't leave this as I left it.

Go into the file and find the section that starts with: //figure out what the best flat rate box option is (This is done in Inches) down to the ending } OF THAT section....

and replace everything with this:

Code: Select all

                //figure out what the best flat rate box option is (This is done in Inches)
                $flbox = 0;//figure out what the best flat rate box option is
                if ( ($cubic < 75.33) && ($product['length'] < 8.5 ) ) {
                    $flbox = 1;     //Small Flat Rate Disable Check
                } else if ( ($cubic < 514.25) && ($product['length'] < 11 ) ){
                    $flbox = 2;     //Med Flat Rate Disable Check
                } else if ( ($cubic < 792)  && ($product['length'] < 24 ) ) {
                    $flbox = 3;     //Large Flat Rate Disable Check
                }
Now what this does is will turn off all of them IF you have the length set to 24 inches or more. It does not check specifically if you have the width or height set to anything because in my case I would set the length to the longest part of the item.

I hope it helps.

Mike
Edited: 2 Dec 13 to change the length for small and medium boxes
Last edited by Cue4cheap on Tue Dec 03, 2013 9:47 am, edited 1 time in total.

cue4cheap not cheap quality


Active Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by Cue4cheap » Tue Nov 19, 2013 12:28 pm

One more thought: The international flat rate boxes does not seem to be affected by the dimensional thing I added above. It is late so I might take a look at this later (or if someone else jumps in that would be great too).

Mike

cue4cheap not cheap quality


Active Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by Cue4cheap » Tue Nov 19, 2013 8:58 pm

Noticed last night before my head hit the pillow that this kicks some errors into the errorlog. I don't think it is contrib related but related to the reply from USPS. Thankfully the debug gives you loads of info so it might be a quick fix. If I get the time I'll see about it.......

cue4cheap not cheap quality


Active Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by Cue4cheap » Wed Nov 20, 2013 11:06 am

This is a bit more complicated then at first glance. The errors it kicks is only for international because the variable it responds with is different the domestic quotes.
So logically I would have to look in the current USPS modules and see where / how it looks at the returned info and see if it already tracks the two variables returned from USPS and also if it acts upon the two differently. At this time I am not at a location I can look into the files.
Mike

cue4cheap not cheap quality


Active Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by Cue4cheap » Wed Nov 20, 2013 1:16 pm

Okay found out the problem. It was generating errors for Undefined variable: classid. This is because in the international section of the mod it isn't using classid but just id. SOOOOO.................

Find the section of code that starts with:
<!-- Add trackable status to title for International shipments -->
Specifically find this line:

Code: Select all

                if (($flbox != 1 && $id == 16) || ($flbox != 2 && $classid == 9) || ($flbox != 3 && $classid == 11)) {
And replace it with

Code: Select all

                if (($flbox != 1 && $id == 16) || ($flbox != 2 && $id == 9) || ($flbox != 3 && $id == 11)) {
This should work as intended and not kick any errors. Sorry it took so long but I was thinking it might be because of the change USPS made recently in how they returned the XML info that might have affected this but it turns out that isn't the case.
Hope it helps.
Mike

cue4cheap not cheap quality


Active Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by jbuttons1 » Wed Mar 04, 2015 8:46 am

I have a question for this mod. I have installed it and it is working perfectly for domestic but not international I am only getting -Priority Mail International (Trackable)- as an option and not any flat rate options, even though the flat rate option are set. Any assistance will be greatly appreciated. Thank you.

Newbie

Posts

Joined
Wed Mar 04, 2015 8:41 am
Who is online

Users browsing this forum: No registered users and 2 guests