make it possible to override checkout block > userpoints_checkout.php

  • Posts: 86
  • Thank you received: 1
  • Hikashop Business
2 months 1 week ago #305751

-- HikaShop version -- : 4.0.3
-- Joomla version -- : 3.9.5
-- PHP version -- : 7.2

i have to came back to this discussion:
www.hikashop.com/forum/4-how-to/895601-o...r-points-plugin.html

i only need to modify the CHECKOUT design block of this file: plugins/hikashop/userpoints/userpoints_checkout.php
please improve this behavior so that also this file can be overwritten in "views".

i made my modifications on 4.0.1 and now guess what i forgot about it on the update to 4.0.3. i can modify very other block part of the checkout, put this one from userpoints are not yet possible. please make this also possible to override under views, so that updates can be made without lose of modifications.

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

  • Posts: 66041
  • Thank you received: 9666
  • MODERATOR
2 months 1 week ago #305752

Hi,

This other thread is about changing some core function of the plugin, not a view of the plugin and in that case, the only solution is duplicating the whole plugin which is a bit more complex than just doing an override of the view file.
The updates can already be made without loosing the modifications to that view file. To do that, you want to copy the file plugins/hikashop/userpoints/userpoints_checkout.php to templates/YOUR_TEMPLATE/plg_hikashop_userpoints/checkout.php and modify the copy of that file.
It's not compatible with the Display>Views menu as that menu supports the standard Joomla view override system which is only for components and modules, not plugins.

The following user(s) said Thank You: kyratn, n00bster

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

  • Posts: 991
  • Thank you received: 84
  • Hikashop Business
2 months 1 week ago #305770

Hi,

Well in that topic i also was asking about view override of that file :) Great to know that it is possible ...

Does notify plugin have some view override posibility too? So we could change some html of the popups without losing it after update?

Thanks

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

  • Posts: 991
  • Thank you received: 84
  • Hikashop Business
2 months 1 week ago #305788

Hi,

It seems there is some issue with the override.

I have created view override as per instructions:

To do that, you want to copy the file plugins/hikashop/userpoints/userpoints_checkout.php to templates/YOUR_TEMPLATE/plg_hikashop_userpoints/checkout.php and modify the copy of that file.


However, after trying to use points ( clicking on "Do you want to use these points ? -> YES" ) the points view disappears of the screen and nothing happens. After reloading page, it appears again but still same behiviour....

Tried with:

HikaShop Business 4.0.3 [1904081548]
Protostar template
Copied default userpoints_checkout.php with no modifications....


Thanks

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

  • Posts: 66041
  • Thank you received: 9666
  • MODERATOR
2 months 1 week ago #305806

Hi,

1. The notify plugin doesn't have any views. The HTML of the popup is in the javascript file of the notify.js javascript library the plugin is using. It's indeed a shame that it is hard coded in the javascript.

2. So do you mean that without that view override you don't have the problem ?
To me, your issue looks unrelated to the view override. We would need to look at the issue (after you open a new thread please) directly on the website.

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

  • Posts: 991
  • Thank you received: 84
  • Hikashop Business
2 months 1 week ago #305817

Hi,

1. indeed it's a shame that this plugin has no view. Would be greate to have it so we could easy customize it.

2. Found the issue. It was .htaccess file causing cross-origin issue....

Thanks for help!

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

  • Posts: 66041
  • Thank you received: 9666
  • MODERATOR
2 months 1 week ago #305818

Hi,

1. Yes, what we could do is try to have some mini views and modify the javascript library to load the HTML from there instead of embedding it. The problem is that it will be complex to update the library in the future because of the changes we would have to make in it.

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

Time to create page: 0.071 seconds
Powered by Kunena Forum