Děkuji za správné navedení.
dělá to následující rozšíření:
Code: Select all
<modification>
<id>product_currency</id>
<version>3.0</version>
<vqmver>1.0</vqmver>
<author>greyhoundsinneed.co.uk</author>
<file name="catalog/controller/product/product.php">
<operation>
<search position="after" ><![CDATA[$this->data['points'] = $product_info['points'];]]></search>
<add><![CDATA[ $this->data['clean_price'] = $product_info['price'];
$this->data['clean_special'] = $product_info['special'];]]></add>
</operation>
</file>
<file name="catalog/view/theme/*/template/product/product.tpl">
<operation>
<search position="after" index='1'><![CDATA[<?php echo $price; ?>]]></search>
<add><![CDATA[ <?php
$this->language->load('product/product_currency');
$this->load->model('localisation/currency');
$currencies = $this->model_localisation_currency->getCurrencies();
$this->data['currencies'] = array();
if (!empty($currencies)) {
foreach ($currencies as $currency) {
if ($currency['code'] == $this->session->data['currency']) {
continue ;
}
echo str_replace(array('{title}', '{price}'), array($currency['title'], $this->currency->format($this->data['clean_price'], $currency['code']),$currency['code']), $this->language->get('text_product_currency'));
}
}
?>]]></add>
</operation>
<operation>
<search position="after" index='1'><![CDATA[<?php echo $special; ?>]]></search>
<add><![CDATA[ <?php
$this->language->load('product/product_currency');
$this->load->model('localisation/currency');
$currencies = $this->model_localisation_currency->getCurrencies();
$this->data['currencies'] = array();
if (!empty($currencies)) {
foreach ($currencies as $currency) {
if ($currency['code'] == $this->session->data['currency']) {
continue ;
}
echo str_replace(array('{title}', '{price}'), array($currency['title'], $this->currency->format($this->data['clean_special'], $currency['code']),$currency['code']), $this->language->get('text_product_currency'));
}
}
?>]]></add>
</operation>
</file>
</modification>
a řádek 27 je potřeba opravit následovně
Code: Select all
echo str_replace(array('{title}', '{price}'), array($currency['title'], $this->currency->format(($this->data['clean_price']*.21)+$this->data['clean_price'], $currency['code']),$currency['code']), $this->language->get('text_product_currency'));
poddobně i pro speciální cenu