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

#   Product plugin loaded by modules

##

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

Less More

- Posts: 99
- Thank you received: 2
-
-

11 years 10 months ago [\#183069](#183069) by [gulp](/forum/user/31237-gulp "View gulp's Profile")  *[Product plugin loaded by modules](/forum/26-product-category-display/873606-product-plugin-loaded-by-modules#183069 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6  Hello, I'm searching for a way to have a better behaviour for the hikashop product plugin. The problem is due to the core Joomla and the way the system parses content plugins being loaded by modules: if I create an article and insert a product tag by the plugin button it works fine while the system loads directly the article both for the article page and for a category page. If the article comes loaded by a module it comes with a different behaviour due to the fact that the module loads the article and the plugin get parsed at last, then if the module have to manage some content of the article cannot recognize it !  I don't know if I've good explained this issue, it's a bit twisted !! The best is to try to load in a module (like a slider or carousel) some different kind of articles (content articles, with or without the use of hikashop plugin) and see what it's going to happen.  I've also wrote a post in Joomla forum:   forum.joomla.org/viewtopic.php?f=727&amp;t=867802  At present I think that a way to solve is that the &quot;product-button&quot;, instead of insert a plugin code, writes directly the correct product content in the article, especially for the picture that is usually the main element of one of this content items. I know this will lead to some mistake if the product pictures changes ...  What do you think about this solution ? Do you think is there a better way to solve ?")* was created by *[gulp](/forum/user/31237-gulp "View gulp's Profile")*

-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.6

Hello,
I'm searching for a way to have a better behaviour for the hikashop product plugin.
The problem is due to the core Joomla and the way the system parses content plugins being loaded by modules:
if I create an article and insert a product tag by the plugin button it works fine while the system loads directly the article both for the article page and for a category page.
If the article comes loaded by a module it comes with a different behaviour due to the fact that the module loads the article and the plugin get parsed at last, then if the module have to manage some content of the article cannot recognize it !

I don't know if I've good explained this issue, it's a bit twisted !!
The best is to try to load in a module (like a slider or carousel) some different kind of articles (content articles, with or without the use of hikashop plugin) and see what it's going to happen.

I've also wrote a post in Joomla forum:
[ forum.joomla.org/viewtopic.php?f=727&amp;t=867802](http://forum.joomla.org/viewtopic.php?f=727&t=867802)

At present I think that a way to solve is that the "product-button", instead of insert a plugin code, writes directly the correct product content in the article, especially for the picture that is usually the main element of one of this content items.
I know this will lead to some mistake if the product pictures changes ...

What do you think about this solution ?
Do you think is there a better way to solve ?

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

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

Less More

- Posts: 99
- Thank you received: 2
-
-

11 years 10 months ago [\#183081](#183081) by [gulp](/forum/user/31237-gulp "View gulp's Profile")  Replied by *[gulp](/forum/user/31237-gulp "View gulp's Profile")* on topic *[Product plugin loaded by modules](/forum/26-product-category-display/873606-product-plugin-loaded-by-modules#183081 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6  Hello, I'm searching for a way to have a better behaviour for the hikashop product plugin. The problem is due to the core Joomla and the way the system parses content plugins being loaded by modules: if I create an article and insert a product tag by the plugin button it works fine while the system loads directly the article both for the article page and for a category page. If the article comes loaded by a module it comes with a different behaviour due to the fact that the module loads the article and the plugin get parsed at last, then if the module have to manage some content of the article cannot recognize it !  I don't know if I've good explained this issue, it's a bit twisted !! The best is to try to load in a module (like a slider or carousel) some different kind of articles (content articles, with or without the use of hikashop plugin) and see what it's going to happen.  I've also wrote a post in Joomla forum:   forum.joomla.org/viewtopic.php?f=727&amp;t=867802  At present I think that a way to solve is that the &quot;product-button&quot;, instead of insert a plugin code, writes directly the correct product content in the article, especially for the picture that is usually the main element of one of this content items. I know this will lead to some mistake if the product pictures changes ...  What do you think about this solution ? Do you think is there a better way to solve ?")*

Could you please suggest what to change in the plugin code to insert directly the html tags (e.g.: the image tag with correct source, the a tag with correct url) instead of the plugin code ?

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 10 months ago [\#183083](#183083) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Product plugin loaded by modules](/forum/26-product-category-display/873606-product-plugin-loaded-by-modules#183083 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6  Hello, I'm searching for a way to have a better behaviour for the hikashop product plugin. The problem is due to the core Joomla and the way the system parses content plugins being loaded by modules: if I create an article and insert a product tag by the plugin button it works fine while the system loads directly the article both for the article page and for a category page. If the article comes loaded by a module it comes with a different behaviour due to the fact that the module loads the article and the plugin get parsed at last, then if the module have to manage some content of the article cannot recognize it !  I don't know if I've good explained this issue, it's a bit twisted !! The best is to try to load in a module (like a slider or carousel) some different kind of articles (content articles, with or without the use of hikashop plugin) and see what it's going to happen.  I've also wrote a post in Joomla forum:   forum.joomla.org/viewtopic.php?f=727&amp;t=867802  At present I think that a way to solve is that the &quot;product-button&quot;, instead of insert a plugin code, writes directly the correct product content in the article, especially for the picture that is usually the main element of one of this content items. I know this will lead to some mistake if the product pictures changes ...  What do you think about this solution ? Do you think is there a better way to solve ?")*

Hi,

Which plugin exactly are you talking about ? The one which is adding tags in a Joomla article when pressing the "product" button under the wysiwyg area, right ?

So to add the content directly instead of a tag, you have to edit the plugin "plugins\editors-xtd\hikashopproduct\hikashopproduct.php" and in the function "productDisplay()" replace the content of the "document.getElementById('product_insert').value" by the desired HTML.

You will have to load the full product data, etc. So PHP knowledges are required.

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

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

Less More

- Posts: 99
- Thank you received: 2
-
-

11 years 10 months ago [\#183340](#183340) by [gulp](/forum/user/31237-gulp "View gulp's Profile")  Replied by *[gulp](/forum/user/31237-gulp "View gulp's Profile")* on topic *[Product plugin loaded by modules](/forum/26-product-category-display/873606-product-plugin-loaded-by-modules#183340 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6  Hello, I'm searching for a way to have a better behaviour for the hikashop product plugin. The problem is due to the core Joomla and the way the system parses content plugins being loaded by modules: if I create an article and insert a product tag by the plugin button it works fine while the system loads directly the article both for the article page and for a category page. If the article comes loaded by a module it comes with a different behaviour due to the fact that the module loads the article and the plugin get parsed at last, then if the module have to manage some content of the article cannot recognize it !  I don't know if I've good explained this issue, it's a bit twisted !! The best is to try to load in a module (like a slider or carousel) some different kind of articles (content articles, with or without the use of hikashop plugin) and see what it's going to happen.  I've also wrote a post in Joomla forum:   forum.joomla.org/viewtopic.php?f=727&amp;t=867802  At present I think that a way to solve is that the &quot;product-button&quot;, instead of insert a plugin code, writes directly the correct product content in the article, especially for the picture that is usually the main element of one of this content items. I know this will lead to some mistake if the product pictures changes ...  What do you think about this solution ? Do you think is there a better way to solve ?")*

Ok thank you, I'll do this way !

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

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

Less More

- Posts: 99
- Thank you received: 2
-
-

11 years 10 months ago [\#183539](#183539) by [gulp](/forum/user/31237-gulp "View gulp's Profile")  Replied by *[gulp](/forum/user/31237-gulp "View gulp's Profile")* on topic *[Product plugin loaded by modules](/forum/26-product-category-display/873606-product-plugin-loaded-by-modules#183539 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6  Hello, I'm searching for a way to have a better behaviour for the hikashop product plugin. The problem is due to the core Joomla and the way the system parses content plugins being loaded by modules: if I create an article and insert a product tag by the plugin button it works fine while the system loads directly the article both for the article page and for a category page. If the article comes loaded by a module it comes with a different behaviour due to the fact that the module loads the article and the plugin get parsed at last, then if the module have to manage some content of the article cannot recognize it !  I don't know if I've good explained this issue, it's a bit twisted !! The best is to try to load in a module (like a slider or carousel) some different kind of articles (content articles, with or without the use of hikashop plugin) and see what it's going to happen.  I've also wrote a post in Joomla forum:   forum.joomla.org/viewtopic.php?f=727&amp;t=867802  At present I think that a way to solve is that the &quot;product-button&quot;, instead of insert a plugin code, writes directly the correct product content in the article, especially for the picture that is usually the main element of one of this content items. I know this will lead to some mistake if the product pictures changes ...  What do you think about this solution ? Do you think is there a better way to solve ?")*

Could you tell me how to retrieve the correct path of the images (and thumbs) related to product and set into the field #__hikashop_file.file_path ?

Thank you !

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 10 months ago [\#183558](#183558) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Product plugin loaded by modules](/forum/26-product-category-display/873606-product-plugin-loaded-by-modules#183558 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6  Hello, I'm searching for a way to have a better behaviour for the hikashop product plugin. The problem is due to the core Joomla and the way the system parses content plugins being loaded by modules: if I create an article and insert a product tag by the plugin button it works fine while the system loads directly the article both for the article page and for a category page. If the article comes loaded by a module it comes with a different behaviour due to the fact that the module loads the article and the plugin get parsed at last, then if the module have to manage some content of the article cannot recognize it !  I don't know if I've good explained this issue, it's a bit twisted !! The best is to try to load in a module (like a slider or carousel) some different kind of articles (content articles, with or without the use of hikashop plugin) and see what it's going to happen.  I've also wrote a post in Joomla forum:   forum.joomla.org/viewtopic.php?f=727&amp;t=867802  At present I think that a way to solve is that the &quot;product-button&quot;, instead of insert a plugin code, writes directly the correct product content in the article, especially for the picture that is usually the main element of one of this content items. I know this will lead to some mistake if the product pictures changes ...  What do you think about this solution ? Do you think is there a better way to solve ?")*

Hi,

This kind of code should do the job: Code:

$product_id = 1; $fileClass = hikashop_get('class.file'); $startPath = $fileClass-&gt;getPath('image'); $db = JFactory::getDBO(); $db-&gt;setQuery('SELECT file_path FROM '.hikashop_table('file').' WHERE file_type = "product" and file_ref_id = '.(int)$product_id.' LIMIT 1'); $endPath = $db-&gt;loadResult(); $fullPath = $startPath.$endPath;

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

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

Less More

- Posts: 99
- Thank you received: 2
-
-

11 years 10 months ago -  11 years 10 months ago [\#183803](#183803) by [gulp](/forum/user/31237-gulp "View gulp's Profile")  Replied by *[gulp](/forum/user/31237-gulp "View gulp's Profile")* on topic *[Product plugin loaded by modules](/forum/26-product-category-display/873606-product-plugin-loaded-by-modules#183803 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6  Hello, I'm searching for a way to have a better behaviour for the hikashop product plugin. The problem is due to the core Joomla and the way the system parses content plugins being loaded by modules: if I create an article and insert a product tag by the plugin button it works fine while the system loads directly the article both for the article page and for a category page. If the article comes loaded by a module it comes with a different behaviour due to the fact that the module loads the article and the plugin get parsed at last, then if the module have to manage some content of the article cannot recognize it !  I don't know if I've good explained this issue, it's a bit twisted !! The best is to try to load in a module (like a slider or carousel) some different kind of articles (content articles, with or without the use of hikashop plugin) and see what it's going to happen.  I've also wrote a post in Joomla forum:   forum.joomla.org/viewtopic.php?f=727&amp;t=867802  At present I think that a way to solve is that the &quot;product-button&quot;, instead of insert a plugin code, writes directly the correct product content in the article, especially for the picture that is usually the main element of one of this content items. I know this will lead to some mistake if the product pictures changes ...  What do you think about this solution ? Do you think is there a better way to solve ?")*

The call Code:

$fileClass-&gt;getPath('image')

returns the path like: Code:

C:\web\mysite\web\media\com_hikashop\upload\

but:
- I'm searching for the thumb file, not the full image. How are the thumbs created by hikashop mapped by the source image ? These are usually located under thumbnails/166x250/, but how the system knows it ?
- to put the image in the editor I've to create the full URL path, how to convert URI to URL ?

Thank you for your help !

Last edit: 11 years 10 months ago by [gulp](/forum/user/31237-gulp "View gulp's Profile").

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 10 months ago [\#183805](#183805) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Product plugin loaded by modules](/forum/26-product-category-display/873606-product-plugin-loaded-by-modules#183805 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6  Hello, I'm searching for a way to have a better behaviour for the hikashop product plugin. The problem is due to the core Joomla and the way the system parses content plugins being loaded by modules: if I create an article and insert a product tag by the plugin button it works fine while the system loads directly the article both for the article page and for a category page. If the article comes loaded by a module it comes with a different behaviour due to the fact that the module loads the article and the plugin get parsed at last, then if the module have to manage some content of the article cannot recognize it !  I don't know if I've good explained this issue, it's a bit twisted !! The best is to try to load in a module (like a slider or carousel) some different kind of articles (content articles, with or without the use of hikashop plugin) and see what it's going to happen.  I've also wrote a post in Joomla forum:   forum.joomla.org/viewtopic.php?f=727&amp;t=867802  At present I think that a way to solve is that the &quot;product-button&quot;, instead of insert a plugin code, writes directly the correct product content in the article, especially for the picture that is usually the main element of one of this content items. I know this will lead to some mistake if the product pictures changes ...  What do you think about this solution ? Do you think is there a better way to solve ?")*

Hi,

The following code is more appropriate if you want to display thumbnails. Code:

$product_id = 1; $db = JFactory::getDBO(); $db-&gt;setQuery('SELECT file_path FROM '.hikashop_table('file').' WHERE file_type = "product" and file_ref_id = '.(int)$product_id.' LIMIT 1'); $path = $db-&gt;loadResult(); $imageHelper = hikashop_get('helper.image'); $imageHelper-&gt;width = '100'; $imageHelper-&gt;height = '100'; echo $imageHelper-&gt;displayThumbnail($path);

It will write directly the image HTML tag.

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

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

Less More

- Posts: 99
- Thank you received: 2
-
-

11 years 10 months ago [\#183884](#183884) by [gulp](/forum/user/31237-gulp "View gulp's Profile")  Replied by *[gulp](/forum/user/31237-gulp "View gulp's Profile")* on topic *[Product plugin loaded by modules](/forum/26-product-category-display/873606-product-plugin-loaded-by-modules#183884 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6  Hello, I'm searching for a way to have a better behaviour for the hikashop product plugin. The problem is due to the core Joomla and the way the system parses content plugins being loaded by modules: if I create an article and insert a product tag by the plugin button it works fine while the system loads directly the article both for the article page and for a category page. If the article comes loaded by a module it comes with a different behaviour due to the fact that the module loads the article and the plugin get parsed at last, then if the module have to manage some content of the article cannot recognize it !  I don't know if I've good explained this issue, it's a bit twisted !! The best is to try to load in a module (like a slider or carousel) some different kind of articles (content articles, with or without the use of hikashop plugin) and see what it's going to happen.  I've also wrote a post in Joomla forum:   forum.joomla.org/viewtopic.php?f=727&amp;t=867802  At present I think that a way to solve is that the &quot;product-button&quot;, instead of insert a plugin code, writes directly the correct product content in the article, especially for the picture that is usually the main element of one of this content items. I know this will lead to some mistake if the product pictures changes ...  What do you think about this solution ? Do you think is there a better way to solve ?")*

I'm sorry but it is not clear what do you mean with thumbnails:
those images that the plugin is already using aren't created runtime, but during the upload of the main image of the product and has this path:
media/com_hikashop/upload/thumbnails/166x250/
instead of which it creates with your last code that are here:
media/com_hikashop/upload/thumbnail_166x250/

I just would like to load the already created thumbnails as in first path, then I'm wondering how to retrieve that path !

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 10 months ago [\#183887](#183887) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Product plugin loaded by modules](/forum/26-product-category-display/873606-product-plugin-loaded-by-modules#183887 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6  Hello, I'm searching for a way to have a better behaviour for the hikashop product plugin. The problem is due to the core Joomla and the way the system parses content plugins being loaded by modules: if I create an article and insert a product tag by the plugin button it works fine while the system loads directly the article both for the article page and for a category page. If the article comes loaded by a module it comes with a different behaviour due to the fact that the module loads the article and the plugin get parsed at last, then if the module have to manage some content of the article cannot recognize it !  I don't know if I've good explained this issue, it's a bit twisted !! The best is to try to load in a module (like a slider or carousel) some different kind of articles (content articles, with or without the use of hikashop plugin) and see what it's going to happen.  I've also wrote a post in Joomla forum:   forum.joomla.org/viewtopic.php?f=727&amp;t=867802  At present I think that a way to solve is that the &quot;product-button&quot;, instead of insert a plugin code, writes directly the correct product content in the article, especially for the picture that is usually the main element of one of this content items. I know this will lead to some mistake if the product pictures changes ...  What do you think about this solution ? Do you think is there a better way to solve ?")*

Hi,

If all the thumbnails are created in the same folder (it depends on your images settings in Configuration &gt; Main &gt; Image), so you can just use that code: Code:

$product_id = 1; $db = JFactory::getDBO(); $db-&gt;setQuery('SELECT file_path FROM '.hikashop_table('file').' WHERE file_type = "product" and file_ref_id = '.(int)$product_id.' LIMIT 1'); $endPath = $db-&gt;loadResult(); $fullPath = 'media/com_hikashop/upload/thumbnails/166x250/'.$endPath;

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

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

Less More

- Posts: 99
- Thank you received: 2
-
-

11 years 10 months ago [\#184088](#184088) by [gulp](/forum/user/31237-gulp "View gulp's Profile")  Replied by *[gulp](/forum/user/31237-gulp "View gulp's Profile")* on topic *[Product plugin loaded by modules](/forum/26-product-category-display/873606-product-plugin-loaded-by-modules#184088 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6  Hello, I'm searching for a way to have a better behaviour for the hikashop product plugin. The problem is due to the core Joomla and the way the system parses content plugins being loaded by modules: if I create an article and insert a product tag by the plugin button it works fine while the system loads directly the article both for the article page and for a category page. If the article comes loaded by a module it comes with a different behaviour due to the fact that the module loads the article and the plugin get parsed at last, then if the module have to manage some content of the article cannot recognize it !  I don't know if I've good explained this issue, it's a bit twisted !! The best is to try to load in a module (like a slider or carousel) some different kind of articles (content articles, with or without the use of hikashop plugin) and see what it's going to happen.  I've also wrote a post in Joomla forum:   forum.joomla.org/viewtopic.php?f=727&amp;t=867802  At present I think that a way to solve is that the &quot;product-button&quot;, instead of insert a plugin code, writes directly the correct product content in the article, especially for the picture that is usually the main element of one of this content items. I know this will lead to some mistake if the product pictures changes ...  What do you think about this solution ? Do you think is there a better way to solve ?")*

Then there is now way to check which is the correct path ?
How does the code knows that the path is this : 'media/com_hikashop/upload/thumbnails/166x250/' ?

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 10 months ago [\#184114](#184114) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Product plugin loaded by modules](/forum/26-product-category-display/873606-product-plugin-loaded-by-modules#184114 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6  Hello, I'm searching for a way to have a better behaviour for the hikashop product plugin. The problem is due to the core Joomla and the way the system parses content plugins being loaded by modules: if I create an article and insert a product tag by the plugin button it works fine while the system loads directly the article both for the article page and for a category page. If the article comes loaded by a module it comes with a different behaviour due to the fact that the module loads the article and the plugin get parsed at last, then if the module have to manage some content of the article cannot recognize it !  I don't know if I've good explained this issue, it's a bit twisted !! The best is to try to load in a module (like a slider or carousel) some different kind of articles (content articles, with or without the use of hikashop plugin) and see what it's going to happen.  I've also wrote a post in Joomla forum:   forum.joomla.org/viewtopic.php?f=727&amp;t=867802  At present I think that a way to solve is that the &quot;product-button&quot;, instead of insert a plugin code, writes directly the correct product content in the article, especially for the picture that is usually the main element of one of this content items. I know this will lead to some mistake if the product pictures changes ...  What do you think about this solution ? Do you think is there a better way to solve ?")*

Hi,

The system know that based on your images settings in Configuration &gt; Main &gt; Images.

Based on the sizes set and the crop method it generate the thumbnails in the folder of the correct thumbnail size. So based on your settings, the thumbnail path will always be the same ![;)](/media/kunena/emoticons/11.png ";)")

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

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

[](#top)
