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
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
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
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 );
Users browsing this forum: No registered users and 15 guests