Pull only a single product In Mod Hikashop

  • Posts: 3
  • Thank you received: 0
12 years 3 months ago #58209

im wanting to pull a selected product from a catgory and display it on the homepage..
for example.. product of the day..

i have already created a new listing layout view..which works perfect.
but im unable to see how i can call just one product.

Anyone, have any ideas..

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

  • Posts: 179
  • Thank you received: 17
12 years 3 months ago #58213

1. create a new category, whatever name you like.
2. Go to the product you want to display, add it to that category (you can add products to as many categories as you like).

You have a category you can publish which has a single product in it, so now you can publish the category moduel to your fromt page in whatever way you normally would (menu, loadmoduleposition etc etc).

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

  • Posts: 3
  • Thank you received: 0
12 years 3 months ago #58216

I will explain myself a little better..

i will be having a different module on different pages..showing different selected products
so pointless...if i have to create a cateogry every time. i want to show only one product in a module.

is there anyway..i can change the coding to pull only one product.
maybe by having a extra input field in the module, allowing the entering of the products id

Any tips.in the right direction..
much appreciated

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

  • Posts: 179
  • Thank you received: 17
12 years 3 months ago #58218

ahh ok, sorry not sure how that would happen, personally I would still have categories, but label them as 'Products Page', 'Junk Page' etc so its easy to see whats where, and to remove and replace products on those pages by just assigning and removing them, but I see what you are saying, maybe someone else has done :)

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

  • Posts: 3
  • Thank you received: 0
12 years 3 months ago #58225

Yes, I do have categories, and many products in them. Put I need to display a single product on a k2 article with describes the product. So i need the mod to select by product id. For example is there was a filter under the sort by product_id that would be prefect I have attached an image. Really I just need some pointers where to start?

Thanks in advance

Attachments:

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

  • Posts: 82819
  • Thank you received: 13366
  • MODERATOR
12 years 3 months ago #58275

You can edit the file "form" of the view "modules" of your back end template in order to add that field.
If you set it with the proper name, your field will be saved automatically.

Now for the system to use that field for the fitlering of the listing so that it displays that product in particular, you will have to edit directly the file components/com_hikashop/views/product/view.html.php and add your query condition to the products listing query in the listing function.

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

Time to create page: 0.083 seconds
Powered by Kunena Forum