To create a support ticket, start a search

Modifying SC Quick Search tool

Prerequisite

Up to date Store Commander version with a Solo, MulitStore or Expert plan

Target

For this shop's specific needs, a new field called "REF_INT' (internal reference) has been introduced to product pages in PrestaShop ps_product table, in order to link with a remote application (for example ERP, database, external module, SaaS application,..).

We will be adding this field "REF_INT" to the options of Store Commander search tool.

We'll then be able to:

  • quickly find the product using this REF_INT
  • access the product in Store Commander interface, keeping the work environment (opened panels)
  • quickly modify the product with Store Commander

Setup of the field in the Quick Search
  • Navigate to /modules/storecommander/xxx_hash_xxx/SC_TOOLS and create : lib/cat/quicksearch

  • Copy files existing in /modules/storecommander/xxx_hash_xxx/SC/lib/cat/quicksearch/ in your new folder SC_TOOLS/lib/cat/quicksearch
Notes

As soon as these files are created, SC will use this directory /SC_TOOLS/lib/cat/quicksearch instead of the directory quicksearch of /SC/lib/cat/quicksearch/.
The following SC update will modify files existing in /SC/lib/cat/quicksearch/ only.
Modifications integrated to SC updates are listed in the updates article.
If you wish to apply a modification made to the Quick Search within an update, you will need to adapt your code in SC_TOOLS/lib/cat/quicksearch.

Then, follow the steps of this example: for the field "ref_int" present in ps_product table:

  • Look for the word "reference" (do not use "supplier_reference") in files located in SC_TOOLS/lib/cat/quicksearch
  • For each instance found, duplicate the line
  • For each duplicated line, rename "reference" by"ref_int"
  • Refresh Store Commander interface and you new field will be instantly available in the Quick Search options