Re: Conditional shipping option?
It has no effect.
I changed the entry for USPS priority and it worked. But that is because this section is only for Domestic.
The section of code just below this domestic section seems to handle international. But it does not have the same "Custom transit time" section
Re: Conditional shipping option?
Are you trying to make the First-Class say the 7-12 days on Domestic or International?
Domestic uses:
function parseDomesticTransitTimeResults($Package, $service) {
International uses:
function parseIntlTransitTimeResults($Package, $service) {
Re: Conditional shipping option?
Quote:
Originally Posted by
Ajeh
Are you trying to make the First-Class say the 7-12 days on Domestic or International?
Domestic uses:
function parseDomesticTransitTimeResults($Package, $service) {
International uses:
function parseIntlTransitTimeResults($Package, $service) {
USPS first Class is only offered for International shipments. USPS priority is the only service offered for domestic shipments.
Re: Conditional shipping option?
Make sure that the customizations that you do are in the right function for Domestic and International ...
When set to custom, mine are working fine under the right function ...
Re: Conditional shipping option?
I traced it down to the if statement below. The "If" statement is not satisfied by a shipment that is using USPS First Class International shipping.
There are three terms in that statement, if I delete isset($this->transittime[$service]) Then the $time= statements below the "If" are executed.
Code:
function parseIntlTransitTimeResults($Package, $service) {
global $logfilename;
if (MODULE_SHIPPING_USPS_DEBUG_MODE == 'Logs') {
$fp = @fopen($logfilename, 'a');
}
if (isset($this->transittime[$service]) && $this->transittime[$service] == '' && preg_match('#(GXG|International)#i' , $service)) {
Re: Conditional shipping option?
Could you Zip your file:
/includes/modules/shipping/usps.php
and attach it here ...
What you are saying you have to do for this really is not making a lot of sense ...
Using the Custom days in nothing more than modifying each of the cases as they apply ...
And what is the Ship To and weight that you are testing with?
1 Attachment(s)
Re: Conditional shipping option?
1 Attachment(s)
Re: Conditional shipping option?
This is a customized USPS for you and has a few extra features than the usps J5 version ...
You will need to do a REMOVE, INSTALL and re-configure with this in the Modules ... Shipping ...
See if this works better for you when set to CUSTOM ...
Re: Conditional shipping option?
Quote:
Originally Posted by
Ajeh
This is a customized USPS for you and has a few extra features than the usps J5 version ...
You will need to do a REMOVE, INSTALL and re-configure with this in the Modules ... Shipping ...
See if this works better for you when set to CUSTOM ...
Ajeh,
I just modified the international IF statement rather than introducing this updated module. Seems to be working.
One question, on the checkout page, it defaults to USPS FC. How can I get it to default to FedEx. I want the customer to make a conscious decision to use USPS FC International
Re: Conditional shipping option?
You could try customizing the class:
/includes/classes/shipping.php
Code:
for ($i=0; $i<$size; $i++) {
if (is_array($cheapest)) {
// never quote storepickup as lowest - needs to be configured in shipping module
if ($rates[$i]['cost'] < $cheapest['cost'] and $rates[$i]['module'] != 'storepickup' and $rates[$i]['module'] != 'usps') {
$cheapest = $rates[$i];
}
} else {
if ($rates[$i]['module'] != 'storepickup' and $rates[$i]['module'] != 'usps') {
$cheapest = $rates[$i];
}
}
}