Hi Andy,
Your questions have exceed our "free support" limit, and i am sure you are aware of that.
But here is your TIP:
To add it to TOP-TAB section,
The <li>..</li> must be something like this:
<li><a href="javascript:void(0)" rel="#points"><span>Points</span></li>
In this line, the rel="" attribute represents the designated DIV's ID attribute, got me?
So in order to point out this button to appropriate content, DIV element must be this:
<div id="points" class="FlexibleProductTABDetails">
... the content goes here...
</div>
So as i am seeing in your codes, you did it correctly. What went wrong?
The TAB doesn't work? Or the doesn't show correct values inside the content?
You should also better be using:
$this->product->prices['salesPrice']
or
$this->product->prices['priceWithoutTax']
Because BasePrice doesn't include the discount. (in case you might apply some discount to your products)
About this code:
echo round($this->product->prices['basePrice']);
You can use round() function of PHP to round the number to closest integer number (4.51 becomes 5, and 4.49 becomes 4)
BUT this line in your code:
if (!empty($this->product->points)) {
Doesn't make any sense to me, what is
product->points and where did it come from? Are you using a 3rd party extension? Virtuemart doesn't have a "points" variable.
This calling will return you "EMPTY" value, since your IF function is
!empty
And this returns an empty result, this means, the content will never be printed.
Replace it with this (don't use IF at all):
<div id="points" class="FlexibleProductTABDetails" style="display:none;">
<?php
// Converts cost of product to display a number without decimals
// & rounded down - equal to number of loyalty point s user will be awarded
// This then shows as number for users information
echo round($this->product->prices['salesPrice']);
?>
Loyalty Points with this product
<div class="clear"></div>
</div>
Regards.
Forum Support.