edit catalog/controller/product/product.php
find
Code: Select all
$this->load->model('catalog/product');
add after
Code: Select all
if (($this->request->server['REQUEST_METHOD'] == 'POST') && isset($this->request->post['currency_code'])) {
$this->currency->set($this->request->post['currency_code']);
unset($this->session->data['shipping_methods']);
unset($this->session->data['shipping_method']);
$this->redirect($this->request->post['redirect']);
}
$this->load->model('localisation/currency');
$this->data['currencies'] = array();
$results = $this->model_localisation_currency->getCurrencies();
foreach ($results as $result) {
if ($result['status']) {
$this->data['currencies'][] = array(
'title' => $result['title'],
'code' => $result['code'],
'symbol_left' => $result['symbol_left'],
'symbol_right' => $result['symbol_right']
);
}
}
edit catalog/view/theme/default/template/product/product.tpl
find
add after
Code: Select all
<?php if (count($currencies) > 1) { ?>
<form action="" method="post" enctype="multipart/form-data">
<div id="currency">
<?php foreach ($currencies as $currency) { ?>
<?php if (isset($currency_code)&&$currency['code'] == $currency_code) { ?>
<?php if ($currency['symbol_left']) { ?>
<a title="<?php echo $currency['title']; ?>"><b><?php echo $currency['symbol_left']; ?></b></a>
<?php } else { ?>
<a title="<?php echo $currency['title']; ?>"><b><?php echo $currency['symbol_right']; ?></b></a>
<?php } ?>
<?php } else { ?>
<?php if ($currency['symbol_left']) { ?>
<a title="<?php echo $currency['title']; ?>" onclick="$('input[name=\'currency_code\']').attr('value', '<?php echo $currency['code']; ?>').submit(); $(this).parent().parent().submit();"><?php echo $currency['symbol_left']; ?></a>
<?php } else { ?>
<a title="<?php echo $currency['title']; ?>" onclick="$('input[name=\'currency_code\']').attr('value', '<?php echo $currency['code']; ?>').submit(); $(this).parent().parent().submit();"><?php echo $currency['symbol_right']; ?></a>
<?php } ?>
<?php } ?>
<?php } ?>
<input type="hidden" name="currency_code" value="" />
<input type="hidden" name="redirect" value="index.php?route=product/product&product_id=<?php echo $this->request->get['product_id']; ?>" />
</div>
</form>
<?php } ?>
edit catalog/view/theme/default/template/common/header.tpl
find & delete
Code: Select all
<?php if (count($currencies) > 1) { ?>
<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data">
<div id="currency"><?php echo $text_currency; ?><br />
<?php foreach ($currencies as $currency) { ?>
<?php if ($currency['code'] == $currency_code) { ?>
<?php if ($currency['symbol_left']) { ?>
<a title="<?php echo $currency['title']; ?>"><b><?php echo $currency['symbol_left']; ?></b></a>
<?php } else { ?>
<a title="<?php echo $currency['title']; ?>"><b><?php echo $currency['symbol_right']; ?></b></a>
<?php } ?>
<?php } else { ?>
<?php if ($currency['symbol_left']) { ?>
<a title="<?php echo $currency['title']; ?>" onclick="$('input[name=\'currency_code\']').attr('value', '<?php echo $currency['code']; ?>').submit(); $(this).parent().parent().submit();"><?php echo $currency['symbol_left']; ?></a>
<?php } else { ?>
<a title="<?php echo $currency['title']; ?>" onclick="$('input[name=\'currency_code\']').attr('value', '<?php echo $currency['code']; ?>').submit(); $(this).parent().parent().submit();"><?php echo $currency['symbol_right']; ?></a>
<?php } ?>
<?php } ?>
<?php } ?>
<input type="hidden" name="currency_code" value="" />
<input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
</div>
</form>
<?php } ?>
edit: catalog/view/theme/default/stylesheet/stylesheet.css
find and delete
Code: Select all
#currency {
width: 75px;
position: absolute;
top: 15px;
left: 425px;
color: #999;
line-height: 17px;
}
BACKUP Files first