Hi,
Thanks for your compliments about PureMArt, i am glad you love it.
Unfortunately your 1st it not possible. You can't believe how many brilliant ideas that we have been trying to bring to Virtuemart (including this one) but it is not practically possible, because this filtering can be only possible through Virtuemart Backend. There can be a "checkbox" in the backend, something like: "show special offer: YES/NO"
BUT, the problem is; template overriding doesn't work in Virtuemart backend. Some core files of Virtuemart need to be modified (which we don't recommend and never ask from people, unless it ia very very very tiny thing..) Modifying Virtuemart backend core file is not secured and eventually those modified files will be retrieved back to factory settings once the Virtuemart is updated.
We are trying our best to implement things to Virtuemart without touching how the Virtuemart and its backend works. But as you might guess, there is a limit. We can't go beyond that limit. Filtering the "special offer boxes" for certain categories or certain products is just one of them. And there is no practically solution i can offer you now (if there was, we would do it that way).
About the other question, you will need some coding changes (within our VM Template - PureMArt).
Open this PHP file:
ROOt/templates/<yourjoomlatemplatefolder>/html/com_virtuemart/productdetails/default.php
(Default.php or flexv2.php... depends on which ever product layout you are using currently).
Then find this line:
<?php
$SpecialText = $params->get('productdetails_special');
if (!empty($SpecialText)) { ?>
<div class="FlexibleProductDetailsSpecialNote"><?php echo $SpecialText; ?></div>
<div class="clear"></div>
<Br/>
<?php } ?>
Remove these lines from where they are and paste them to any where you want to show the "special offer" box.
If you are good at PHP, you can do this and it will be your solution for your 1st question (it is not practical but at least it will work) so it will be shown only in products that belongs to certain categories. Lets say, you want to show that special offer box only in 2 categories, first figure out those CATEGORY ID's (from Virtuemart Back-end), let's say their IDs are 10 and 11. If you re-modify the above PHP IF...END with this:
<?php
$SpecialText = $params->get('productdetails_special');
if (!empty($SpecialText) && ($this->product->virtuemart_category_id=10 || $this->product->virtuemart_category_id=11)) { ?>
<div class="FlexibleProductDetailsSpecialNote"><?php echo $SpecialText; ?></div>
<div class="clear"></div>
<Br/>
<?php } ?>
So the special offer box will appear only if;
- Special text field is not empty
- Product's category's ID number is either 10 or 11
You can also do that with filtering with including
$this->product->virtuemart_product_id but it will be a lot time consuming, since you need to define each product individually.
Regards.
Forum Support.