icons for product "symptomps"

  • Posts: 8
  • Thank you received: 0
10 years 5 months ago #181199

-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.3

Hello
is is possible to somehow implement "symptom icons" for products?
I tried to use budges, but I am not able to sort them one, near to another if there are more.
I need to add similar icons for product like it is at the attached screen.


Thank you a lot for your support

Attachments:

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

  • Posts: 83824
  • Thank you received: 13571
  • MODERATOR
10 years 5 months ago #181243

Hi,

Indeed, badges are close but not everything you need.
In your case, I would recommend instead to create a custom field of the table "product" and of the type "checkbox" with the column name "badge" via the menu Display>Custom fields.
Then, for each value of the field, enter a translation key like this: DF_VALUE
And then, in your translation file, add an override like this: DF_VALUE="<img src='http//mywebsite.com/df_image.png' />"
Then, in your products you can select the values you want at the bottom of the product edition page.
And finally, edit the listing_img_title file of the product view via the menu Display>Views and add such code:
<?php echo JText::_($this->row->badge); ?>

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

  • Posts: 8
  • Thank you received: 0
10 years 2 months ago #192580

Hi Nicolas
thank you very much for your imput. I did it like this. But I have one problem. I can still see just one symbol. First one. How can I do so I can see all icons?
Thank you for your support.
Kind regards
Michal

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

  • Posts: 83824
  • Thank you received: 13571
  • MODERATOR
10 years 2 months ago #192586

Hi,

I don't see why you would only see one symbol with that method.
Could you provide more information on what you did ? Screenshot of the field settings, screenshot of the product settings page, link to the products listing page ?

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

  • Posts: 8
  • Thank you received: 0
10 years 2 months ago #192621

Hi I will try to provide as much info as posible:
listing_img_title

....
<!-- VLASTNOSTI -->
<div class="vlastnosti">
 <?php echo JText::_($this->row->vlastnosti); ?>
</div>
<!-- EO VLASTNOSTI -->
...

I also tried:
<div class="vlastnosti">
                     <?php echo $this->element->characteristics; ?> 
      </div>
it works as well but with same issue - just one (first) valuse is shown

Trnaslation file:
DF_GASTRO="<img src='/images/vlastnosti/gastro.png' />"
DF_SK="<img src='/images/vlastnosti/SK.png' />"
DF_FAIR="<img src='/images/vlastnosti/fair.png' />"
DF_MLIEKO="<img src='/images/vlastnosti/mlieko.png' />"
DF_CUKOR="<img src='/images/vlastnosti/cukor.png' />"
DF_LEPOK="<img src='/images/vlastnosti/lepok.png' />"
DF_RAW="<a href="http://bodka.azurewebsites.net/vlastnosti"><img src='/images/vlastnosti/raw.png' /></a>"
DF_BIO="<img src='/images/vlastnosti/bio.png' />"

Whati is important - in backend I can see names, no pictures and I updated language file for admin part as well.
In attachment, you can see settings of the custome filed, and settings in the product itself. I can see pictore of first marked value only. so If I uncheck "BIO" I can see another picture, but still just one.
If you need any additional information or name and password so you can access page directly I can provide you.
Thank you for your support.

Kind regards
Michal

Attachments:

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

  • Posts: 83824
  • Thank you received: 13571
  • MODERATOR
10 years 2 months ago #192640

Ah, I see the problem.

Instead of: <?php echo JText::_($this->row->badge); ?>

use that code:
<?php foreach(explode(',',$this->row->badge) as $k){ echo JText::_($k); } ?>

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

  • Posts: 8
  • Thank you received: 0
10 years 2 months ago #192690

Great :)
thank you - it is working now :)
great support.

Attachments:

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

Time to create page: 0.076 seconds
Powered by Kunena Forum