Osclass forums

Support forums => General help => Topic started by: HORTENSIA on June 18, 2019, 09:39:27 pm

Title: Need code for multiple checkbox
Post by: HORTENSIA on June 18, 2019, 09:39:27 pm
I'm working on a plugin, I modify/change a plugin
But which would be the code to be display on search page and page_item .
The problem for me is that there are several options for each word the only one option to be displayed in the ad.

Can someone help me



Title: Re: Need code for multiple checkbox
Post by: WEBmods on June 19, 2019, 01:46:16 am
Hello.

Check the plugin in the attachment. I made it a long time ago but still works. There are 4 checkbox groups. In admin, you can set titles of the groups, set their values and enable/disable them.ΕΎ

Regards.

Title: Re: Need code for multiple checkbox
Post by: HORTENSIA on June 19, 2019, 08:27:30 pm
Thank you, in this wekeend I will try and I'll see how it will be.
I installed it, but it gives a chain error:

Fatal error: Can't use function return value in write context in /home/website/oc-content/plugins/zo_checkbox_group/admin/fields.php on line 36

if I change this line, it gives me another error...
Title: Re: Need code for multiple checkbox
Post by: Resta on July 17, 2019, 08:25:37 am
Hi Patrick,

Hope you are well :)  nice plugin but I am not sure if the search is working properly. I installed and for a listing I checked Value 2 in Group 1. Then when I go to do a search on any page, it will show me 2 fields and and click on checkbox next to Value 2 and press search but it shows an an error (browser warning page "this page isn't working properly). I do have a modified version of osclass and not sure if the plugin works fine and if there is something wrong on my side.

the url in the address bar shows as follows :
mysite/ads/index.php?page=search&sOrder=dt_pub_date&iOrderType=desc&sPriceMin=0&sPriceMax=1000000&checkbox_group_1=value+2&checkbox_1=,value+2

(look at the last values at the end with comma and + signs) - is my searchform sending the search values properly or do you think something with my version is messed up?
 
One thing I noticed is that while the Groups and Values show up in the listing form when adding a new listing, they do not show if/when editing old listings that existed before the plugin.

Thanks!
Title: Re: Need code for multiple checkbox
Post by: WEBmods on July 17, 2019, 12:47:27 pm
Hello!

Thanks, same to you. ;)

I checked the plugin and the quality of the code, well, isn't the best, at least. But hey, we're learning. I didn't know some stuff back then. So not sure how to fix all that.
However... I am planning to make a new version, much improved one, in the future so I'll post it here.

Regards.