multicheckout plugin - I cannot save html code in the text view

  • Posts: 224
  • Thank you received: 26
  • Hikashop Business
1 year 3 months ago #349033

-- HikaShop version -- : 4.7.1
-- Joomla version -- : 3.10.11
-- PHP version -- : 7.4

Hi,
I didn't know where else to put this new thread, I hope that's ok here :silly:
I use the multicheckout plugin to create a new checkout, and I use a view ( text ) to add a custom module possition and some custom html,
but the html code is deleted and only the button text remains
This is the content I add to the text

{module id="130:Cart total" showtitle="false"}

<div class="div_top_radius_none">
<button id="hikabtn_checkout_next" type="submit" class="hikabtn hikabtn-success hikabtn_checkout_next next-step-btn" onclick="return window.checkout.submitStep(this);">Continue <i class="fa fa-angle-double-right"></i></button>
</div>

And this is what remain after I save the checkout
{module id="130:Cart total" showtitle="false"}

Continuă 

I need to mention, this is working with the default checkout workflow of hikashop.
Thank you.

Attachments:

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

  • Posts: 26032
  • Thank you received: 4006
  • MODERATOR
1 year 3 months ago #349060

Hello,

Thank you for your message.

The multi-checkout plugin is not performing special filtering on the data ; the plugin "save" function is using the HikaShop core.
But I also don't remember that HikaShop is performing "strip tags" on the "plugin_params" since it's an array of data.

To be sure, it's possible to override the storage of the plugin via a function.
You can edit the "multicheckout.php" file (from the multicheckout plugin) and add that function in the file.
Replace the line :

	public $noForm = true;
By:
	public $noForm = true;

	public function onPluginConfigurationSave(&$element) {
		$formData = hikaInput::get()->get('data', array(), 'array');
		if(!isset($formData['plugin']['plugin_params']['workflow']))
			return;
		$element->plugin_params->workflow = $formData['plugin']['plugin_params']['workflow'];
	}
And it should fix your issue by overriding the configuration save process of that specific "workflow" field.

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: oxido

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

Time to create page: 0.055 seconds
Powered by Kunena Forum