Book Image

OpenCart Theme and Module Development

By : Rupak Nepali
Book Image

OpenCart Theme and Module Development

By: Rupak Nepali

Overview of this book

Table of Contents (13 chapters)
OpenCart Theme and Module Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Changing the style of currency


The currency, language, search, and a mini-shopping cart in the header are invoked as modules in the header. We are going to change the style used to show the currency. The default style of the currency is shown in a dropdown, and we are changing it to show up in a row, like this:

Go to catalog/view/theme/packttheme/template/common and open currency.tpl. Always remember to create a copy in the new theme folder to make the changes; never make the changes in the default folder. We should not make changes in the default folder because while updating the version of the OpenCart, it will be overridden by the default files, and all the changes made will be removed.

Now open catalog/view/theme/packttheme/template/module/currency.tpl in your favourite text editor, remove all of the existing code, and type the following code. We will describe each line afterwards:

<?php if (count($currencies) > 1) { ?>
<form action="<?php echo $action; ?>" method="post...