When i adjust the weight of a product in the admin section to 1 ounce, the price shows as correct $4.95 cents. What could account for the weight measurements being so off? I'm running OpenCart v1.3.4. Has anyone else seen this issue?

Regards,
Matt
Code: Select all
$weight = $this->cart->getWeight();
$weight = ($weight < 0.1 ? 0.1 : $weight);
$pounds = floor($weight);
$ounces = round(16 * ($weight - floor($weight)));
Code: Select all
$weight = $this->cart->getWeight();
Code: Select all
$lb = $this->db->query("SELECT DISTINCT weight_class_id FROM " . DB_PREFIX . "weight_class WHERE unit = 'lb'");
$weight = $this->weight->convert($this->cart->getWeight(), $this->config->get('config_weight_class_id'), $lb->row['weight_class_id']);
Code: Select all
$weight = $this->cart->getWeight();
Code: Select all
$defaultWeightClassId = $this->config->get('config_weight_class_id');
$query = $this->db->query("SELECT wc.weight_class_id FROM `".DB_PREFIX."weight_class` wc LEFT JOIN `".DB_PREFIX."language` l ON l.language_id=wc.language_id WHERE l.code='en' AND wc.unit='lb';");
$poundWeightClassId = $query->row['weight_class_id'];
$weight = $this->weight->convert($this->cart->getWeight(),$defaultWeightClassId,$poundWeightClassId);
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Didn't I address this above already?JNeuhoff wrote:The USPS code line
should be replaced withCode: Select all
$weight = $this->cart->getWeight();
As regards the other 'weight' shipping module: Make sure the weights are specified in the default weight units. The latter was set at Opencart's admin backend atCode: Select all
$defaultWeightClassId = $this->config->get('config_weight_class_id'); $query = $this->db->query("SELECT wc.weight_class_id FROM `".DB_PREFIX."weight_class` wc LEFT JOIN `".DB_PREFIX."language` l ON l.language_id=wc.language_id WHERE l.code='en' AND wc.unit='lb';"); $poundWeightClassId = $query->row['weight_class_id']; $weight = $this->weight->convert($this->cart->getWeight(),$defaultWeightClassId,$poundWeightClassId);
Admin > Configuration > Setting > Local > Weight Class
Yes, except that my SQL query also makes sure that is uses the weight_class_id for the right language as well as the right weight unit.Didn't I address this above already?
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Code: Select all
if ($shipping_address['iso_code_2'] == 'US') {
Code: Select all
if ($country_info['iso_code_2'] == 'US') {
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
All the usps bugs with php errors were fixed here:JNeuhoff wrote:I think the line near 358:
should be replaced with:Code: Select all
if ($shipping_address['iso_code_2'] == 'US') {
The other error should then disappear, too. Looks like this shipping module wasn't well tested. But we are getting thereCode: Select all
if ($country_info['iso_code_2'] == 'US') {
I sell all digital downloads on my site and have require shipping off.. when people checkout with paypal there is no forced shipping. You must have some other settings set on your paypal account. There is no code in the paypal module that is forcing paypal shipping ratesflyfishingcolorado wrote: OpenCart needs to allow us to turn off all shipping modules when using PayPal as a payment method. PayPal forces you to use their shipping calculations even if you think they are inactive. I know because I tested 10 transactions tonight to confirm that shipping will be added to the total of the Open Cart amount which already includes shipping.
Users browsing this forum: No registered users and 4 guests