1. EDIT: catalog/model/shipping/weight.php
2a. FIND (1.4.0 or older):
2b. FIND (1.4.1 or newer):
3. REPLACE WITH:
2a. FIND (1.4.0 or older):
Code: Select all
'title' => $result['name'] . ' (' . $this->weight->format($weight, $this->config->get('config_weight_class_id')) . ')',
Code: Select all
'title' => $result['name'] . ' (' . $this->language->get('text_weight') . ' ' . $this->weight->format($weight, $this->config->get('config_weight_class')) . ')',
Code: Select all
'title' => $result['name'],
After i made all that changes i got this on CHECKOUT CONFIRMATION page
Notice: Undefined index: cost in /catalog/model/total/shipping.php on line 7
Notice: Undefined index: cost in /catalog/model/total/shipping.php on line 8
Notice: Undefined index: cost in /catalog/model/total/shipping.php on line 20
Line 7 :
Line 8:
Line 20:
Notice: Undefined index: cost in /catalog/model/total/shipping.php on line 7
Notice: Undefined index: cost in /catalog/model/total/shipping.php on line 8
Notice: Undefined index: cost in /catalog/model/total/shipping.php on line 20
Line 7 :
Code: Select all
'text' => $this->currency->format($this->session->data['shipping_method']['cost']),
Code: Select all
'value' => $this->session->data['shipping_method']['cost'],
Code: Select all
$total += $this->session->data['shipping_method']['cost'];
hi Qphoria but i can not find exact line from above in my weight.php ,so what should i replace from it ?
This is weight.php the original one :
thanks again 
This is weight.php the original one :
Code: Select all
<?php
class ModelShippingWeight extends Model {
public function getQuote($address) {
$this->load->language('shipping/weight');
$quote_data = array();
if ($this->config->get('weight_status')) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "geo_zone ORDER BY name");
foreach ($query->rows as $result) {
if ($this->config->get('weight_' . $result['geo_zone_id'] . '_status')) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "zone_to_geo_zone WHERE geo_zone_id = '" . (int)$result['geo_zone_id'] . "' AND country_id = '" . (int)$address['country_id'] . "' AND (zone_id = '" . (int)$address['zone_id'] . "' OR zone_id = '0')");
if ($query->num_rows) {
$status = TRUE;
} else {
$status = FALSE;
}
} else {
$status = FALSE;
}
if ($status) {
$cost = 0;
$weight = $this->cart->getWeight();
$rates = explode(',', $this->config->get('weight_' . $result['geo_zone_id'] . '_rate'));
foreach ($rates as $rate) {
$data = explode(':', $rate);
if ($data[0] >= $weight) {
if (isset($data[1])) {
$cost = $data[1];
}
break;
}
}
if ((string)$cost != '') {
$quote_data['weight_' . $result['geo_zone_id']] = array(
'id' => 'weight.weight_' . $result['geo_zone_id'],
'title' => $result['name'] . ' (' . $this->language->get('text_weight') . ' ' . $this->weight->format($weight, $this->config->get('config_weight_class')) . ')',
'cost' => $cost,
'tax_class_id' => $this->config->get('weight_tax_class_id'),
'text' => $this->currency->format($this->tax->calculate($cost, $this->config->get('weight_tax_class_id'), $this->config->get('config_tax')))
);
}
}
}
}
$method_data = array();
if ($quote_data) {
$method_data = array(
'id' => 'weight',
'title' => $this->language->get('text_title'),
'quote' => $quote_data,
'sort_order' => $this->config->get('weight_sort_order'),
'error' => FALSE
);
}
return $method_data;
}
}
?>

In 1.4.8
FIND:
REPLACE WITH:
FIND:
Code: Select all
'title' => $result['name'] . ' (' . $this->language->get('text_weight') . ' ' . $this->weight->format($weight, $this->config->get('config_weight_class')) . ')',
Code: Select all
'title' => $result['name'],
I have just upgraded to 1.4.8. I made the modification above so that "(Weight: 0.00oz)" is no longer showing up in the cart (during checkout). However, it is showing up in the Shopping Cart module to the right. How can I delete it from that area? Thanks!
The problem is now fixed! I think that some old information was still in the cache.
The problem is now fixed! I think that some old information was still in the cache.
That lower right side weight display in 1.4.7 was moved to the header in 1.4.8Purebeads wrote:I have just upgraded to 1.4.8. I made the modification above so that "(Weight: 0.00oz)" is no longer showing up in the cart (during checkout). However, it is showing up in the Shopping Cart module to the right. How can I delete it from that area? Thanks!
The problem is now fixed! I think that some old information was still in the cache.
But there is a simple on/off switch in the admin settings.
Hi. .. This is exactly what i need to do also but I have the latest version v1.5.1.3 .. how is it possible to do the same thing in this version?
Thank you
Thank you
OK sitting here waiting i figured it out!
If you were looking for the same thing you must edit this file;
/catalog/language/english/shipping > weight.php
Please ALWAYS make a backup of the file before you start playing around with these
Cheers
If you were looking for the same thing you must edit this file;
/catalog/language/english/shipping > weight.php
Please ALWAYS make a backup of the file before you start playing around with these

