Add a string beside the name of products

  • Posts: 80
  • Thank you received: 0
10 years 9 months ago #183059

-- HikaShop version -- : 231
-- Joomla version -- : 3.1

Hi,
I need add a message as "Click here" beside the products' names in the list of products of a category. But this message can't add to the name of the product.

How can I solve it?

Thanks in advance.
Leonora.

Please Log in or Create an account to join the conversation.

  • Posts: 2143
  • Thank you received: 747
10 years 9 months ago #183075

Hi,

At least two different ways to do so. For more info on "how to" see this documentation .

1. With CSS:
By using ":before" or ":after" with the product name class. Here an example:

.hikashop_products_listing .hikashop_product_name:after {
    content: "Click here";
}
If you prefer the text to appear in a separate line e.g. below the product name, add the property
display: block;
Of course, you may add more properties, e.g. to change color, background, etc.

2. Per view edition:
Depending on what "Type of (item) layout" you're using, you may edit the respective view via the HikaShop backend. Assuming it's "div" and "Image and title", you'd need to edit the view "product / listing_img_title" for your frontend template and add the text string (or a placeholder for multilingual use) within the product name <a> tags, or so.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
Last edit: 10 years 9 months ago by lousyfool. Reason: Typo

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 9 months ago #183066

Hi,

You can edit the view "product / listing_img_title" (or another based on your lsiting settings).
And before:

echo $this->row->product_name;
Add something like:
echo JText::_('Click here');

Please Log in or Create an account to join the conversation.

  • Posts: 80
  • Thank you received: 0
10 years 8 months ago #183213

Thanks!
It runs perfectly, but how it will happen if I upgrade the hikashop version?

Please Log in or Create an account to join the conversation.

  • Posts: 2143
  • Thank you received: 747
10 years 8 months ago #183241

@leonora:
If you follow the procedures for proper overrides as described in this link I already gave you, such overrides will remain in place when updating HikaShop.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
The following user(s) said Thank You: leonora

Please Log in or Create an account to join the conversation.

Time to create page: 0.064 seconds
Powered by Kunena Forum