Skip to main content

how to be dropdown field of product_category

More
8 years 6 months ago - 8 years 6 months ago #290448 by _blank
-- 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: 8 years 6 months ago by _blank.

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

More
8 years 6 months ago #290449 by Jerome
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.

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

More
8 years 6 months ago - 8 years 6 months ago #290482 by _blank
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:
Code:
$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:
Code:
hikamarketNameboxType::NAMEBOX_MULTIPLE
to
Code:
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: 8 years 6 months ago by _blank.

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

More
8 years 6 months ago #290483 by Jerome
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.
The following user(s) said Thank You: _blank

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

More
8 years 6 months ago #290501 by _blank
very thanks . it's worked

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

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