Same Files in different Directories - Why?

  • Posts: 5
  • Thank you received: 0
1 year 5 days ago #280453

-- HikaShop version -- : 3.2.0
-- Joomla version -- : 3.8.1
-- PHP version -- : 7.1
-- Browser(s) name and version -- : Chrome

Hi there.
I'm currently modifying a hikashop plugin (vendorlocationfilter) and I am wondering why some files are called the same, have the same contents but are simply in another directory. It's hard to find out which file is the one to be changed. Should I change all the files? How do they correlate?
For example I have
\administrator\components\com_hikamarket\extensions\plg_hikashop_vendorlocationfilter\vendorlocationfilter.php
and
\plugins\hikashop\vendorlocationfilter\vendorlocationfilter.php

I know the second one is the one that directly affects what happens on my web site but I'm still wondering what the other file is being used for. I figured this appears to happen for many files but I cannot figure out why.

Cheers!

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

  • Posts: 22874
  • Thank you received: 3551
  • MODERATOR
1 year 4 days ago #280454

Hello,

That's simple, the "extensions" directory in HikaShop or HikaMarket are there to store the plugins provided with the components to perform a re-installation.
The plugins are stored in the Joomla plugins folder ; that's all.

Now, please do not modify HikaShop or HikaMarket core files/plugins since you won't be able to update afterwards without loosing your modifications.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: TInkyWinky

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

  • Posts: 5
  • Thank you received: 0
1 year 4 days ago #280475

Thank you, Jerome.

What do you recommend instead of modifying core components? I do like these plugins a lot, yet there are some features missing / not fully implemented I'd like to have. Please correct me if I'm wrong, but I don't see a major problem in manually updating HikaShop in case an upcoming update leads to problems with my modifications. For example, I simply needed a new field in the vendorlocationfilter module, a redirect URL in case of specific filter rules and outcomes. In addition I figured, $empty_is_all had never been used and I needed this functionality for my new field to work as intended.
Maybe I could just re-create the plugin with a different name, this way the plugin wouldn't be affected in case of an update, would it?

Best Regards,

Fabio

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

  • Posts: 22874
  • Thank you received: 3551
  • MODERATOR
1 year 3 days ago #280480

Hello,

Just create a new plugin (with a different name) which use (almost) the same code.
It's the best way to be sure that you will be able to update and keep your custom code.
Exactly like the fact to not edit code view but performing view overrides.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: TInkyWinky

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

Time to create page: 0.078 seconds
Powered by Kunena Forum