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

#   google products plugin and product category

##

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

Less More

- Posts: 18
- Thank you received: 0
-
-

5 years 5 months ago [\#333373](#333373) by [kathrin20](/forum/user/61360-kathrin20 "View kathrin20's Profile")  *[google products plugin and product category](/forum/25-install-update/902749-google-products-plugin-and-product-category#333373 "-- HikaShop version -- : 4.4.2 -- Joomla version -- : 3.9.26 -- PHP version -- : 7.3 -- Browser(s) name and version -- : Chrome 91.0.4472.77  I am trying the google products plugin and it only displays one product. I see that the problem has to do with the categories. Because this product is also in the main category - under root.  All my other products are in categories that are under the main category. Lets say my products are not direct sub elements of the main category. Is this wrong? Should I include the main category in all the products?")* was created by *[kathrin20](/forum/user/61360-kathrin20 "View kathrin20's Profile")*

-- HikaShop version -- : 4.4.2
-- Joomla version -- : 3.9.26
-- PHP version -- : 7.3
-- Browser(s) name and version -- : Chrome 91.0.4472.77

I am trying the google products plugin and it only displays one product.
I see that the problem has to do with the categories. Because this product is also in the main category - under root.

All my other products are in categories that are under the main category. Lets say my products are not direct sub elements of the main category. Is this wrong? Should I include the main category in all the products?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkwMjc0OS1nb29nbGUtcHJvZHVjdHMtcGx1Z2luLWFuZC1wcm9kdWN0LWNhdGVnb3J5P3RtcGw9bWFya2Rvd24=) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86576
- Thank you received: 14320
-
-

