- Posts: 99
- Thank you received: 2
product button code in search result
Hello,
the search results shows the hikashop product code ( 2|link|picture|menuid:419 ) in the description of articles listed.
This is unpleasant to see for users, is there a way to hide it or make the plugin be parsed before the data is being shown ?
Please Log in or Create an account to join the conversation.
The best will be to edit the plugin "search | hikashop_products" in order to parse the "$row->text" fields before the return.
I will recommend you to duplicate the plugin otherwise, you will loose your modification with updates ; by creating a new (custom) search plugin, you will be sure that the updates won't modify yours.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
All the users that exploit the insert-product-button will have this kind of problem ...
Thank you for the suggestion !
Please Log in or Create an account to join the conversation.
Are you sure that this code is not present in your product description ?
By default the plugin return only the product description for the description part of the result.
If it's a variant, thanks to check the product description of this variant.
Else to parse the content, you have to duplicate the plugin, rename it (folder name, file names, file content), and in the function "onSearch()" parse the content after "$row->text=$row->product_description;".
You have to edit the content of "$row->text".
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
The product code plugin of HikaShop parses the whole page and can replace product tags anywhere, even in the search results.
So the problem is actually that something else is stripping out the opening and closing tags without removing the content inside in your search results and thus you see the text.
You can try to trick it like this: That way, it should not be a problem for HikaShop to parse the tags and if something else strips the opening and closing tags, the rest will be in a HTML comment and thus not visible.
Please Log in or Create an account to join the conversation.
Meanwhile could you suggest me where is the code to update ?
Please Log in or Create an account to join the conversation.
There is nothing to edit in the plugins, you just have to edit the Joomla article where this tag has been added.
It's a tag added by HikaShop when you click on the button to display a product in an article.
Please Log in or Create an account to join the conversation.
Then I need to override your plugin to always avoid this issue for this site.
I suggest you to a little improve this plugin by:
- adding this braces, if you think it's a good solution for everybody
- make the menu-id selectable with an html-select to let the user quick decide the destination item-id
Could you please suggest where to update the code to add braces ?
Thank you
Please Log in or Create an account to join the conversation.
You have to edit the plugin in "plugins/editors-xtd/hikashopproduct" file "hikashopproduct.php, function "productDisplay()", replace:
Please Log in or Create an account to join the conversation.
Patch recommended !!
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I'm afraid that I the patch proposed and the solution explained by Nicolas are not the same.
I was talking about modification in the search plugin...
So please, edit the search plugin and do what I was telling in my first message, I really don't know why they came on such different solution...
I know that my solution will work and won't impact the rest of the website.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
don't you worry about this, the site is still in development then there is no hurry at present, but I would like to solve this issue.
I can't find your suggestion on how to solve it on the search plugin, could you please link it or re-post it here ?
Thank you
Please Log in or Create an account to join the conversation.
Like I said in my first message, you have to edit the "search/hikashop_products" plugins ( plugins/search/hikashop_products/hikashop_products.php).The best will be to edit the plugin "search | hikashop_products" in order to parse the "$row->text" fields before the return.
I will recommend you to duplicate the plugin otherwise, you will loose your modification with updates ; by creating a new (custom) search plugin, you will be sure that the updates won't modify yours.
In this file, the plugin prepare the content for the Joomla search component, it returns the product description in the "$row->text" variable.
The idea is to replace the content in this variable in order to remove the tags you don't want to display.
Like
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
your patch hides the product description on the products records that comes as results of the search,
but the problem isn't on the product records, but in articles records that contains the code.
When the search lists one of these articles it doesn't parses (or hide) the plugin, but let the user view the raw ugly code.
I've attached a screenshot of the typical result when the search find both the product and also an article that contains the product code.
Please Log in or Create an account to join the conversation.
Oh... Right, I see.
Ok then, you can use the trick that Nicolas gave you in your articles, so you will add an "<!--" and " -->" to hide the content in most cases.
Then, in order to let the product insert plugin works, the best is to add the support for the tags too.
So edit the file "plugins/system/hikashopproductinsert/hikashopproductinsert.php" and replace
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
I'm sorry to inform you that this code breaks the pages where the articles that contains the product code are loaded,
no errors to report except
(104) Connection reset by peer
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
The problem is coming from one of your plugin System/search plugin which is hiding the "" tags, can you unpublish them one by one and tell me if you find the one which is hiding the product tag ?
Thanks.
Please Log in or Create an account to join the conversation.
Which kind of plugin ?
Please Log in or Create an account to join the conversation.