As example, ( see
http://www.revo.wangba.fr/custom-package-dvd-shop-2 ) if you have the following join:
$joined = array(
array(
'package' => 'dvd',
'class' => 'dvdCategories',
'packagePath' => '{core_path}components/dvd/model/',
'fields' => 'name , description',
'withFields' => 'name , description',
'joinCriteria' => 'dvdCategories.id = dvdProducts.category_id'
)
);
Then the fields of the joined table will be renamed as
class_fieldname
for the above example: `dvdCategories`.`description` AS `dvdCategories_description`
So you can use dvdCategories_description as field in your AdvSearch results
In this example, the template of result is:
<div class="advsea-result dvd">
<div class="imgDvd"><img title="[[+name]]" src="assets/images/dvd/[[+image]]_thmb.jpg" alt="[[+name]]" /></div>
<div class="titleDvd"><h3>[[+idx]]. [[+name]]</h3></div>
<div>[[+extracts]]</div>
<hr class="clear">
<div><span class="flash">Code: </span>[[+code]]</div>
<div><span class="flash">Category: </span>[[+dvdCategories_name]]</div>
<div><span class="flash">Category description: </span>[[+dvdCategories_description]]</div>
<div><span class="flash">Studio: </span>[[+studio]]</div>
<div><span class="flash">Price: </span>[[+price]] $</div>
<div><span class="flash">Year: </span>[[+production_year]]</div>
<div><span class="flash">Weight: </span>[[+weight]]</div>
<div><span class="flash">In stock: </span>[[+in_stock]]</div>
</div>
Note the usage of
dvdCategories_description field inside the result template.
I agree with you, the documentation needs some improvements.