how to be dropdown field of product_category

  • Posts: 4
  • Thank you received: 0
6 years 2 weeks ago #290448

-- url of the page with the problem -- : localhost
-- HikaShop version -- : 3.3.0
-- HikaMarket version -- : 1.7.1
-- Joomla version -- : 3.8.5
-- PHP version -- : 7.0.0
-- Browser(s) name and version -- : chrome


I want to when i'm in add product , field of product_category be dropdown ( like select and option) or be namebox single . what should i do?

Last edit: 6 years 2 weeks ago by _blank.

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

  • Posts: 25999
  • Thank you received: 4004
  • MODERATOR
6 years 2 weeks ago #290449

Hello,

Please see : www.hikashop.com/forum/20-market-feature...ot-in-dashboard.html

As explained it requires a view override. You can modify the parameters of the namebox or you can replace the mentioned code by a customized dropdown. In such case you will have to respect the name of the input.

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
6 years 2 weeks ago #290482

tnx
i want vendor just select one category but i not found any answer in this topic :(
but i have this code in productmarket > form:

$categories = null;
		if(!empty($this->product->categories))
			$categories = array_keys($this->product->categories);
		echo $this->nameboxType->display(
			'data[product][categories]',
			$categories,
			hikamarketNameboxType::NAMEBOX_MULTIPLE,
			'category',
			array(
				'delete' => true,
				'sort' => true,
				'root' => $this->vendorCategories,
				'default_text' => '<em>'.JText::_('HIKA_NONE').'</em>',
			)
		);
and worked . but when i changed this code:
hikamarketNameboxType::NAMEBOX_MULTIPLE
to
hikamarketNameboxType::NAMEBOX_SINGLE

when i save the form , All fields are saved except caegory of product not be save .
Where did i make a mistake?

Last edit: 6 years 2 weeks ago by _blank.

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

  • Posts: 25999
  • Thank you received: 4004
  • MODERATOR
6 years 2 weeks ago #290483

Hello,

You can use " hikamarketNameboxType::NAMEBOX_SINGLE " but you'll also need to change the name to " data[product][categories][] " so you'll pass the same data to HikaMarket/HikaShop.

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

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

  • Posts: 4
  • Thank you received: 0
6 years 2 weeks ago #290501

very thanks . it's worked

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

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