Is there a way to add either a percentage increase, OR a service fee to USPS shipping rates displayed in the cart?
OC 3.0 USPS shipping API setup how to add a percentage or service fee
So if the rate for a shipment is returned by USPS of $10.00 by the API, have it increased by 5% so the rate displayed and charged to the customer would be $10.50
Or have a preset $5.00 added to any rate?
Thank you
OC 3.0 USPS shipping API setup how to add a percentage or service fee
So if the rate for a shipment is returned by USPS of $10.00 by the API, have it increased by 5% so the rate displayed and charged to the customer would be $10.50
Or have a preset $5.00 added to any rate?
Thank you
Look at the USPS extension and see if there is a way to capture what is being returned and add to it. I am away from a place that I can look at the code but it could be pretty simple.belowcost wrote: ↑Tue Aug 04, 2020 2:29 amIs there a way to add either a percentage increase, OR a service fee to USPS shipping rates displayed in the cart?
OC 3.0 USPS shipping API setup how to add a percentage or service fee
So if the rate for a shipment is returned by USPS of $10.00 by the API, have it increased by 5% so the rate displayed and charged to the customer would be $10.50
Or have a preset $5.00 added to any rate?
Thank you
Mike
cue4cheap not cheap quality
i see some lines in the USPS extension but not sure what to do?
is this the section?
is this the section?
Code: Select all
if (isset($this->request->post['shipping_usps_domestic_00'])) {
$data['shipping_usps_domestic_00'] = $this->request->post['shipping_usps_domestic_00'];
} else {
$data['shipping_usps_domestic_00'] = $this->config->get('shipping_usps_domestic_00');
}
if (isset($this->request->post['shipping_usps_domestic_01'])) {
$data['shipping_usps_domestic_01'] = $this->request->post['shipping_usps_domestic_01'];
} else {
$data['shipping_usps_domestic_01'] = $this->config->get('shipping_usps_domestic_01');
}
catalog/model/extension/shipping/usps.php
this is where the individual usps quotes are build:
this is where the individual usps quotes are build:
Code: Select all
$quote_data[$id] = array(
'code' => 'usps.' . $id,
'title' => $title,
'cost' => $this->currency->convert($cost, 'USD', $this->config->get('config_currency')),
'tax_class_id' => $this->config->get('shipping_usps_tax_class_id'),
'text' => $this->currency->format($this->tax->calculate($this->currency->convert($cost, 'USD', $this->session->data['currency']), $this->config->get('shipping_usps_tax_class_id'), $this->config->get('config_tax')), $this->session->data['currency'], 1.0000000)
);
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
Just to note, Hidden Shipping Adjustments is designed to do this. It can increase weight before quotes are requested, or costs after they are returned, by a flat amount or a percentage. I totally get if you want to code this yourself, but I thought I'd mention it as an option.
How about looking above at this post:
by letxobnav » Mon Aug 03, 2020 6:42 pm
catalog/model/extension/shipping/usps.php
this is where the individual usps quotes are build:
cue4cheap not cheap quality
Why do you keep PMing me the code? I am not going to update the code and send the file back to you.
Here is the line with the $cost variable
Code: Select all
'cost' => $this->currency->convert($cost, 'USD', $this->config->get('config_currency')),
Mike
cue4cheap not cheap quality
Who is online
Users browsing this forum: RoyT and 144 guests