I am running opencart 2.1.0.1 with a custom theme and we would like to add to the end of the title tag From £xx
So I understand the best way to do this would be VQmod and that we would need to check if the product has discounts or specials set, So I am thinking the code within the title would look something like this:
Code: Select all
<title><?php echo $title; ?> <?php echo $fromprice; ?></title>
Code: Select all
<?php $fromprice = if ($special) { echo "From: $special;"; } else { echo "From: $tax;"} ?>
The things I am not sure of is;
- *How to only run this on product pages
*How to get the lowest price of discounted prices that are available?
*How to pull $special; and $tax; as they are not in the header.php controller?
==============================EDIT================================
Thinking further on this would I be better altering the Product.php controller at the following line;
from this;
Code: Select all
$this->document->setTitle($product_info['meta_title']);
Code: Select all
$this->document->setTitle($product_info['meta_title'] . 'From ' . $this->currency->format($product_info['price']));