Advertisement:

Author Topic: Issue: OSCLASS-365 (Category dropdown hierarchy)  (Read 2981 times)

code monkey

  • Full Member
  • ***
  • Posts: 204
Issue: OSCLASS-365 (Category dropdown hierarchy)
« on: March 21, 2011, 04:44:04 pm »
Pretty simple, use two dashes.

Category
-- Subcategory
-- Subcategory
-- Subcategory

See: http://i.min.us/ime748.jpg

Juan Ramón

  • Osclass Developer
  • Hero Member
  • *****
  • Posts: 2382
Re: Issue: OSCLASS-365 (Category dropdown hierarchy)
« Reply #1 on: March 22, 2011, 06:55:07 pm »
Nice! I'm going to try with optgroup tag, what do you think?

btw, nice theme! do you have online?

elias.soliman

  • Jr. Member
  • **
  • Posts: 62
Re: Issue: OSCLASS-365 (Category dropdown hierarchy)
« Reply #2 on: March 22, 2011, 07:18:33 pm »
I don it buy other way

you can check it on http://forsyrian.com

1- oc-content/themes/modern/inc.search.php line 70 you will see this code:
Code: [Select]
<option value="<?php echo osc_category_id() ; ?>"><?php echo osc_category_name() ; ?></option>
change it to:
Code: [Select]
<option value="<?php echo osc_category_id() ; ?>">
     <?php echo "_________" ?>
     <?php echo osc_category_name() ; ?>
             <?php echo "_________" ?>
        </option>


2- oc-includes/osclass/frm/Item.form.class line 36
change it to
Code: [Select]
echo '<option value="' . $c['pk_i_id'] . '"' . ( (isset($item["fk_i_category_id"]) && $item["fk_i_category_id"] == $c['pk_i_id']) ? 'selected="selected"' : '' ) . '>' .'________'. $c['s_name'] .'________'.'</option>' ;


code monkey

  • Full Member
  • ***
  • Posts: 204
Re: Issue: OSCLASS-365 (Category dropdown hierarchy)
« Reply #3 on: March 23, 2011, 10:33:01 am »
I'm not a fan of your solution elias.soliman because it's not symmetrical. Each category will have different number of letters so the lines will be different width.

Nice! I'm going to try with optgroup tag, what do you think?

I tried optgroup, with the label set as parent category. But because of the label, it makes the parent category appear twice. So I went with the double-dash instead.


Nice! I'm going to try with optgroup tag, what do you think?

btw, nice theme! do you have online?

Just got it online. Had to upgrade my web host.
« Last Edit: April 06, 2011, 09:00:24 pm by code monkey »