Post by speedingorange » Tue Aug 16, 2016 5:23 pm

So I am wondering how hard it would be or if someone can fill in the gaps as to how to achieve the end result.

I am running opencart 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>
With Something along the lines of:

Code: Select all

<?php $fromprice = if ($special) { echo "From: $special;"; } else { echo "From: $tax;"} ?>
to back it up,

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?
Please forgive my rather vague understanding of how these things work, any assistance in putting together the correct code would be appreciated.


Thinking further on this would I be better altering the Product.php controller at the following line;
from this;

Code: Select all

to something like this;

Code: Select all

$this->document->setTitle($product_info['meta_title'] . 'From ' . $this->currency->format($product_info['price']));
But again I would now need to know how to only show lowest discount / special (whichever is lower) and ex tax.?

Active Member


Tue Feb 23, 2010 7:33 pm
Who is online

Users browsing this forum: No registered users and 4 guests