I run {link saved} and will like the product name displayed as just brand and model or just the brand. Anyone done this before? Example of results: {link saved}
Sure - I assume that you have added `model` as a custom field - so in your html/searchresults.php look for where the product name is displayed using something like:
...is called a "ternary", and is basically a short-hand version of an if / else construct, so in this case, if $product["model"] is populated, it is appended, with a space, to the brand.
Hi!
Sure - I assume that you have added `model` as a custom field - so in your html/searchresults.php look for where the product name is displayed using something like:
<?php print $product["name"]; ?>
...and REPLACE with:
<?php print $product["brand"].($product["model"]?" ".$product["model"]:""); ?>
This part of the replacement:
($product["model"]?" ".$product["model"]:"")
...is called a "ternary", and is basically a short-hand version of an if / else construct, so in this case, if $product["model"] is populated, it is appended, with a space, to the brand.
Hope this helps!
Cheers,
David.
--
PriceTapestry.com