Showing variant codes & characteristics in listing

  • Posts: 30
  • Thank you received: 0
13 years 4 weeks ago #28700

Hi,
I would like to show the variants codes and characteristics on the listing for each available characteristics like on this image:



variant code would be W051 and characteristic 40 x 40

please give me some direction on how I would pull the right data from the db and what file I should edit, I assume Display>views>product>listing_list

thank you.

Attachments:

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

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
13 years 3 weeks ago #28723

Hi,

That's quite complex to do.
That information is not loaded from the database on listings of products. So you would have to first load all the variants of the products and their characteristics values before being able to display them.
You will need to know PHP quite well to do that...

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

  • Posts: 30
  • Thank you received: 0
13 years 3 weeks ago #28734

I'm new to php but quite excited about it so I'll give it a go, just 2 questions. Do you have a class in hikashop to call the db or can just use the joomla one? would it be a security issue if I did the script in the Display>views>product>listing_list file? (probably at least very bad practice).
with that I will give it a shot.

thanks.

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

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
13 years 3 weeks ago #28738

Yes, you can do it directly in the view. It's not clean but the edition of views is there so that you can easily customize them so it's better than hacking directly in the core files :)

You can use directly the db class of joomla: $db =& Jfactory::getDBO();
That's what we use everywhere in HikaShop.

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

  • Posts: 30
  • Thank you received: 0
13 years 3 weeks ago #28780

Thank you Nicolas. I really like hikashop (I keep saying that in all my posts but that's because, I really like hikashop).
I apologies for taking your time with my silly questions. your answers are always very fast and precise. thank you.

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

Time to create page: 0.061 seconds
Powered by Kunena Forum