Osclass更改类别样式

时间:2014-10-06 15:35:32

标签: php css osclass

Osclass是一个非常好的工具,但我遇到了一些问题。

我有这段代码:

<div class="cell selector">
                    <?php osc_categories_select('sCategory', null, __('Select country/city', 'bender')) ; ?>
                </div>

并且此代码呈现此HTML:

<div class="cell selector">
                    <div class="select-box undefined"><select name="sCategory" id="sCategory" style="opacity: 0;"><option value="">Select a category</option><option value="98">Key West</option><option value="101">&nbsp;&nbsp;Miami</option><option value="99">Italy</option><option value="102">&nbsp;&nbsp;Rome</option><option value="97">Madives</option><option value="96">France</option><option value="4">United States</option><option value="43">&nbsp;&nbsp;Houses - Apartments for Sale</option><option value="44">&nbsp;&nbsp;Houses - Apartments for Rent</option><option value="45">&nbsp;&nbsp;Rooms for Rent - Shared</option><option value="46">&nbsp;&nbsp;Housing Swap</option><option value="47">&nbsp;&nbsp;Vacation Rentals</option><option value="48">&nbsp;&nbsp;Parking Spots</option><option value="49">&nbsp;&nbsp;Land</option><option value="50">&nbsp;&nbsp;Office - Commercial Space</option><option value="51">&nbsp;&nbsp;Shops for Rent - Sale</option></select><a href="#" class="select-box-trigger"><span class="select-box-label">Select a category</span><span class="select-box-icon">0</span></a></div>                </div>

所以你可以看到我无法控制:<?php osc_categories_select('sCategory', null, __('Select country/city', 'bender')) ; ?>

我如何以及在哪里可以更改此内容?我需要放我的课,因为我想创建一个新风格的新主题?有人知道吗?

1 个答案:

答案 0 :(得分:0)

这应该是oc-includes&gt; osclass&gt; fm&gt; Category.form.class.php

下:

static public function category_select($categories, $category, $default_item = null, $name = "sCategory")
    {
        echo '<select name="' . $name . '" id="' . $name . '">';
        if(isset($default_item)) {
            echo '<option value="">' . $default_item . '</option>';
        }
        foreach($categories as $c) {
            echo '<option value="' . $c['pk_i_id'] . '"' . ( ($category['pk_i_id'] == $c['pk_i_id']) ? 'selected="selected"' : '' ) . '>' . $c['s_name'] . '</option>';
            if(isset($c['categories']) && is_array($c['categories'])) {
                CategoryForm::subcategory_select($c['categories'], $category, $default_item, 1);
            }
        }
        echo '</select>';
    }