Hi kaspervdg
Do you click the back to category link in detailed page of product ? of course, it will link to VM category page. It's default feature of Virtuemart.
If you want to click that button and it redirects back to previous page, you can try this way:
Go to file: templates/ja_brickstore/html/com_virtuemart/productdetails/default.php
At approx line 111, comment this line of code:
<a href="<?php echo $catURL ?>" class="product-details" title="<?php echo $categoryName ?>"><?php echo vmText::sprintf('COM_VIRTUEMART_CATEGORY_BACK_TO',$categoryName) ?></a>
and add this code:
<input type="button" value="Back" onclick="goBack()" />
it will look like this:
<div class="back-to-category">
<!-- <a href="<?php echo $catURL ?>" class="product-details" title="<?php echo $categoryName ?>"><?php echo vmText::sprintf('COM_VIRTUEMART_CATEGORY_BACK_TO',$categoryName) ?></a> -->
<input type="button" value="Back" onclick="goBack()" />
</div>
Then go to Backend >> Templates >> JA Brickstore >> Custom code tab and add this JS code:
<script>
function goBack()
{
window.history.back()
}
</script>
Then clear all caches.