You are here:  » MOD: Allow featured items to be added by EAN


MOD: Allow featured items to be added by EAN

Submitted by Kees on Tue, 2018-08-21 08:31 in

I'm using the EAN mod and I was running into titles of items changing once in a while so I made the Featured Items list accept EAN codes as well.

Change the following part of row 23 of featuredSection.php:

WHERE normalised_name IN (".$sqlIn.") GROUP BY normalised_name

Into this:

WHERE normalised_name IN (".$sqlIn.") OR EAN IN (".$sqlIn.") GROUP BY normalised_name

And now it will accept EAN codes as well as titles.

Submitted by support on Tue, 2018-08-21 10:04

Hi Kees,

Users of Automatic Product Mapping by Unique ID could use the configured unique ID field e.g.

WHERE normalised_name IN (".$sqlIn.") OR `".$config_uidField."` IN (".$sqlIn.") GROUP BY normalised_name

(using back-ticks around field names in SQL avoids any conflict with SQL reserved words...)

Cheers,
David.
--
PriceTapestry.com

Submitted by Kees on Tue, 2018-08-21 10:13

Ah yes David, if they have a different uidField that would be the sollution.

Thanks for clearing that up!