Jump to content

[Solved] Adding EAN13 (or other field) to Search


migash

Recommended Posts

Using Prestashop 1.1

I tried to include the ean13 field to search results by adding this line in the AdminSearch.php file:
'.$product['ean13'].'

But nothing will display. Can anyone help explain why this value is not being passed like the others?

Link to comment
Share on other sites

Figured it out: In classes/Product.php

change:

SELECT p.`id_product`, pl.`name`, pl.`link_rewrite`, p.`weight`, p.`active`, p.`ecotax`, i.`id_image`, p.`reference`, il.`legend`, m.`name` AS manufacturer_name, tl.`name` AS tax_name



to:

SELECT p.`id_product`, pl.`name`, pl.`link_rewrite`, p.`weight`, p.`ean13`, p.`active`, p.`ecotax`, i.`id_image`, p.`reference`, il.`legend`, m.`name` AS manufacturer_name, tl.`name` AS tax_name



and add to the "WHERE" line:

OR p.`ean13` LIKE \'%'.pSQL($query).'%\'



Then just edit the AdminSearch.php file to display the ean13 field in the "fieldsDisplay" and the "Display products" areas.

Link to comment
Share on other sites

  • 1 year later...
  • 2 weeks later...
  • 9 months later...

Thanks Angora,
but i'm in 1.3.5 and all my themes dont work on 1.4.2.5.
I did the migration and i went back because of to much bugs.
So are you able to tell me if it works on 1.3.5?
Or is there any solution on that version?
thank you very much!!!!

Link to comment
Share on other sites

  • 1 year later...
  • 2 weeks later...
  • 2 weeks later...

Hi,

 

Can anyone please tell me how to display UPC/EAN13 for Product Customization ? i am using prestashop 1.4.8.2

 

Thanks.

 

on your product.tpl file use {$product->ean13} code to display EAN

Link to comment
Share on other sites

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...