Osclass forums
Support forums => Themes => Bender => Topic started by: amoric69 on April 01, 2014, 06:39:01 pm
-
Hello,
I try to correct some bugs who make disappear the price field when user chooses a category.
When he chooses category, the price field disappears and the 2 custom fields appear. Why ?
So I place y both custom fields under description.
<div class="control-group">
<label class="control-label" for="description[<?php echo osc_locale_code(); ?>]"><?php _e('Description', 'bender'); ?></label>
<div class="controls">
<?php ItemForm::description_textarea('description',osc_locale_code(), osc_esc_html( bender_item_description() )); ?>
</div>
</div>
<div class="control-group" style="border:solid 1px #f8f8f8;height:70px;">
<label class="control-label" for="custom_fields[<?php echo osc_locale_code(); ?>]"><?php _e('Marque', 'bender'); ?></label>
<div class="controls">
<?php ItemForm::plugin_post_item('marque', ''); ?>
</div>
</div>
<div class="control-group" style="border:solid 1px #f8f8f8;height:70px;">
<label class="control-label" for="custom_fields[<?php echo osc_locale_code(); ?>]"><?php _e('État', 'bender'); ?></label>
<div class="controls">
<?php ItemForm::plugin_post_item('etat', ''); ?>
</div>
</div>
I'had wrote <?php ItemForm::plugin_post_item('etat', ''); ?>
etat because it's his Id name.
Why there is the both custom fields in the bottom form ?
And why the price field disappears when users chooses category ?
Also is it possible to call custom fields before to chooses category ?
Thanks
-
You don't need to include "etat" as identifier for your custom field, just tick category checkbox where you want to include the custom field, and it will automatically appear when you choose the category at item post
-
Ok, than you.
But why the price field disappears when users chooses a category ?
And why the custom fields appears after to have chose the category ?
-
did you change code or are you soley in admin?
-
But why the price field disappears when users chooses a category ?
And why the custom fields appears after to have chose the category ?
About your first question i don't know, the price field should stay there.
Are you sure you have the price active for that category?
In oc-admin you find the price option in 2 places, under listing --> settings and also when you create a new category under settings --> categories --> edit you must check Enable / Disable the price field.
About your second question
Custom fields are category related, it mean that you can create different custom fields for each category (example: if you have a category named "houses" you can create custom field for that category (square feet, room, bathroom etc..)
Than you can have a category named "cars" an create custom field "diesel","gasoline", "year", Model", etc..
you don't want to show the custom field "square feet" under the category "cars", that is why the custom fields are shown after you choose a category.
I hope this help you to understand.
-
Ok thanks,
I will test with an older version and with another internet explorer.
-
For rewind to second question : Is it possible to desactivate the category "all categories" ?
-
And is it possible to separate and modify the css of the different custom fields ?
I want to place margin between areas of custom fields
-
For the second question,
The price's field disappears with any internet explorer, also the form is ok with OSClass 3.0.2.
Can you give me what are the fields who must be replaced ?
-
For the second question, when the user wants to edit his post, like changing the description, the user won't select again the category, then the custom field won't appear.
how to load and show the custom field when editing the item ? (like in the admin panel)
vincent