Advertisement:

Author Topic: [do not use] select sub category after category in item-post.php  (Read 6186 times)

design

  • Hero Member
  • *****
  • Posts: 2619
  • Osclass 3.5 MAC/PC w/ Modern Browsers
replace this:

<?php ItemForm::category_select(null, null, __('Select a category', 'bender')); ?>

with this:

<?php ItemForm::category_multiple_selects(null, null, null, __('Select a category', 'bender')); ?>

in item-post.php

« Last Edit: March 26, 2014, 06:25:47 pm by design »

Hello

  • Full Member
  • ***
  • Posts: 174
Re: [TIP] select sub category after category in item-post.php
« Reply #1 on: October 16, 2013, 12:36:23 am »
+1

Nicolas30

  • Sr. Member
  • ****
  • Posts: 295
Re: [TIP] select sub category after category in item-post.php
« Reply #2 on: October 16, 2013, 12:55:58 am »
+1  :)

strata

  • Sr. Member
  • ****
  • Posts: 411
  • Always good, always...
Re: [TIP] select sub category after category in item-post.php
« Reply #3 on: October 16, 2013, 04:23:42 am »
Thanks for the good guide :) nice tips

sigivr

  • Sr. Member
  • ****
  • Posts: 471
Re: [TIP] select sub category after category in item-post.php
« Reply #4 on: November 06, 2013, 09:05:55 am »
How can i show "select category and subcategory in my language"? thank you

design

  • Hero Member
  • *****
  • Posts: 2619
  • Osclass 3.5 MAC/PC w/ Modern Browsers
Re: [TIP] select sub category after category in item-post.php
« Reply #5 on: November 06, 2013, 06:35:20 pm »
see the code? where it is red "Select a category', 'bender"

change 'Select a category' to your language.

I'm not sure where you can change the the "subcategory" except in the language files. Although, all of these should have been done already. what language are you using? have you turned off the english language? I have no idea how to do that, but I am looking forward to someone answering or you can find out sooner by doing a forum search.

amarjeets18

  • Jr. Member
  • **
  • Posts: 92
Re: [TIP] select sub category after category in item-post.php
« Reply #6 on: March 25, 2014, 09:23:56 am »
Hi,

Is it possible in modern theme???

design

  • Hero Member
  • *****
  • Posts: 2619
  • Osclass 3.5 MAC/PC w/ Modern Browsers
Re: [TIP] select sub category after category in item-post.php
« Reply #7 on: March 25, 2014, 05:17:00 pm »
of course it is, this is core helpers.
this goes anywhere you want your user to select a category, then sub category inside of a form. used mostly in item-post.php and item-edit.php

Emmanuel

  • Hero Member
  • *****
  • Posts: 645
  • .: ♥ Quality Swiss Details ♥ :. .: Swiss Made :.
Re: [TIP] select sub category after category in item-post.php
« Reply #8 on: March 26, 2014, 02:17:28 pm »
replace this:

Code: [Select]
<?php ItemForm::category_select(nullnull__('Select a category''bender')); ?>
with this:

Code: [Select]
<?php ItemForm::category_multiple_selects(nullnullnull__('Select a category''bender')); ?>
in item-post.php

but now there is no more jQuery validity check when NO sub-category is picked

even when "Allow users to select a parent category as a category when inserting or editing a listing" is disabled

Code: [Select]
Category settings

Parent categories
[x]  Allow users to select a parent category as a category when inserting or editing a listing

allows/makes corrupted data in the DB

design

  • Hero Member
  • *****
  • Posts: 2619
  • Osclass 3.5 MAC/PC w/ Modern Browsers
Re: [TIP] select sub category after category in item-post.php
« Reply #9 on: March 26, 2014, 06:24:15 pm »
damn.  :'(
any ideas how to accomplish this?
I see that deepakvarma was trying to get help with this also.

Are suggesting it should work with a query validation?

there is also this...
https://github.com/osclass/Osclass/issues/964

and as recently as 5 months, so maybe still bugs in the syrup? how did you discover the db issue (which is my biggest concern)

https://github.com/conejoninja/Osclass/commit/4cc576ebd4d9e382c938d95af0a17839d2bc2d2e

eta: as I find pieces of this puzzle
« Last Edit: March 26, 2014, 07:14:04 pm by design »

snarka

  • Newbie
  • *
  • Posts: 3
Re: [TIP] select sub category after category in item-post.php
« Reply #10 on: June 19, 2014, 08:40:23 pm »
damn.  :'(
any ideas how to accomplish this?
I see that deepakvarma was trying to get help with this also.

Are suggesting it should work with a query validation?

there is also this...
https://github.com/osclass/Osclass/issues/964

and as recently as 5 months, so maybe still bugs in the syrup? how did you discover the db issue (which is my biggest concern)

https://github.com/conejoninja/Osclass/commit/4cc576ebd4d9e382c938d95af0a17839d2bc2d2e

eta: as I find pieces of this puzzle
+1...
very necessary

mon

  • Jr. Member
  • **
  • Posts: 83
Re: [do not use] select sub category after category in item-post.php
« Reply #11 on: October 07, 2014, 08:54:29 pm »
is there a way to do the same in search-sidebar, that keeps the selection in category and subcategory?

It is perfect how it works in item-post but it would be useful too to search like that.

thanks in advance! :D

design

  • Hero Member
  • *****
  • Posts: 2619
  • Osclass 3.5 MAC/PC w/ Modern Browsers
Re: [do not use] select sub category after category in item-post.php
« Reply #12 on: October 08, 2014, 10:02:49 pm »
you can collect the code snippet and put it where ever you want (item.php, sidebar.php, main.php)