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

#   Inserting Products into Article Content

##

- **[icomex](/forum/user/4967-icomex "View icomex's Profile")**
- [![icomex's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4967.png)](/forum/user/4967-icomex "View icomex's Profile") Topic Author
- [ Offline](/forum/user/4967-icomex)

Less More

- Posts: 149
- Thank you received: 6
-
-

4 years 11 months ago [\#337559](#337559) by [icomex](/forum/user/4967-icomex "View icomex's Profile")  *[Inserting Products into Article Content](/forum/26-product-category-display/903584-inserting-products-into-article-content#337559 "-- HikaShop version -- : 4.4.4 -- Joomla version -- : 4.0.4  I'm attempting to insert a Product entry into an article. (I will be customizing the Layout used to render it, once it's working for me)  The insert tools in the editor seem to be working, but only a little under half of the live products show up on the list of products to choose from. There seems to be no correlation with product categories and what is visible. I'll take a look at permission settings on the products, but I know some which are missing are fully available to all shoppers. If I can spot any pattern at all, I'll add more detail.  Is there some characteristic settings of a product needed to make it available to this tool?")* was created by *[icomex](/forum/user/4967-icomex "View icomex's Profile")*

-- HikaShop version -- : 4.4.4
-- Joomla version -- : 4.0.4

I'm attempting to insert a Product entry into an article. (I will be customizing the Layout used to render it, once it's working for me)

The insert tools in the editor seem to be working, but only a little under half of the live products show up on the list of products to choose from. There seems to be no correlation with product categories and what is visible. I'll take a look at permission settings on the products, but I know some which are missing are fully available to all shoppers. If I can spot any pattern at all, I'll add more detail.

Is there some characteristic settings of a product needed to make it available to this tool?

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

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

Less More

- Posts: 4820
- Thank you received: 652
-
-

4 years 11 months ago -  4 years 11 months ago [\#337566](#337566) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[Inserting Products into Article Content](/forum/26-product-category-display/903584-inserting-products-into-article-content#337566 "-- HikaShop version -- : 4.4.4 -- Joomla version -- : 4.0.4  I'm attempting to insert a Product entry into an article. (I will be customizing the Layout used to render it, once it's working for me)  The insert tools in the editor seem to be working, but only a little under half of the live products show up on the list of products to choose from. There seems to be no correlation with product categories and what is visible. I'll take a look at permission settings on the products, but I know some which are missing are fully available to all shoppers. If I can spot any pattern at all, I'll add more detail.  Is there some characteristic settings of a product needed to make it available to this tool?")*

Hello,

Do you mean that you try to use the "**[ Product TAG insertion](https://www.hikashop.com/support/documentation/137-hikashop-product-insert.html#:~:text=Hikashop%20product%20insertion%3A%20This%20plugin,%29%20TAG%E2%80%9D%20to%20your%20article.)**" and don't be able to get all your available product in the Product TAG listing ?...
[ ![alt](https://www.hikashop.com/images/stories/pinsert-3.png) ](https://www.hikashop.com/images/stories/pinsert-3.png "alt")

If yes, can you provide these elements in order to go more far in your subject, and better understand the context :
- **User Backend** references (with maximum Acl)
- **Url link** to administrator access

**Note :** Use our [ **Contact us**](https://www.hikashop.com/support/contact-us.html) form to provide these elements and don't forget to add an **Url link to this topic**.
Regards

Last edit: 4 years 11 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

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

- **[icomex](/forum/user/4967-icomex "View icomex's Profile")**
- [![icomex's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4967.png)](/forum/user/4967-icomex "View icomex's Profile") Topic Author
- [ Offline](/forum/user/4967-icomex)

Less More

- Posts: 149
- Thank you received: 6
-
-

4 years 11 months ago -  4 years 11 months ago [\#337744](#337744) by [icomex](/forum/user/4967-icomex "View icomex's Profile")  Replied by *[icomex](/forum/user/4967-icomex "View icomex's Profile")* on topic *[Inserting Products into Article Content](/forum/26-product-category-display/903584-inserting-products-into-article-content#337744 "-- HikaShop version -- : 4.4.4 -- Joomla version -- : 4.0.4  I'm attempting to insert a Product entry into an article. (I will be customizing the Layout used to render it, once it's working for me)  The insert tools in the editor seem to be working, but only a little under half of the live products show up on the list of products to choose from. There seems to be no correlation with product categories and what is visible. I'll take a look at permission settings on the products, but I know some which are missing are fully available to all shoppers. If I can spot any pattern at all, I'll add more detail.  Is there some characteristic settings of a product needed to make it available to this tool?")*

I've found the issue and implemented a temporary workaround. Here are the details.

The problem isn't with the **TAG insertion** or **translation** plugins: It's with HikaShop's **xtd-editor plugin**. When it makes the query request to assemble the Products to build it's selection list, the query demands only Products available to ALL viewers. My guess is that the **TAG insertion plugin** isn't smart enough to filter out Products that the User isn't allowed to see, so the **xtd-editor plugin** doesn't allow that option.

I've modified Code:

$Where = ' WHERE product_type=\'main\' AND product_access=\'all\' AND product_published=1 ';

to become Code:

$Where = ' WHERE product_type=\'main\' AND product_published=1 ';

and I must deliberately choose Products based upon who can view that particular article.

I made a similar change to the **product insertion** tag.

I suspect that both plugins might be updated to be aware of which groups can view the article being edited, and modify the Product query appropriately, but I don't have enough time to build that right now. ( It would be necessary to make the insertion plugin smarter as well, since the editor plugin would only be able to respond when the insertion code is created, but unable to proofread previously inserted codes ).

**I realize this is probably a low priority, but I do request you include this on the list of possible future HikaShop updates.**
Thanks.

Last edit: 4 years 11 months ago by [icomex](/forum/user/4967-icomex "View icomex's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDM1ODQtaW5zZXJ0aW5nLXByb2R1Y3RzLWludG8tYXJ0aWNsZS1jb250ZW50P3RtcGw9bWFya2Rvd24=) 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: 86583
- Thank you received: 14324
-
-

4 years 11 months ago [\#337768](#337768) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Inserting Products into Article Content](/forum/26-product-category-display/903584-inserting-products-into-article-content#337768 "-- HikaShop version -- : 4.4.4 -- Joomla version -- : 4.0.4  I'm attempting to insert a Product entry into an article. (I will be customizing the Layout used to render it, once it's working for me)  The insert tools in the editor seem to be working, but only a little under half of the live products show up on the list of products to choose from. There seems to be no correlation with product categories and what is visible. I'll take a look at permission settings on the products, but I know some which are missing are fully available to all shoppers. If I can spot any pattern at all, I'll add more detail.  Is there some characteristic settings of a product needed to make it available to this tool?")*

Hi,

That would be impossible.
The editor can be display in many different places. It could be in a Joomla article, but it could be a K2 item, or something else. Anything else displaying a Joomla HTML editor. So we can't check the access levels of the item being edited as we don't know what item it could be.
And you might not want to allow someone to access all the products.
For, example, the editor can appear on the joomla article editor on the frontend for autors. And you might not want autors to see all the products of your shop, regardless of the access level of the article.

I suppose the best would be to allow access to all the products in the backend, and only access to the products based on the user groups of the current user on the frontend.

This can be done by changing this code to: Code:

$filters = array('product_type=\'main\'', 'product_published=1'); if(hikashop_isClient('site')) { hikashop_addACLFilters($filters, 'product_access'); } $Where = ' WHERE '. implode(' AND ', $filters);

Let us know if that works fine for you.
We can then add that to the next version of HikaShop.

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

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