[Skip to main content](#vessel-content)

#   How to show product list with additional condition

##

- **[twscott](/forum/user/43011-twscott "View twscott's Profile")**
- [![twscott's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/beer.png)](/forum/user/43011-twscott "View twscott's Profile") Topic Author
- [ Offline](/forum/user/43011-twscott)

Less More

- Posts: 252
- Thank you received: 1
-
-
-
-

10 years 3 months ago [\#247077](#247077) by [twscott](/forum/user/43011-twscott "View twscott's Profile")  *[How to show product list with additional condition](/forum/26-product-category-display/885898-how-to-show-product-list-with-additional-condition#247077 "-- HikaShop version -- : HikaShop Business 2.6.3 -- Joomla version -- : 3.5  Hi, I have created a custom filed, how can I add condition of this vendor input field to content module to show the specific product list?  Best Regards Scott")* was created by *[twscott](/forum/user/43011-twscott "View twscott's Profile")*

-- HikaShop version -- : HikaShop Business 2.6.3
-- Joomla version -- : 3.5

Hi,
I have created a custom filed, how can I add condition of this vendor input field to content module to show the specific product list?

Best Regards
Scott

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODU4OTgtaG93LXRvLXNob3ctcHJvZHVjdC1saXN0LXdpdGgtYWRkaXRpb25hbC1jb25kaXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86364
- Thank you received: 14297
-
-

10 years 3 months ago [\#247079](#247079) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to show product list with additional condition](/forum/26-product-category-display/885898-how-to-show-product-list-with-additional-condition#247079 "-- HikaShop version -- : HikaShop Business 2.6.3 -- Joomla version -- : 3.5  Hi, I have created a custom filed, how can I add condition of this vendor input field to content module to show the specific product list?  Best Regards Scott")*

Hi,

I'm not sure I understand you ? You want to only display the products of a specific vendor in a module ?
Or the products of the vendor whenj you display the module on the vendor page ?
Or something else ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODU4OTgtaG93LXRvLXNob3ctcHJvZHVjdC1saXN0LXdpdGgtYWRkaXRpb25hbC1jb25kaXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[twscott](/forum/user/43011-twscott "View twscott's Profile")**
- [![twscott's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/beer.png)](/forum/user/43011-twscott "View twscott's Profile") Topic Author
- [ Offline](/forum/user/43011-twscott)

Less More

- Posts: 252
- Thank you received: 1
-
-
-
-

10 years 3 months ago [\#247158](#247158) by [twscott](/forum/user/43011-twscott "View twscott's Profile")  Replied by *[twscott](/forum/user/43011-twscott "View twscott's Profile")* on topic *[How to show product list with additional condition](/forum/26-product-category-display/885898-how-to-show-product-list-with-additional-condition#247158 "-- HikaShop version -- : HikaShop Business 2.6.3 -- Joomla version -- : 3.5  Hi, I have created a custom filed, how can I add condition of this vendor input field to content module to show the specific product list?  Best Regards Scott")*

Hi Nicolas,
I have two stores share the same product data, some products just show on one of the stores.
So I created one custom field to separate them. Is there a way that I can show the products list with the custom field condition?

Best Regards

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODU4OTgtaG93LXRvLXNob3ctcHJvZHVjdC1saXN0LXdpdGgtYWRkaXRpb25hbC1jb25kaXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86364
- Thank you received: 14297
-
-

10 years 3 months ago [\#247165](#247165) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to show product list with additional condition](/forum/26-product-category-display/885898-how-to-show-product-list-with-additional-condition#247165 "-- HikaShop version -- : HikaShop Business 2.6.3 -- Joomla version -- : 3.5  Hi, I have created a custom filed, how can I add condition of this vendor input field to content module to show the specific product list?  Best Regards Scott")*

Hi,

So you want to add a condition in the products listing to restrict the products on the listing based on a custom product field value.

When you edit a menu item via the Joomla menu manager or a module via the Joomla modules manager, you can see that there are no options to restrict the listing of products based on a custom field value.
What you can do though is to create a filter on that custom field via the menu System&gt;Filters.
Then, turn on the "redirect POST mode" setting of the HikaShop configuration.
Then, on your products listing, you should see that filter at the top if you have the "filters" display setting turned on on your menu item settings page.
And when you use the filter, you'll see that the URL changes. So, you can actually use the URL for the value of the custom field you want as a new "external URL" menu item to get a new menu item which directly displays a prefiltered products listing.

The following user(s) said Thank You: [::REZA::](/forum/user/40414-reza "View ::REZA::'s Profile"), [twscott](/forum/user/43011-twscott "View twscott's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODU4OTgtaG93LXRvLXNob3ctcHJvZHVjdC1saXN0LXdpdGgtYWRkaXRpb25hbC1jb25kaXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[::REZA::](/forum/user/40414-reza "View ::REZA::'s Profile")**
- [![::REZA::'s Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/40414-reza "View ::REZA::'s Profile")
- [ Offline](/forum/user/40414-reza)

Less More

- Posts: 6
- Thank you received: 0
-

10 years 2 months ago [\#249058](#249058) by [::REZA::](/forum/user/40414-reza "View ::REZA::'s Profile")  Replied by *[::REZA::](/forum/user/40414-reza "View ::REZA::'s Profile")* on topic *[How to show product list with additional condition](/forum/26-product-category-display/885898-how-to-show-product-list-with-additional-condition#249058 "-- HikaShop version -- : HikaShop Business 2.6.3 -- Joomla version -- : 3.5  Hi, I have created a custom filed, how can I add condition of this vendor input field to content module to show the specific product list?  Best Regards Scott")*

Hi
I need to do the exact same thing twscott is trying to do. I have created a custom field "Free Shipping" and I want to show a module containing the products with this custom field set to "1" in the first page on my website, so I can't use the way you suggested in the last post.
Also I don't want to make a category "Free Shipping" and assign products to it and show the products with selecting category in content module, because probably in future there will be a lot more custom fields and it's not reasonable to make a category for each custom field.
So I tried to make a little changes to hikashop content module and make a new module out of it to involve custom fields to restrict products. I tried to change add my custom field name to $params in mod_hikashop.php, but didn't succeed. ![:(](/media/kunena/emoticons/22.png ":(")

So what should I do to make it happen?

As I think this is kind of a important feature, maybe you want to place it in your todo list ![;)](/media/kunena/emoticons/24.png ";)")

Thanks in advance for your help

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODU4OTgtaG93LXRvLXNob3ctcHJvZHVjdC1saXN0LXdpdGgtYWRkaXRpb25hbC1jb25kaXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86364
- Thank you received: 14297
-
-

10 years 2 months ago -  10 years 2 months ago [\#249062](#249062) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to show product list with additional condition](/forum/26-product-category-display/885898-how-to-show-product-list-with-additional-condition#249062 "-- HikaShop version -- : HikaShop Business 2.6.3 -- Joomla version -- : 3.5  Hi, I have created a custom filed, how can I add condition of this vendor input field to content module to show the specific product list?  Best Regards Scott")*

Hi,

If you know programming then it's not difficult.
You need to create a small joomla plugin of the group "hikashop", and implement the "onBeforeProductListingLoad" trigger:
[ www.hikashop.com/support/documentation/6...reProductListingLoad](https://www.hikashop.com/support/documentation/62-hikashop-developer-documentation.html#onBeforeProductListingLoad)
That way you can add the condition on the query loading the products on listings of HikaShop really easily like that: Code:

$filters[] = 'b.custom_field_column_name = 1';

Then, if you want to do that filter on one specific module, set a global variable in your module override like: Code:

$_SESSION['my_module']=1;

before the call to the hikashop_getLayout function and then: Code:

$_SESSION['my_module']=0;

after it, so that you can add a check like that at the beginning of the onBeforeProductListingLoad function of your plugin: Code:

if(!@$_SESSION['my_module']) return;

Alternatively, if you're not a developer, you can create a "free shipping" category and create some mass actions to add/remove the category automatically on the products when the custom field is changed:
[ www.hikashop.com/support/documentation/167-massaction-form.html](https://www.hikashop.com/support/documentation/167-massaction-form.html)
So it's still possible to do it quite easily.
You can have thousands of categories in HikaShop, that's not really a problem. And you can have these custom field categories under an unpublished category so that it doesn't display on your frontend categories listings. So I don't see a problem with doing it like that using categories.

Last edit: 10 years 2 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

The following user(s) said Thank You: [::REZA::](/forum/user/40414-reza "View ::REZA::'s Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODU4OTgtaG93LXRvLXNob3ctcHJvZHVjdC1saXN0LXdpdGgtYWRkaXRpb25hbC1jb25kaXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[::REZA::](/forum/user/40414-reza "View ::REZA::'s Profile")**
- [![::REZA::'s Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/40414-reza "View ::REZA::'s Profile")
- [ Offline](/forum/user/40414-reza)

Less More

- Posts: 6
- Thank you received: 0
-

10 years 2 months ago [\#249098](#249098) by [::REZA::](/forum/user/40414-reza "View ::REZA::'s Profile")  Replied by *[::REZA::](/forum/user/40414-reza "View ::REZA::'s Profile")* on topic *[How to show product list with additional condition](/forum/26-product-category-display/885898-how-to-show-product-list-with-additional-condition#249098 "-- HikaShop version -- : HikaShop Business 2.6.3 -- Joomla version -- : 3.5  Hi, I have created a custom filed, how can I add condition of this vendor input field to content module to show the specific product list?  Best Regards Scott")*

Hi

Thank you!
I did the session and plugin way you suggested. Now I can select every custom field I want and the plugin do the rest for me and it's perfect.
The reason I do not want to make a category for each custom field is, I want to make it as simple as possible for my client to just edit products.
This way maybe there's no need to add a new feature to mod_hikashop :whistle: :whistle:

Anyway, great support as always.
Thanks again.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODU4OTgtaG93LXRvLXNob3ctcHJvZHVjdC1saXN0LXdpdGgtYWRkaXRpb25hbC1jb25kaXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.061 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
