load external xml by Form ( in product page)

  • Posts: 4
  • Thank you received: 0
8 years 2 months ago #249559

-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.6
-- PHP version -- : 5.3

hi

in com_content ( custom plugin )

function onContentPrepareForm($form, $data)
	{
		
		if (!($form instanceof JForm))
		{
			$this->_subject->setError('JERROR_NOT_A_FORM');
			return false;
		}
		
		if ( $form->getName() != "com_content.article" ) {
			return true;
		}
		// Add the extra fields to the form.
		// need a seperate directory for the installer not to consider the XML a package when "discovering"
		JForm::addFormPath(dirname(__FILE__) . '/rating');
		$form->loadFile('rating', false);

		return true;
	}
rating.xml
pleas see attached file

in hikashop ?

Attachments:

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 2 months ago #249577

Hi,

I'm afraid that we do not understand your question and your message.

Now, if you want to include content generated by content plugin ; please use the JHTML::_('content.prepare', ...) function.

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: 4
  • Thank you received: 0
8 years 2 months ago #249639

hey,
i need to make some specific form in Hikashop component (send product unit) that user fill them and the data store in other database.
this feature exist in "com_content", you are able to add a xml file with some defined form into a new tab.

what should i do to add some specific form in Hikashop component for "product unit"?

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
8 years 2 months ago #249665

Hi,

So do you mean that you want to add some new fields to the existing product edition page of HikaShop ?
In that case, you can edit the file "form" of the view "product" for your backend template via the menu Display>Views.
Your modifications will be added as a template override and that way you can directly put your form code in there.

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

Time to create page: 0.064 seconds
Powered by Kunena Forum