Hi,
Well, if you know PHP and read the original view file you should be able to figure out a way, but there is not a one size fits all solution. It's a concept.
For example, suppose I want to change the text "foo" to "bar" in the name of all the products when looking at the product page.
I would have to do an override of product / show_default where the product_name is displayed for the product details page.
In here, I would first require the whole code by just this :
<?php
require(JPATH_ROOT.'components/com_hikashop/views/product/tmpl/show_default.php');
Then, I could either replace the text in $this->element->product_name before the require, like this:
<?php
$this->element->product_name = str_replace('foo', 'bar', $this->element->product_name);
require(JPATH_ROOT.'components/com_hikashop/views/product/tmpl/show_default.php');
Or I could replace the text from the resulting HTML:
<?php
ob_start(); // start a buffer
require(JPATH_ROOT.'components/com_hikashop/views/product/tmpl/show_default.php');
$html = ob_get_clean(); // destroy the buffer and get its content
$html = preg_replace('#(<span id="hikashop_product_name_main" class="hikashop_product_name_main" itemprop="name">.*)foo(.*</span>)#U', '$1bar$2', $html); // do the replacing with a regex
echo $html; // display the modified HTML
Both will achieve the same thing, so since the first option is much simpler than the second, I would go with the first one. But in some cases, you can replace the variables before they are processed by the original view file and thus you need to process the HTML, usually with a regex, like the second solution above.