Plugin page views question

  • Posts: 205
  • Thank you received: 12
3 years 9 months ago #320083

-- HikaShop version -- : 4.3.0
-- HikaMarket version -- : 3.1.0
-- Joomla version -- : 3.9.18
-- PHP version -- : 7.2.30

Forgive us if we posted this thread in the wrong category, but we do not know if this is related to HikaShop or HikaMarket.

Trying to find out what the page views for...

Shipping plugins
vendor-control-panel/plugin/edit/name-manual/plugin_type-shipping/subtask-edit
vendor-control-panel/plugin/edit/name-fedex/plugin_type-shipping/subtask-edit
vendor-control-panel/plugin/edit/name-ups/plugin_type-shipping/subtask-edit

Payment plugins
vendor-control-panel/plugin/edit/name-banktransfer/plugin_type-payment/subtask-edit
vendor-control-panel/plugin/edit/name-check/plugin_type-payment/subtask-edit
vendor-control-panel/plugin/edit/name-collectondelivery/plugin_type-payment/subtask-edit
vendor-control-panel/plugin/edit/name-paypal/plugin_type-payment/subtask-edit
vendor-control-panel/plugin/edit/name-westernunion/plugin_type-payment/subtask-edit

Please advise because we need to make changes to the layouts but we can not locate the views to create overrides!

Thank you in advance.

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
3 years 9 months ago #320085

Hello,

If you want to know which view you need to edit, the easier is to use the "display view files" HikaShop setting :
www.hikashop.com/support/documentation/5...g.html#advanced_main

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.

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

  • Posts: 205
  • Thank you received: 12
3 years 9 months ago #320112

Thank you for your reply. This setting is very useful !

But we still have the following problem...

On page... vendor-control-panel//plugin/edit/name-banktransfer/plugin_type-payment/subtask-edit

The area of the plugin set the view that is shown at the top is pluginmarket / form.php

We opened this view pluginmarket / form.php to locate some strings that we want to modify.

The changes we want to do are related to language strings but they are not related to translation.

Please see the screenshot bellow that describes best what we want to do...



Thank you in advance for your help

Attachments:

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
3 years 9 months ago #320153

Hello,

The "pluginmarket / form" view process the configuration returned by the HikaMarket core regarding the plugin you're editing.
Depending the vendor ACL and what the plugin contains, it will fill some variables which will be processed in the different "blocks".

If you want to override the labels ; the best is to edit the variables in the view before the call of the "processConfig" function.
In your case, the "Name" and "Description" are part of the " $this->main_form " variable ; which is an array and will contains the elements you want under :

$this->main_form[$this->type.'_name']['name'];
$this->main_form[$this->type.'_description']['name'];
HikaMarket is using the labels from the HikaShop Backend. In order to reduce the translation file and not duplicate too much entries, we kept that definitions.

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.

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

  • Posts: 205
  • Thank you received: 12
3 years 9 months ago #320182

Edited this post because the previously mentioned changes made the "Restrictions" not to function. When "Add restriction" is clicked the page just reloaded.

Then removed the following changes and everything worked fine again.

Is there another solution?


----First post



Thank you Jerome
We used your method and it worked fine for some cases but not for some others
$this->main_form[$this->type.'_name']['name'] = "Custom Name"; -> WORKED FINE

$this->main_form[$this->type.'_description']['name']  = "Custom Description"; -> WORKED FINE

$this->main_form[$this->type.'_published']['name'] = "Custom Published"; -> ERROR: 0 Call to undefined method plgHikashoppaymentBanktransfer::displayConfigField()

$this->main_form[$this->type.'_images']['name']  = "Custom Images"; -> WORKED FINE

$this->main_form[$this->type.'_price']['name']  = "Custom Price"; -> WORKED FINE

$this->main_form[$this->type.'_percentage']['name']  = "Custom Percentage"; -> ERROR: 0 Call to undefined method plgHikashoppaymentBanktransfer::displayConfigField()
We have not yet tested the rest labels.

Please advise... thank you.

Last edit: 3 years 9 months ago by liaskas.

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
3 years 9 months ago #320202

Hello,

I invite you to perform a " var_dump " on the $this->main_form and the other variables used with the processConfig function.
Please note that depending you're editing a payment plugin, a shipping plugin or a "raw" plugin, you won't have the same fields ; thus you need to add some code to be sure to not edit something which do not exist.

Afterwards, please use a translation key instead of the final text.
A translation key do not have spaces and is written in full caps lock.

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.

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

Moderators: Obsidev
Time to create page: 0.074 seconds
Powered by Kunena Forum