- Posts: 30
- Thank you received: 0
Showing variant codes & characteristics in listing
14 years 11 months ago #28700
by duponsa
Showing variant codes & characteristics in listing was created by duponsa
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.
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.
Please Log in or Create an account to join the conversation.
14 years 11 months ago #28723
by nicolas
Replied by nicolas on topic Re: Showing variant codes & characteristics in listing
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...
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.
14 years 11 months ago #28734
by duponsa
Replied by duponsa on topic Re: Showing variant codes & characteristics in listing
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.
with that I will give it a shot.
thanks.
Please Log in or Create an account to join the conversation.
14 years 11 months ago #28738
by nicolas
Replied by nicolas on topic Re: Showing variant codes & characteristics in listing
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.
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.
14 years 11 months ago #28780
by duponsa
Replied by duponsa on topic Re: Showing variant codes & characteristics in listing
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.
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.164 seconds