Maak altijd een kopie van je bestanden voor dat je deze wijzigt!
Open het taalbestand van het produkt.
catalog/language/dutch/product/product.php
Voeg het volgende toe:
Code: Select all
// voor soort verzending
$_['text_shipping'] = 'Verzending:';
$_['text_parcel'] = '<img src="catalog/view/theme/default/image/eigen/doos1.png" style="vertical-align:middle" /> TNT pakketpost !!';
$_['text_letter'] = '<img src="catalog/view/theme/default/image/eigen/enveloppe1.png" style="vertical-align:middle" /> TNT brievenbus';
// voor gratis verzending
$_['text_free_shipping'] = 'Gratis Verzending:';
$_['text_free'] = '<img src="catalog/view/theme/default/image/eigen/train1.png" style="vertical-align:middle" /> Gratis Verzending !!';
De png files kan je vervangen door die van je zelf. Als je een template hebt gekocht of niet de default gebruikt vervang je de default door je eigen theme naam. Bewaar dit bestand
Dit doe je ook bij het engelstalige bestand.
Open vervolgens je template file:
catalog/view/theme/default/template/product/product.tpl
Vind:
Code: Select all
<tr>
<td><b><?php echo $text_availability; ?></b></td>
<td><?php echo $stock; ?></td>
</tr>
Plak
hieronder de volgende code:
Code: Select all
<tr>
<td><b><?php echo $text_shipping; ?></b></td>
<td valign="middle"><?php echo '<font color="red">' . $box . '</font>'; ?></td>
</tr>
<?php if ($free_shipping) { ?>
<tr>
<td> </td>
<td valign="middle"><?php echo '<font color="blue">' . $box2 . '</font>'; ?></td>
</tr>
<?php } ?>
Bewaar je template
Open het bestand:
catalog/controller/product/product.php
Vind:
Code: Select all
$this->data['text_minimum'] = sprintf($this->language->get('text_minimum'), $product_info['minimum']);
Plak
hieronder de volgende code:
Code: Select all
// added for shipping cost
$this->data['text_shipping'] = $this->language->get('text_shipping');
Vind:
Code: Select all
if ($product_info['quantity'] <= 0) {
Plak hier
boven de volgende code:
Code: Select all
if($product_info['length_class_id'] == 1) {
if($product_info['width'] != 0) {
$product_info['width'] = intval($product_info['width'] * 10);
}
if($product_info['height'] != 0) {
$product_info['height'] = intval($product_info['height'] * 10);
}
if($product_info['length'] != 0) {
$product_info['length'] = intval($product_info['length'] * 10);
}
}
if($product_info['width'] == 0) { $product_info['width'] = 266;}
if($product_info['height'] == 0) { $product_info['height'] = 33;}
if($product_info['length'] == 0) { $product_info['length'] = 381;}
$product_info['box'] = 'blabla';
if ($product_info['height'] <= 32 && $product_info['width'] <= 260 && $product_info['length'] <= 380) {
$product_info['box'] = $this->language->get('text_letter');
} else {
$product_info['box'] = $this->language->get('text_parcel');
}
$product_info['free_shipping'] = $this->config->get('free_total');
$product_info['box2'] = '';
if ($this->config->get('free_total') < $product_info['price']) {
$product_info['box2'] = $this->language->get('text_free');
$product_info['free_shipping'] = 1;
} else {
$product_info['free_shipping'] = FALSE;
}
Vind:
Code: Select all
$this->data['model'] = $product_info['model'];
Plak hier
boven de volgende code:
Code: Select all
$this->data['free_shipping'] = $product_info['free_shipping'];
$this->data['box'] = $product_info['box'];
$this->data['box2'] = $product_info['box2'];
Het resultaat is ongeveer wat hier ziet.
