It did not work on Opencart 2.0, how to fix it? thank you for your reply.Qphoria wrote:Code: Select all
<?php echo $this->currency->getCode(); ?>

Opencart Development & Consult:
All in One SEO Package: making your Opencart SEO friendly
Product Rich Snippets: Breadcrumb, Product & Product Reviews
Custom Titile H1 Tag: custom category title, h1, bottom description and product title
Optimize Site URL Architecture: unique url w/breadcrumb, seo friendly url architecture
In 2.x, there is a layer separation between view and library calls so you can no longer make direct function calls to the instantiated objects. Instead you must call the function from the controller and make it visible to the view in its own variable.xdomofab wrote:It did not work on Opencart 2.0, how to fix it? thank you for your reply.Qphoria wrote:Code: Select all
<?php echo $this->currency->getCode(); ?>
For 2.x
1. EDIT: catalog/controller/product/product.php
2. FIND:
Code: Select all
public function index() {
Code: Select all
$data['currency_code'] = $this->currency->getCode();
5. PASTE WHERE YOU WANT IT:
Code: Select all
<?php echo $currency_code; ?>
Who is online
Users browsing this forum: No registered users and 44 guests