Custom purolator module won't allow checkout to continue to page 2
Clean install of Zencart 1.39h
I've built my own Purolator module. It's working in that it fetches a proper quote with pricing. See attached image.
The problem is, when I try to continue, I keep coming back to page 1, it will never move on to page 2.
Using any other module, pickup, free shipping, etc, works fine and it continues. But using my Purolator module, it stalls.
Any ideas?
Is there any place that tells you what exactly is required in a shipping module and where?
By the way, the 'currently unavailable' is there on purpose from me, and the 'confirm before shipping' is also a module I wrote, and it works.
[SCR]http://Mediagoldshop.com/images/snapshot1.png[/SCR]
Re: module works, but won't continue to page 2
More info:
There are NO errors on the page, it just keeps refreshing back to page 1 of 3 of the shipping screen.
This is what I'm providing in the 'quote()' method:
$this->quotes( $id, $module, $method($id, $title, $cost) )
It makes no sense that the page would just reload without throwing some sort of error, and that any other module would work.
Ideas?
Re: module works, but won't continue to page 2
Ok, how about this, can anyone tell me which files do the processing of the order?
Re: module works, but won't continue to page 2
It will not advance to the payment screen unless the shipping method being selected is confirmed to be valid.
Re: module works, but won't continue to page 2
Thank you, a reply!!
Quote:
Originally Posted by
DrByte
It will not advance to the payment screen unless the shipping method being selected is confirmed to be valid.
Yes, that's what I figured was happening.
Where can I find what is required to be valid?
Why can't it at least throw some sort of error so I know what doesn't validate?
It's very difficult writing this kind of code without an API.
I'm thankful for any advise. As a Java programmer, I find PHP very frustrating.
Re: module works, but won't continue to page 2
The list of quotes is presented to the customer, using the quotes returned in the array by the quotes() method.
The validation requests the quotes() again, and takes what the customer submitted and compares that against the list of quotes returned. If there's a match, it sets that as the shipping method, and moves on to the payment page. If it fails, it stays on the shipping-options page, and lets the customer choose from the list of available options.
Re: module works, but won't continue to page 2
Quote:
Originally Posted by
DrByte
The list of quotes is presented to the customer, using the quotes returned in the array by the quotes() method.
That part I got. I have a quote($method) function.
Q: is it quote, or quotes? I see both in different places.
I have a quote() function, and a this->quotes array.
Here's what I put in it:
PHP Code:
$this->quotes = array('id' => $this->code,
'module' => $this->title,
$methods = array());
$methods[] = array('id' => $type, // with an iteration here
'title' => $type, // for each service type
'cost' => $cost); // like am or weekend
$this->quotes['methods'] = $methods;
return $this->quotes;
Obviously I took out some details for clarity, but that's what I have.
Quote:
Originally Posted by
DrByte
The validation requests the quotes() again, and takes what the customer submitted and compares that against the list of quotes returned. If there's a match, it sets that as the shipping method, and moves on to the payment page. If it fails, it stays on the shipping-options page, and lets the customer choose from the list of available options.
Now it shows up on the screen, why doesn't it validate? I feel like I'm almost there, but something simple is missing.
Lux
Re: module works, but won't continue to page 2
I wasn't looking at actual code, so I apologize for referring to quotes() when the method name is actually quote().
Can you zip and attach your module as you have it now?
1 Attachment(s)
Re: module works, but won't continue to page 2
here's the zip. er.. assuming I can figure it out.
I will open-source this, with the rest of the files (language files and such) as soon as it's working. Also, this one uses nusoap libraries. I have a non-nusoap one available too.
Also, the error handling codes have been stripped out except for one, just because they triple the filesize and don't affect functionality.
Hopefully you can see what's wrong, I'm so close...Attachment 8506
Re: module works, but won't continue to page 2
ok, I haven't had any answers, and haven't figured it out, so I will provide the entire module to the community in its current form.
I'm asking that if you try this, you let me know if it works for you or not, and if it does, what version and modules you have installed.
Thanks
Download Purloator Shipping Module from mediagoldshop.com