You are here:  » Show relevant search Result & Normalise Custom Field


Show relevant search Result & Normalise Custom Field

Submitted by keshavkshirsagar on Mon, 2015-11-23 06:35 in

Hello Sir

1 How to Show relevant search Result if Product no longer Available ?
Search Result keywords will be product name

2 Can we add Product Filter For Custom Field (Normalise Custom Field)?
inserted record should be alphanumeric except space

Submitted by support on Mon, 2015-11-23 10:22

Hi,

Re 1;

Product pages for products no longer found should already be showing similar products by way of Related Products which are always displayed if a product is no longer available even if Related Products is not enabled ($config_useRelated in config.php) - check that your products.php contains this line within the output block:

  if (isset($related)) require("html/related.php");

If that's in place but related products are not being shown let me know and I'll check it out further for you - there are alternative options such as issuing a redirect to search.php with the old product name as the search value...

Re 2;
Check out this thread for step-by-step instructions for adding a custom field filter. Simply replace "colour" within the instructions with your custom field name...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by keshavkshirsagar on Mon, 2015-11-23 13:49

Hello David

How to import Product Custom field by Alphanumeric Before import in database from csv
same as Product Normalise name

Submitted by support on Mon, 2015-11-23 14:50

Hi,

Any custom fields that you'd like to normalise, edit includes/admin.php and look for the following comment around line 487:

  /* create product record */

This is the point at which $importRecord has been prepared, so if you insert immediately _before_ this point any normalisations as required, for example, for the custom field "colour":

  $importRecord["colour"] = tapestry_normalise($importRecord["colour"]);

Cheers,
David.
--
PriceTapestry.com

Submitted by keshavkshirsagar on Tue, 2015-11-24 06:51

Thanks David