how to make step by step vendor registration

  • Posts: 52
  • Thank you received: 0
7 years 1 month ago #264850

-- HikaShop version -- : 3.0.1
-- HikaMarket version -- : 1.7.3
-- Joomla version -- : 3.6.5
-- PHP version -- : 5.6

hi

i make menu with vendor edition that user can register as vendor and i want when click on save button user go to next page like add shipping method and next to add product page. like Etsy.com
i want to step by step vendor registration (ex. like check out system ) .how can i do it..

Last edit: 7 years 1 month ago by jafar007.

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

  • Posts: 26007
  • Thank you received: 4004
  • MODERATOR
7 years 1 month ago #264854

Hi,

It would require some important development to do so.
The best would be to use a custom plugin in order to create some kind of "wizard". So instead of using the default HikaMarket vendor registration process, you could use your custom controller and process the "wizard" in different steps.

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: 52
  • Thank you received: 0
7 years 1 month ago #264977

i don't want exactly like checkout system . i just want add custom url to save button that go to next page instead of refresh page.

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

  • Posts: 26007
  • Thank you received: 4004
  • MODERATOR
7 years 1 month ago #264978

Hello,

It does not change the solution I gave you and I want not talking about the checkout.

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: 52
  • Thank you received: 0
7 years 1 month ago #265083

the custom controller is a option in hikashop like custom fields or you mean that i must create it with php code?

Last edit: 7 years 1 month ago by Jerome.

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

  • Posts: 52
  • Thank you received: 0
7 years 1 month ago #265103

i find a solution for this. Accordion.
i create simplge Accodrion for Vendor Edition page that make step by step . but i have a problem with custom fields.
add a custom fields for Upload Documents and i want make it seperate of extra fields. how can i do it.
for example :

<div class="accodion">
<div class="panel1"> vendor name fiedl</div>
<div class="panel2"> vendor image and info</div>
<div class="panel3">some extra fields</div>
<div class="panel4">other extra fields that i want</div>
</div>

how to show specified custom fields.

Last edit: 7 years 1 month ago by jafar007.

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

  • Posts: 52
  • Thank you received: 0
7 years 1 month ago #265180

i found this lines in hikamarket/vendormarket/registration.php

if(!empty($this->extraFields['vendor'])) {
?>

<?php
		foreach($this->extraFields['vendor'] as $fieldName => $oneExtraField) {
?>
<dl id="hikamarket_<?php echo $this->form_type.'_'.$oneExtraField->field_namekey; ?>" class="hikam_options hikamarket_<?php echo $this->form_type; ?>_<?php echo $fieldName;?>_line">
	<dt><?php
		echo $this->fieldsClass->getFieldName($oneExtraField);
	?></dt>
	<dd><?php
			$onWhat = 'onchange';
			if($oneExtraField->field_type == 'radio')
				$onWhat = 'onclick';
			$oneExtraField->table_name = 'vendor'; //$this->form_type; //'register';
			if(isset($this->element->$fieldName))
				$value = $this->element->$fieldName;
			else
				$value = $this->vendorFields->$fieldName;

			echo $this->fieldsClass->display(
				$oneExtraField,
				$value,
				'data['.$this->form_type.']['.$fieldName.']',
				false,
				' ' . $onWhat . '="hikashopToggleFields(this.value,\''.$fieldName.'\',\''.$this->form_type.'\',0,\'hikamarket_\');"',
				false,
				$this->extraFields['vendor'],
				$this->element
			);
	?></dd>
</dl>
<?php
		}
?>
this show custom field with loop function. but i want add some custom filed manually in different position.

I hope to be able to convey what I mean.:)

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

  • Posts: 52
  • Thank you received: 0
7 years 1 month ago #265200

i found a simple solution :)
one this code:

$fields = $this->extraFields['vendor']['FIELD_COLUMN_NAME'];
	echo $this->fieldsClass->getFieldName($documents);

			$onWhat = 'onchange';
			if($documents->field_type == 'radio')
				$onWhat = 'onclick';
			$documents->table_name = 'vendor'; //$this->form_type; //'register';

			if(isset($this->element->$fieldName))
				$value = $this->element->$fieldName;
			else
				$value = $this->vendorFields->$fieldName;

		echo $this->fieldsClass->display(
				$documents,
				$value,
				'data[vendor][FIELD_COLUMN_NAME]',
				false,
				' ' . $onWhat . '="hikashopToggleFields(this.value,\''.'FIELD_COLUMN_NAME'.'\',\''.'vendor'.'\',0,\'hikamarket_\');"',
				false,
				$this->extraFields['vendor'],
				$this->element);	

and simpel than this cod:
just copy foreach function and add if after that for show just your specifice custom fields:
foreach($this->extraFields['vendor'] as $fieldName => $oneExtraField) {
			if($fieldName!='documents' & $fieldName!='paypaldoc') continue;

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

  • Posts: 26007
  • Thank you received: 4004
  • MODERATOR
7 years 1 month ago #265185

Hi,

Instead of doing a foreach on the fields, you can simply pick-up the fields you want to display thanks to their "field name".
If you have a vendor field with the namekey "my_vendor_field", you can get the data (used for the display function)

$oneExtraField = $this->extrafields['vendor']['my_vendor_field'];
And afterwards, you just have to use the same code to display the 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.

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

  • Posts: 52
  • Thank you received: 0
7 years 1 month ago #265318

tanx jerome.
1.but if using this code all of data show on controller? like onclick function ,....?
2.when used this code give me error that $oneextrafield is undifined.

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

  • Posts: 26007
  • Thank you received: 4004
  • MODERATOR
7 years 1 month ago #265328

Hello,

The controller is there to perform "low level" actions, like saving content in the database, perform checks, control the workflow, display a page..
The view is the content display to the users, it contains the HTML and also the javascript.

I gave you the code to get one specific "oneExtraField", and the rest of the code is the same than the one you noted.
Where you have that variable $oneExtraField pass to the fieldClass to display the 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.

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

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