Jump to content

PS 1.4 Display Product Location on product page


Recommended Posts

Mats,

Thanks for the help. Here is the full code for that.

 

 

<p id="product_location" {if isset($groups) OR !$product->location}style="display: none;"{/if}><label for="product_location">{l s='Location :'} </label><span class="editable">{$product->location|escape:'htmlall':'UTF-8'}</span></p>

 

 

I don't know if the location # can be searchable, but i will check it and let you guy know.

 

Also, is there anyway, i can do search location # for backend on the search box.

Link to comment
Share on other sites

It looks like you need to edit the /* Product research */ section of admin/tabs/AdminSearch.php on line 116 (in PrestaShop v1.4.4). Try changing:

 

'name' => array('title' => $this->l('Name')),

 

to:

 

'name' => array('title' => $this->l('Name')),
'location' => array('title' => $this->l('Location')),

Link to comment
Share on other sites

Looks like I was looking in the wrong area. Try this instead. Override the searchByName function of classes/Product.php and change:

 

WHERE pl.`name` LIKE \'%'.pSQL($query).'%\' OR p.`reference` LIKE \'%'.pSQL($query).'%\' OR p.`supplier_reference` LIKE \'%'.pSQL($query).'%\'

 

to:

 

WHERE pl.`name` LIKE \'%'.pSQL($query).'%\' OR p.`reference` LIKE \'%'.pSQL($query).'%\' OR p.`supplier_reference` LIKE \'%'.pSQL($query).'%\' OR p.`location` LIKE \'%'.pSQL($query).'%\' 

Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...