oc-shopaholic / oc-orders-shopaholic-plugin

🛒 Orders (cart) extension for Shopaholic plugin
https://octobercms.com/plugin/lovata-ordersshopaholic
GNU General Public License v3.0
27 stars 18 forks source link

Search for Shopaholic - search_synonym #107

Closed davidprovaznikj closed 4 years ago

davidprovaznikj commented 4 years ago

Hi, is there some possibility to show search_synonym on product page? Thank you.

kharanenka commented 4 years ago

Hi! You should extend Product model and add search_synonym to cache For example:

Product::extend(function ($obProduct) {
        /** @var Product $obProduct */
        $obProduct->addCachedField(['search_synonym']);
});
davidprovaznikj commented 4 years ago

Its working, Thank you!

Dne čt 11. 6. 2020 16:24 uživatel Andrey Kharanenka < notifications@github.com> napsal:

Hi! You should extend Product model and add search_synonym to cache For example:

Product::extend(function ($obProduct) { /* @var Product $obProduct / $obProduct->addCachedField(['search_synonym']); });

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/oc-shopaholic/oc-orders-shopaholic-plugin/issues/107#issuecomment-642692236, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALO32DIWWB5OY2KWBLUFCATRWDSJRANCNFSM4N3OTSCA .