Hi,
A. and C. You could use the same view file yes. This means that you would have to add the code once for each product.
OR, you could also change the code a bit like this:
<?php
if(!empty($this->element->AAA)) {
$class = hikashop_get('class.user');
$data = $class->get(hikashop_loadUser());
if(hikashop_isAllowed($this->element->AAA,$data->user_cms_id)){
echo "Product not available for your user group";
return;
}
}
?>
where AAA would be the column name of a custom field where you would write "YYY,ZZZ" for product XXX, etc. That way, it could handle as many products as you want with only one piece of code.
B. You could add that code on line 0 of the view file, right at the beginning.
D. Sure. You could change that line by:
JFactory::getApplication()->redirect(hikaserial::completeLink('subscription&task=listing&Itemid=XXX'));
where XXX would be the id of a menu item of HikaSerial.
Or directly enter the SEF URL of the page like so:
JFactory::getApplication()->redirect('MY SEF URL');
E. Before the redirect line, you could add:
JFactory::getApplication()->enqueueMessage('You have yet an active Subscription, Please, select the action Renewal that you want to process');
That would display the message after the redirect on the subscriptions listing page.