Post by jrr » Wed Feb 17, 2021 3:49 am

Jonathan was a big help to me with this question I had of adding Model to the search - he suggested adding:

Code: Select all

    ------------------------------------------------------------------------------
    IN:
    /catalog/controller/product/search.php

    REPLACE:
    'name'        => $result['name'],

    WITH:
    'name'        => $result['name'] . ' (' . $result['model'] . ')',
    ------------------------------------------------------------------------------
which worked great (after clearing the cache by clicking on Extensions/Modifications/Refresh (button upper right).
Image
However I still wanted a wee bit more - I wanted there to always be a new line, and I wanted the name of the field to be Part # so I modified the line to read:

Code: Select all

	'name'        => $result['name'] . ' <br>(Part #' . $result['model'] . ')',
The <br> is HTML for Start On A New Line, and putting Part # at that point produces a result like this:
Image

Then I replaced the similar original line ( 'name' => $result['name'],) with the above line in /catalog/controller/product/category.php - so now my products have their part number more visible to the customer which I hope helps them find the parts they need more easily.

So, thanks to Jonathan for steering me in the right direction!
Last edited by jrr on Wed Mar 17, 2021 3:49 pm, edited 1 time in total.

jrr
Active Member

Posts

Joined
Mon Nov 20, 2017 1:48 pm

Post by Johnathan » Wed Feb 17, 2021 11:45 pm

You're welcome ;D ;D

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am

Who is online

Users browsing this forum: Nordikota and 48 guests