Not working here either. (/catalog/language/english/shipping > weight.php)
If I change the line:
$_['text_title'] = 'Weight Based Shipping';
to
$_['text_title'] = '';
...then that successfully removes the 'Weight Based Shipping' heading in the 'Estimate Shipping & Taxes' section of the Shopping cart page. That's pretty straightforward. However... just below where that heading was, customers still see a radio button and its label, like this: Zone 1 (Weight: 12.00kg)
So if I go back into the above file and change the second line, from:
$_['text_weight'] = 'Weight:';
to
$_['text_weight'] = '';
...the customer still sees the weight listed next to the radio button: Zone 1 ( 12.00kg)
Can anyone explain how we get rid of the actual weight reference?
If I change the line:
$_['text_title'] = 'Weight Based Shipping';
to
$_['text_title'] = '';
...then that successfully removes the 'Weight Based Shipping' heading in the 'Estimate Shipping & Taxes' section of the Shopping cart page. That's pretty straightforward. However... just below where that heading was, customers still see a radio button and its label, like this: Zone 1 (Weight: 12.00kg)
So if I go back into the above file and change the second line, from:
$_['text_weight'] = 'Weight:';
to
$_['text_weight'] = '';
...the customer still sees the weight listed next to the radio button: Zone 1 ( 12.00kg)
Can anyone explain how we get rid of the actual weight reference?
Ok, really had to read the answers carefully to be able to piece it together and get it working. Basically I wanted to retrofit the "Weight Based" shipping module to be used as flat rate shipping. If that's sortof what you're looking to do, here's what I did:
1) In the admin side, go to [System] > [Localisation] > [Geo Zones].
2) Insert/Create whatever Geo Zones you want. I created one for Canada and one for US...naming them what I wanted the customer to see (e.g. Flat Rate Shipping (USA) and Flat Rate Shipping (Canada)).
3) Then, go to [Extension] > [Shipping] and [Edit] for Weight Based Shipping. You should see the new Geo Zones you just created. To set it up as Flat Rate, I entered 99999:6 for US and 99999:8 for Canada, which means a customer can buy up to 99999 lbs of merchandise and the shipping for US will be $6. My products aren't heavy, so that should cover all orders.
4) Once you've saved the shipping settings, now you tap into the php files...I am running 1.5.whatever.
5) Go to catalog/model/shipping/weight.php and
That should do it. And if you still see the weight in the Shopping Cart Header, that can be turned off like benisv noted in this thread.
1) In the admin side, go to [System] > [Localisation] > [Geo Zones].
2) Insert/Create whatever Geo Zones you want. I created one for Canada and one for US...naming them what I wanted the customer to see (e.g. Flat Rate Shipping (USA) and Flat Rate Shipping (Canada)).
3) Then, go to [Extension] > [Shipping] and [Edit] for Weight Based Shipping. You should see the new Geo Zones you just created. To set it up as Flat Rate, I entered 99999:6 for US and 99999:8 for Canada, which means a customer can buy up to 99999 lbs of merchandise and the shipping for US will be $6. My products aren't heavy, so that should cover all orders.

4) Once you've saved the shipping settings, now you tap into the php files...I am running 1.5.whatever.
5) Go to catalog/model/shipping/weight.php and
6) Then, go to catalog/language/english/shipping/weight.php. And edit the "text_title" to say "Flat Rate Shipping." And take out all verbiage for "text_weight" so it's just the apostrophes.Qphoria wrote:FIND (1.4.1 or newer):REPLACE WITH:Code: Select all
'title' => $result['name'] . ' (' . $this->language->get('text_weight') . ' ' . $this->weight->format($weight, $this->config->get('config_weight_class')) . ')',
Code: Select all
'title' => $result['name'],
That should do it. And if you still see the weight in the Shopping Cart Header, that can be turned off like benisv noted in this thread.
Who is online
Users browsing this forum: No registered users and 4 guests