Login or create new account.

By registering on joomprod.com, you will have immediate access to all our free products and to the public side of our support forum.

Enjoy our subscriptions.

Each of our subscriptions allow you to enjoy the private side of the support forum and all the update of our products for a period ranging from 3 months to 1 year.

Payment And immediate download.

After subscribing to one of our subscription, the products are immediately downloadable.

Login

Or Register
Accueil / forum / Public Forum / Main Forum / The Price field doesn't work correctly

Support Availability Because we must sleep sometimes

Working days: Monday to Friday.
Reply time: Depending on the complexity of your support issue it's usually between a few hours to 48 hours.

Support is only guaranteed to paid subscribers

AdsManager - End of life

It is with great regrets that we have chosen to end the developpement of Adsmanager and its other associated components.

AdsManager is born 10 years ago and, as of today, the number of new subscriptions and downloads have fallen and we cannot maintain the component anymore.

All active subscribers will be able to continue enjoying support until the end of their subscription.

The components will be free and no support will be provided anymore for the other users.

×

Notice

The forum is in read only mode.

× OLD Forum post could be checked here : forum.joomprod.com

The Price field doesn't work correctly

More
8 years 2 months ago #23598 by loic
Replied by loic on topic The Price field doesn't work correctly
Hello,

If it works for the category, did you try to copy the code of the select where it works to the one where it doesn't work ?

Best regards.
More
8 years 2 months ago - 8 years 2 months ago #23619 by patbe60
Replied by patbe60 on topic The Price field doesn't work correctly
The code JHtml::_('formbehavior.chosen', 'select.chosen'); doesn't take any effect in the file com_adsmanager/views/edit/tmpl/default.php.
It is not necessary as long as I select "yes" in the configuration -> 3. tab (Display) -> Load Juloa Bootstrap2 =yes. This should do everything.

I have seen in the file com_adsmanager/js/chosen.jquery.js that there are only codes for autocomplete and search. I don't understand anything about programming php or java script. But as far as I can see there should be also code for any selct list and also for the colored dropdown in the same way as it is for the Autocomplete Dropdown and the search dropdown.

Normally when using chosen css the following code is necessary:

JHtml::_('formbehavior.chosen', 'select');

In this case the pricefield doesen't work. So I think in AdsManager it seems to be only necessary to load Juloa Bootstrap2 as I mentioned above.

Attached a screenshot with Autocomplete dropdown and Juloa Bootstrap2 enabled from your demosite. Look at the differences between the category select and e.g. the kind of delivery select.

Attachments:
Last edit: 8 years 2 months ago by patbe60.
More
8 years 2 months ago #23628 by loic
Replied by loic on topic The Price field doesn't work correctly
Hello,

For the other select, you can find the html in components/com_adsmanager/helpers/field.php in the function showFieldForm().

If you add the chosen class to the select in this file, it might work.

Best regards.
More
8 years 2 months ago - 8 years 2 months ago #23635 by patbe60
Replied by patbe60 on topic The Price field doesn't work correctly
Thank you. This works for nearly every field.

I have added
JHtml::_('formbehavior.chosen', 'select.chosen');

at the top of the file.

Then I changed the code on line 443 to 446 from
if ($field->required == 1)
					$return .= "<select id='f$name' name='$name' required  class='adsmanager_required form-control' $disabled>\n";
				else
					$return .= "<select id='f$name' name='$name'  class='adsmanager form-control' $disabled>\n";

to
if ($field->required == 1)
					$return .= "<select id='f$name' name='$name' required  class='adsmanager_required form-control chosen' $disabled>\n";
				else
					$return .= "<select id='f$name' name='$name'  class='adsmanager form-control chosen' $disabled>\n";

Now only the colored dropdown needs to be changed. For this I couldn't find any note anywhere in the files of AdsManager.


EDIT: When I add chosen on line 444 the field is shown with the asterix if required but the settings in the backend (Required=yes) don't take any effect. The form can be sent also if not selected any option. The user then gets the message: "You do not have permission to post an ad in this category." This happens also with the field Category when selecting AutoComplete Dropdown in the Ads configuration -> second tab (Categories) -> category display type.

This means, that every dropdown field with the class chosen produces this message after sending the add. The add will not be published. And the user has to fill all fields again. It would be better tho have "this field is required" as it is in all other fields.
Last edit: 8 years 2 months ago by patbe60.
More
8 years 2 months ago #23646 by loic
Replied by loic on topic The Price field doesn't work correctly
Hello,

that's weird, the class chosen doesn't have anything to do with that kind of authorisation error.

The colored dropdown can be found in components/com_adsmanager/helpers/category.php.

Best regards.
More
8 years 2 months ago - 8 years 2 months ago #23654 by patbe60
Replied by patbe60 on topic The Price field doesn't work correctly
Hello

The colored dropdown can be found in components/com_adsmanager/helpers/category.php.

Found it on line 132. But when I set it there I get the same problems as I had written at the beginning of this topic. The pricefield doesn't work again.

that's weird, the class chosen doesn't have anything to do with that kind of authorisation error.

I tested it also on your demo site. I've made a video. You may see three parts :

1. Add a new Ad with Colored Dropdown (the class is not chosen), didn't select a categeroy and got the message "this field is required" -> ok this way
2. Add a new Ad with Autocomplete Dropdown, (class is chosen), didn't select a category -> could send the Ad and got after an error message
3. Add a new Ad with Autocomplete Dropdown, (class is chosen), selected a category -> everything worked fine.

The link to the video:
Last edit: 8 years 2 months ago by patbe60.
Moderators: perry
Time to create page: 0.164 seconds
Powered by Kunena Forum