5 years 5 months ago [\#333374](#333374) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[google products plugin and product category](/forum/25-install-update/902749-google-products-plugin-and-product-category#333374 "-- HikaShop version -- : 4.4.2 -- Joomla version -- : 3.9.26 -- PHP version -- : 7.3 -- Browser(s) name and version -- : Chrome 91.0.4472.77  I am trying the google products plugin and it only displays one product. I see that the problem has to do with the categories. Because this product is also in the main category - under root.  All my other products are in categories that are under the main category. Lets say my products are not direct sub elements of the main category. Is this wrong? Should I include the main category in all the products?")*

Hi,

The Google Products plugin automatically list all the products that are:
- with their "access level" set to "all"
- published
- with stock if the "in stock only" setting is activated in the plugin
- linked to at least one published category
If some of your products do not appear in the XML feed generated by the plugin, it means that at least one of the above is false for these products.

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

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

Less More

- Posts: 18
- Thank you received: 0
-
-

5 years 5 months ago -  5 years 5 months ago [\#333393](#333393) by [kathrin20](/forum/user/61360-kathrin20 "View kathrin20's Profile")  Replied by *[kathrin20](/forum/user/61360-kathrin20 "View kathrin20's Profile")* on topic *[google products plugin and product category](/forum/25-install-update/902749-google-products-plugin-and-product-category#333393 "-- HikaShop version -- : 4.4.2 -- Joomla version -- : 3.9.26 -- PHP version -- : 7.3 -- Browser(s) name and version -- : Chrome 91.0.4472.77  I am trying the google products plugin and it only displays one product. I see that the problem has to do with the categories. Because this product is also in the main category - under root.  All my other products are in categories that are under the main category. Lets say my products are not direct sub elements of the main category. Is this wrong? Should I include the main category in all the products?")*

ΟΚ now I see that the problem is that the products are not set to "all" because there is a group of users that are not supposed to see them.
Can I change the plugin so the products can be included, if the public can access them?
Or for all the products regardless of access

Last edit: 5 years 5 months ago by [kathrin20](/forum/user/61360-kathrin20 "View kathrin20's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkwMjc0OS1nb29nbGUtcHJvZHVjdHMtcGx1Z2luLWFuZC1wcm9kdWN0LWNhdGVnb3J5P3RtcGw9bWFya2Rvd24=) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86576
- Thank you received: 14320
-
-

5 years 5 months ago [\#333402](#333402) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[google products plugin and product category](/forum/25-install-update/902749-google-products-plugin-and-product-category#333402 "-- HikaShop version -- : 4.4.2 -- Joomla version -- : 3.9.26 -- PHP version -- : 7.3 -- Browser(s) name and version -- : Chrome 91.0.4472.77  I am trying the google products plugin and it only displays one product. I see that the problem has to do with the categories. Because this product is also in the main category - under root.  All my other products are in categories that are under the main category. Lets say my products are not direct sub elements of the main category. Is this wrong? Should I include the main category in all the products?")*

Hi,

You can change the line: Code:

$query = 'SELECT * FROM '.hikashop_table('product').' WHERE product_access=\'all\' AND product_published=1 AND product_type=\'main\'';

to: Code:

$query = 'SELECT * FROM '.hikashop_table('product').' WHERE product_published=1 AND product_type=\'main\'';

in the file plugins/hikashop/google_products/google_products.php and it will list the products regardless of the "access level" of the product.
Note however that it means that Google will reference these products. And thus users that might not be able to see the products on the website will get them on their search results on Google.
Note also that you'll loose the change when you update HikaShop in the future, so you'll have to reapply it.

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

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

Less More

- Posts: 18
- Thank you received: 0
-
-

5 years 5 months ago -  5 years 5 months ago [\#333494](#333494) by [kathrin20](/forum/user/61360-kathrin20 "View kathrin20's Profile")  Replied by *[kathrin20](/forum/user/61360-kathrin20 "View kathrin20's Profile")* on topic *[google products plugin and product category](/forum/25-install-update/902749-google-products-plugin-and-product-category#333494 "-- HikaShop version -- : 4.4.2 -- Joomla version -- : 3.9.26 -- PHP version -- : 7.3 -- Browser(s) name and version -- : Chrome 91.0.4472.77  I am trying the google products plugin and it only displays one product. I see that the problem has to do with the categories. Because this product is also in the main category - under root.  All my other products are in categories that are under the main category. Lets say my products are not direct sub elements of the main category. Is this wrong? Should I include the main category in all the products?")*

Ok thank you, it works.

Imagine a case where there is retail and wholesale and the wholesale user sees different prices than the normal user or the public. Then the store may want to "hide" some products from the wholesale users, because these products are not available in wholesale prices, so the store restricts the access. However, those products are available in retail, so they can be referenced by Google.
Does this make sense? (I am just describing a case where one would want the products in google even thought there are restrictions. Your solution works fine thank you very much, maybe in the future one could have a choice in the plugin, about this)

Also, is it easy to add another custom field to the xml apart from those that are available in the settings of the plugin?

Thank you in advance.

Last edit: 5 years 5 months ago by [kathrin20](/forum/user/61360-kathrin20 "View kathrin20's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkwMjc0OS1nb29nbGUtcHJvZHVjdHMtcGx1Z2luLWFuZC1wcm9kdWN0LWNhdGVnb3J5P3RtcGw9bWFya2Rvd24=) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86576
- Thank you received: 14320
-
-

5 years 5 months ago [\#333518](#333518) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[google products plugin and product category](/forum/25-install-update/902749-google-products-plugin-and-product-category#333518 "-- HikaShop version -- : 4.4.2 -- Joomla version -- : 3.9.26 -- PHP version -- : 7.3 -- Browser(s) name and version -- : Chrome 91.0.4472.77  I am trying the google products plugin and it only displays one product. I see that the problem has to do with the categories. Because this product is also in the main category - under root.  All my other products are in categories that are under the main category. Lets say my products are not direct sub elements of the main category. Is this wrong? Should I include the main category in all the products?")*

Hi,

1. It indeed makes sense to be able to list products that are restricted to the guest user group too.
We'll look at improving that in the future.

2. Regarding adding custom fields to the XML, that would require :
- some code modification. Not that difficult for a developer since it should just require a few lines of code to be added in the plugin
- that google's API supports the additional data you're adding in the XML. Otherwise, your custom field might either be ignored, or, even worst, prevent Google from parsing the XML file.

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

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

Less More

- Posts: 18
- Thank you received: 0
-
-

5 years 5 months ago [\#333652](#333652) by [kathrin20](/forum/user/61360-kathrin20 "View kathrin20's Profile")  Replied by *[kathrin20](/forum/user/61360-kathrin20 "View kathrin20's Profile")* on topic *[google products plugin and product category](/forum/25-install-update/902749-google-products-plugin-and-product-category#333652 "-- HikaShop version -- : 4.4.2 -- Joomla version -- : 3.9.26 -- PHP version -- : 7.3 -- Browser(s) name and version -- : Chrome 91.0.4472.77  I am trying the google products plugin and it only displays one product. I see that the problem has to do with the categories. Because this product is also in the main category - under root.  All my other products are in categories that are under the main category. Lets say my products are not direct sub elements of the main category. Is this wrong? Should I include the main category in all the products?")*

Thank you very much for your help

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkwMjc0OS1nb29nbGUtcHJvZHVjdHMtcGx1Z2luLWFuZC1wcm9kdWN0LWNhdGVnb3J5P3RtcGw9bWFya2Rvd24=) 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.056 seconds

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