Hi,
i wrote an instruction to include the weight and dimension settings on the product side.
You can see it in action on
http://waermeakkus.de
i wrote an instruction to include the weight and dimension settings on the product side.
You can see it in action on
http://waermeakkus.de
Nice.
I fixt the title for you
I fixt the title for you
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
You can change it in two different ways.tirol3 wrote:Hi. i am using 1.4.0.0 i want to display only weight how can i do it? can you help me ? thanks
1. Edit catalog/view/theme/default/template/product/product.tpl and delete this code
Code: Select all
<!--Measurement -->
<?php if ($measurement) { ?>
<tr>
<td><b><?php echo $text_measurement; ?></b></td>
<td><?php echo $measurement; ?></a></td>
</tr>
<?php } ?>
Code: Select all
//weight and measurement begin
$this->data['weight'] = "-";
$weight = substr($product_info['weight'], 0, strpos($product_info['weight'], "."));
$weight_text = $this->model_catalog_product->getWeightText($product_info['weight_class_id']);
if ($weight) {
$this->data['weight'] = $weight." ".$weight_text['unit'];
}
$this->data['measurement'] = "";
/*$length = substr($product_info['length'], 0, strpos($product_info['length'], "."));
$width = substr($product_info['width'], 0, strpos($product_info['width'], "."));
$height = substr($product_info['height'], 0, strpos($product_info['height'], "."));
$measurement_text = $this->model_catalog_product->getMeasurementText($product_info['measurement_class_id']);
if ($length && $width ){
$this->data['measurement'] = $length." X ".$width;
if ($height) {
$this->data['measurement'] .= " X ".$height;
}
$this->data['measurement'] .= " ".$measurement_text['unit'];
}*/
//weight and measurement end
I developed it for 1.3.4 but i will test it for 1.4.0 in the next days. I think that i can provide a version for 1.4.0 during the next week.tirol3 wrote:i downloaded Weight_and_Measurement_inProducts_InstallationInstruction.rar and i read in it. But it doesn't work 1.4.0.0
Here is the version for opencart 1.4.0
Edit: I added all original files from opencart 1.4.0 with only this changes.
Edit: I added all original files from opencart 1.4.0 with only this changes.
Attachments
Last edited by TigerMatze on Fri Jan 15, 2010 4:20 am, edited 2 times in total.
i use opencart v1.3.4 and i follow exactly your instruction in version 1.3.4 but error occured as follow:
Parse error: parse error in D:\xampp\htdocs\opencart\catalog\model\catalog\product.php on line 358
anybody can help what is the problem?
thanks
Parse error: parse error in D:\xampp\htdocs\opencart\catalog\model\catalog\product.php on line 358
anybody can help what is the problem?
thanks
It sounds like a problem with the explicit type converting.
You can remove the "(int)" in the database query. Therefore change the line into
If it doesn't help insert
after the line and post the output, please.
You can remove the "(int)" in the database query. Therefore change the line into
Code: Select all
$measurement_class_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "measurement_class WHERE measurement_class_id = '" . $measurement_id . "' AND language_id = '" . $this->language->getId() ."'");
Code: Select all
print_r( $measurement_class_query );
Who is online
Users browsing this forum: No registered users and 120 guests