- Posts: 36
- Thank you received: 0
Add short descriptions under products in listings
Our website is nearly complete. However, I would like to know if or how I can add short descriptions under my products when I am viewing a product listing. It would also be great if I could add a Read more... button at the end of the short descriptions.
The reason we would like to do this is because we are worried that our customers may not immediately realize that clicking on a product will simply show it in more detail, rather than actually purchasing it.
Thanks for your time,
-Redeemer
EDIT: A small 'Details' button would do the trick too, if that's possible.
Please Log in or Create an account to join the conversation.
You can go in Display->Views and search for "listing_img". There you will have several files that you can customize. It depends on the option "item layout" of your menu/module. Suppose that you use the default one, "image and title", you will have to edit the listing_img_title.php file.
There, you will be able to modify the HTML the way you want. If you just want to display a button below the name of the product you can add the code
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Could you give a link of the problem ?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
This is very strange...
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
So, if you changed the code as I said, you should get the same result.
Please Log in or Create an account to join the conversation.
I put the code snippet you made on line 34.
Perhaps this will be helpful to you.
Please Log in or Create an account to join the conversation.
I was expecting that, otherwise, it wouldn't display the details button anywhere.
Please Log in or Create an account to join the conversation.
Does anyone have any ideas?
EDIT: I noticed earlier today that I can put <Read More> tags in product descriptions, but they don't seem to do anything.
Perhaps it would be a good idea to make these tags functional, so that you can set a product to appear with part of it's description in a list... And when you press the 'Read more' button, it takes you to the product page.
Please Log in or Create an account to join the conversation.
Maybe it could come from a caching issue ? If you cache the modules content on your website that's something which could happen since the HTML was already generated, you would not see your modification on the modules. You could easily check that by changing the color of the module background in the options of the module. If it doesn't change when displaying the module, then it's likely that it's a caching problem.
Please Log in or Create an account to join the conversation.
Sorry, I've tried clearing my cache to solve the problem... The problem doesn't seem to lie there, either.
Please Log in or Create an account to join the conversation.
For whatever reason, there are TWO listing_img_title.php files that hikashop uses. One is kept under the template you are using, in my case "rhuk_milkyway":
/templates/rhuk_milkyway/html/com_hikashop/product/listing_img_title.php
This one can be edited right through the Display->Views menu in the back-end of your Joomla! installation.
The second file is kept in:
/components/com_hikashop/views/product/tmpl/listing_img_title.php
For whatever reason, the Product Listing component uses the first one, but all other modules use the second.
It is my guess that they use two files because one is needed for template-specific layouts, and one is needed for generic modules.
At any rate, if you want a 'Details' button, or any other modification, to appear no matter if the products are appearing as the content or as a module, you must make the changes to BOTH files.
So, thanks for your help anyway, Nicolas; it was your code that helped me accomplish this in the first place.
-Redeemer
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.