Osclass forums

Support forums => Themes => Bender => Topic started by: amoric69 on April 01, 2014, 06:39:01 pm

Title: How to call a precise custom field precise
Post 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



Title: Re: How to call a precise custom field precise
Post by: strata on April 01, 2014, 06:59:33 pm
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
Title: Re: How to call a precise custom field precise
Post by: amoric69 on April 02, 2014, 02:39:00 am
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 ?

Title: Re: How to call a precise custom field precise
Post by: design on April 02, 2014, 07:25:30 pm
did you change code or are you soley in admin?
Title: Re: How to call a precise custom field precise
Post by: cartagena68 on April 02, 2014, 07:54:41 pm
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.
Title: Re: How to call a precise custom field precise
Post by: amoric69 on April 03, 2014, 11:34:56 am
Ok thanks,
I will test with an older version and with another internet explorer.
Title: Re: How to call a precise custom field precise
Post by: amoric69 on April 03, 2014, 11:55:53 am
For rewind to second question : Is it possible to desactivate the category "all categories" ?
Title: Re: How to call a precise custom field precise
Post by: amoric69 on April 03, 2014, 12:08:48 pm
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
Title: Re: How to call a precise custom field precise - Price field stay here !
Post by: amoric69 on April 03, 2014, 12:25:44 pm
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 ?
Title: Re: How to call a precise custom field precise
Post by: yellow53 on June 10, 2014, 07:38:59 pm
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