How to create a HikaShop Module

  • Posts: 202
  • Thank you received: 13
  • Hikashop Business
9 years 4 months ago #239961

-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.5.1
-- PHP version -- : 5.5.34

Is it possible to create a HikaShop module (not a Joomla module)? If so, any documentation?

I'm trying to add a block within a product page that integrates with DocMan. I've looked at the Joomla plugin + view template override method. But I thought a HikaShop module seems more straightforward and appropriate if possible.


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters

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

  • Posts: 84313
  • Thank you received: 13702
  • MODERATOR
9 years 4 months ago #239977

Hi,

There are many ways to add things to the product page.
You could directly edit the file 'show_default' via the menu Display>Views and add your code in there. That's the simplest and since it would be done as an override it's actually quite a good idea.
You can add stuff to the product page with a plugin only thanks to the view triggers of HikaShop but it's more complex to put into place. It's a good idea if you plan to release your work for others to install on their website.
You can also have a module and insert it where you want with advanced modules manager or something like that.

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

  • Posts: 202
  • Thank you received: 13
  • Hikashop Business
9 years 4 months ago #240078

We are hoping that this or similar projects might be released to others. So the 'installable' approach is much preferred to the template override approach.

In order to insert a module I'd still need to have some sort of view template override to include the module. I don't think there is anything in the Advanced Module Manager (which we have already) or other NoNumber extensions that would place that code basically below the description on a product page.

I'd prefer not to have to clone the entire view class, so I'm going to look at using the onHikashopAfterViewDisplay to see where it would add a block of code there.

Thanks for your time and suggestions.


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters

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

  • Posts: 202
  • Thank you received: 13
  • Hikashop Business
9 years 3 months ago #240703

As a follow-up: I was able to create what we needed for this using the onHikashopAfterViewDisplay event and thus without using any template overrides.

It would however be nice if there were similar triggers for the frontend to apply plugin data in product blocks rather than just at the end of the view. This way a person would not have to clone any core HikaShop classes in the plugin in order to add some functionality.


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters
The following user(s) said Thank You: Jerome

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

Time to create page: 0.060 seconds
Powered by Kunena Forum